presentviewcontroller
全部标签 想知道最近是否有其他人遇到过这个问题......对于我的一个ViewController,仅在iOS8上,在调用presentViewController:animated:completion:之后,呈现的ViewController将self.presentingController设为nil。在iOS7上没问题,在另一个ViewController上也不会发生。documentation说应该设置它,只要呈现的ViewController是模态呈现的。鉴于它适用于iOS7,这可能是iOS8的错误吗?我已经能够使用View容器包含方法绕过它,但如果有人以前见过这个并且知道触发此行为
从UIAlertController呈现View会将警报移动到屏幕左上角的错误位置。iOS8.1、设备和模拟器。当我们尝试从当前“最顶层”View呈现View时,我们在应用程序中注意到了这一点。如果UIAlertController恰好是最顶层的View,我们就会得到这种行为。我们已经更改了我们的代码以简单地忽略UIAlertControllers,但我发布这个以防其他人遇到同样的问题(因为我找不到任何东西)。我们已将其隔离为一个简单的测试项目,完整代码位于该问题的底部。在新的单ViewXcode项目的ViewController上实现viewDidAppear:。呈现一个UIAler
我有一个ViewController层次结构,最顶层的Controller显示为模态,想知道在使用时如何显示导航栏'UIViewController:presentViewController:viewControllerToPresent:animated:completion'“presentViewController:animated:completion:”的文档注意:'OniPhoneandiPodtouch,thepresentedviewisalwaysfullscreen.OniPad,thepresentationdependsonthevalueinthemoda
我在使用presentViewController:animated:completion时遇到了一些奇怪的行为。我正在做的基本上是一个猜谜游戏。我有一个包含UITableView(frequencyTableView)的UIViewController(frequencyViewController)。当用户点击questionTableView中包含正确答案的行时,应该实例化一个View(correctViewController),并且它的View应该从屏幕底部向上滑动,作为模态视图。这告诉用户他们有一个正确的答案并重置其背后的frequencyViewController为下一
从Crashlytics,我们在Google登录过程中收到大量崩溃报告。崩溃报告如下:FatalException:NSInvalidArgumentExceptionuiDelegatemusteitherbea|UIViewController|orimplementthe|signIn:presentViewController:|and|signIn:dismissViewController:|methodsfrom|GIDSignInUIDelegate|.FatalException:NSInvalidArgumentException0CoreFoundation0x1
当我调用presentViewController(mySafariViewController,animated:true,completion:nil)时,View总是像导航Controller一样从右侧开始动画。我尝试调用mySafariViewController.modalTransitionStyle=.CoverVertical但它不起作用。我怎样才能改变这个? 最佳答案 我必须调用mySafariViewController.modalPresentationStyle=.overFullScreen(Swift3语
我正在做Facebook集成教程,如果用户有当前状态的有效token,我想显示我的MainViewViewController,否则我想显示LoginViewController。MainViewAppDelegate.m-(BOOL)application:(UIApplication*)applicationdidFinishLaunchingWithOptions:(NSDictionary*)launchOptions{if(FBSession.activeSession.state==FBSessionStateCreatedTokenLoaded){//To-do,show
这是我遇到的奇怪崩溃。当我按下一个转到某个ViewController的按钮时,就会发生崩溃。它崩溃的行是:DestinationInformationViewController*info=[[DestinationInformationViewControlleralloc]init];[infosetModalTransitionStyle:UIModalTransitionStyleCrossDissolve];[selfpresentViewController:infoanimated:YEScompletion:nil];//CRASHESHERE[inforelease
我正在使用XCode8并使用iOS10.2Beta进行测试。我已将Photos、PhotosUI和MobileCoreServices框架添加到项目中。非常简单的代码:#import#import#import@interfaceViewController:UIViewController@property(strong,nonatomic)IBOutletUIImageView*imageview;@end和实现:-(IBAction)grab:(UIButton*)sender{UIImagePickerController*picker=[[UIImagePickerContr
我正在使用XCode8并使用iOS10.2Beta进行测试。我已将Photos、PhotosUI和MobileCoreServices框架添加到项目中。非常简单的代码:#import#import#import@interfaceViewController:UIViewController@property(strong,nonatomic)IBOutletUIImageView*imageview;@end和实现:-(IBAction)grab:(UIButton*)sender{UIImagePickerController*picker=[[UIImagePickerContr