user1907641
user1907641

Reputation: 33

Custom Class for a View Controller

I'm trying to create a custom class for this online tut: http://mobile.tutsplus.com/tutorials/iphone/design-build-a-small-business-app-aqgridview/ and about a quarter of the way down the page it says:

"Select the MainStoryboard_iPhone file and change the Class of the SecondViewController nib to GridViewController."

However, for the life of me, GridViewController won't come up in the custom class options!

I've followed the instructions: "Cocoa Touch->Objective -C Class->NSObject template. Call it GridViewController. " And put into my .h file:

#import <UIKit/UIKit.h>
#import "AQGridView.h"
@interface GridViewController : UIViewController <AQGridViewDelegate, AQGridViewDataSource>
@property (nonatomic, retain) IBOutlet AQGridView * gridView;
@property (nonatomic, retain) NSArray * services;
@end

Shouldn't it show up as a class?

Upvotes: 0

Views: 289

Answers (1)

henryeverett
henryeverett

Reputation: 803

Have you made sure that you are setting the custom class of the view controller object in the nib?

You could try cleaning and building your project again to make sure everything is indexed properly, or you could try manually entering the class name in the custom class field and then compiling to see if any helpful errors are thrown.

Upvotes: 1

Related Questions