「Objective-C」initWithNibName初期化メソッドを利用する参考コード

参考コード:
– (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
UIBarButtonItem *refresh = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:self action:@selector(refreshData:)];
refresh.tintColor = [UIColor whiteColor];
self.navigationItem.rightBarButtonItem = refresh;

}
return self;
}

IOS

Posted by arkgame