标签:
#import "myView.h"
//使用这个myview来代替控制器自带的view
@property(nonatomic,retain)myView *myview;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
//将myView初始化
self.myview=[[[myView alloc]initWithFrame:[UIScreen mainScreen].bounds] autorelease];
}
return self;
}
//加载视图//重写的,使用自己写的view.不要系统自带的
-(void)loadView
{
//指向自己创建的myview
self.view=self.myview;
}
标签:
原文地址:http://www.cnblogs.com/-ios/p/4672622.html