I have some codes as below
#import <UIKit/UIKit.h>
@interface ViewMoreSettingController : UIViewController < UITableViewDelegate, UITableViewDataSource >
{}
@end
#import "ViewMoreSettingController.h"
@implementation ViewMoreSettingController
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.
}
- (void)viewDidUnload
{
[super viewDidUnload];
// Release any retained subviews of the main view.
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
@end
// "MoreController.h"
#import <UIKit/UIKit.h>
@class ViewMoreSettingController;
@interface MoreController : UIViewController <UITableViewDataSource,UITableViewDelegate>{
ViewMoreSettingController *vViewMoreSettingController;
}
@property (retain,nonatomic) ViewMoreSettingController *vViewMoreSettingController;
@end
//------------------------------"MoreController.m"
#import "MoreController.h"
#import "ViewMoreSettingController.h"
@implementation MoreController
@synthesize vViewMoreSettingController;
-(void)doSomething
{
ViewMoreSettingController * temController ;
temController=[[ViewMoreSettingController alloc]initWithNibName:@"ViewMoreSetting" bundle:nil];//a: if remove this line it will compile successfully
[self.navigationController pushViewController:vViewMoreSettingController animated:YES];
[temController release];
}
it will report
Undefined symbols for architecture i386: "_OBJC_CLASS_$_ViewMoreSettingController", referenced from: objc-class-ref in MoreController.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)
if I remove line a: it will compile successfully.
Welcome any comment