当前位置: 代码迷 >> Iphone >> UIViewController关联两个xib(Iphone5上使用xib)
  详细解决方案

UIViewController关联两个xib(Iphone5上使用xib)

热度:1594   发布时间:2013-02-26 00:00:00.0
UIViewController关联两个xib(Iphone5下使用xib)
#define iPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO)



- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil{    //self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];    if (iPhone5) {        self = [[super initWithNibName:@"MemberDetail_iphone5" bundle:nibBundleOrNil]autorelease];    }    else    {        self = [[super initWithNibName:@"MemberDetail" bundle:nibBundleOrNil] autorelease];    }    if (self) {        // Custom initialization    }    return self;}


Page1_iphone5.xib  文件的