ios 中使用 storyboard 来初始化view controller . 从xib文件中获取view

ExampleModalViewController *modal = [self.storyboardinstantiateViewControllerWithIdentifier:@"ExampleModalViewController"];


//        UIStoryboard* download_storyboard = [UIStoryboard storyboardWithName:@"DownloadManager" bundle:nil];
//        UIViewController *initialViewController = [download_storyboard instantiateInitialViewController];


NSArray *nibObjects = [[NSBundle mainBundle] loadNibNamed:@"Downloader" owner:self options:nil];
UIView *nibView = [nibObjects objectAtIndex:0];


你可能感兴趣的:(xcode(Iphone)编程)