Once you have your app all set up and configured, the most common task you will want to do is add a new screen. Fortunately, this is quite easy!
First, come up with a short name that you would like to identify this new screen, which we refer to as the “slug”, and the Objective-C class name. For example if you are creating a screen to present a photo to the user, you might choose photo as your slug, and you might want to choose something like PhotoViewController for your new file in XCode.
To help make this easier, we’ve created a tool to help get the details right. All you have to do is enter your choices below:
clutch startscreen $SLUG$
Now you should go to your XCode project and add a new file. Choose “UIViewController subclass” when it asks. Name it what you decided above, and then copy this into $NAME$.h:
#import <UIKit/UIKit.h> #import <Clutch/Clutch.h> @interface $NAME$ : UIViewController <ClutchViewDelegate> @property (nonatomic, retain) ClutchView *clutchView; @end
Now copy this into $NAME$.m:
That’s it! You’ve got your screen hooked up and now it’s up to you to use it for good, not evil.