
- (IBAction)submitbuttonClicked:(ID)sender{ NSLog(@"here"); SuccessOrFailVIEwController *sfvc = [[SuccessOrFailVIEwController alloc] init]; [self presentVIEwController:sfvc animated:NO completion:NulL];} 当用户点击应用中的提交按钮时,我试图打开一个新页面.但是,这完全没有打开黑屏.如何使它打开vIEwController?
解决方法 您没有为用户界面输入nib名称:SuccessOrFailVIEwController *sfvc = [[SuccessOrFailVIEwController alloc] initWithNibname:@"SuccessOrFailVIEwController" bundle:nil];[self presentVIEwController:sfvc animated:NO completion:NulL];
对于故事板,这是要走的路:
UIStoryboard *storyboard = [UIStoryboard storyboarDWithname:@"MainStoryboard" bundle:nil];SuccessOrFailVIEwController *sfvc = [storyboard instantiateVIEwControllerWithIDentifIEr:@"SuccessOrFailVIEwController"];[sfvc setModalPresentationStyle:UIModalPresentationFullScreen];[self presentModalVIEwController:sfvc animated:YES];总结
以上是内存溢出为你收集整理的ios – presentViewController显示黑页全部内容,希望文章能够帮你解决ios – presentViewController显示黑页所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)