代码1:
DinoVIEwController *dinoVC = [[DinoVIEwController alloc]init]; dinoVC.modalTransitionStyle = UIModalTransitionStyleCrossdissolve; [self presentVIEwController:dinoVC animated:YES completion:nil];
代码2:
UIStoryboard *storyboard = [UIStoryboard storyboarDWithname:@"Main" bundle:nil]; DinoVIEwController *dinoVC = [storyboard instantiateInitialVIEwController]; dinoVC.modalTransitionStyle = UIModalTransitionStyleCrossdissolve; [self presentVIEwController:dinoVC animated:YES completion:nil];解决方法 找到了正确答案:在tvOS故事板中提及标识符(在iOS中不一样),然后实现此代码:
UIStoryboard *storyboard = [UIStoryboard storyboarDWithname:@"Main" bundle:nil]; UIVIEwController *dinoVC = [storyboard instantiateVIEwControllerWithIDentifIEr:@"Page1"]; [self presentVIEwController:dinoVC animated:YES completion:nil];总结
以上是内存溢出为你收集整理的objective-c – 在tvOS中呈现视图控制器全部内容,希望文章能够帮你解决objective-c – 在tvOS中呈现视图控制器所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)