草庐IT

remote-control

全部标签

ios - 如何关闭使用 presentModalViewController : 打开的 View Controller

我使用presentModalViewController:展示了一个ViewController,现在如何关闭/关闭它? 最佳答案 对于iOS6使用此代码[selfdismissViewControllerAnimated:YEScompletion:Nil];代替[selfdismissModalViewControllerAnimated:YES];这可能对你有帮助。 关于ios-如何关闭使用presentModalViewController:打开的ViewController,

ios - 是否可以使用完成 block 推送 View Controller ?

UINavigationController的文档不包含带有completion:参数的pushViewController方法。 最佳答案 更好的解决方案是用CATransaction包装推送动画并设置completionBlock。无需处理时间问题。[CATransactionbegin];[CATransactionsetCompletionBlock:^{//whateveryouwanttodoafterthepush}];[[selfnavigationController]pushViewController:view

ios - 是否可以使用完成 block 推送 View Controller ?

UINavigationController的文档不包含带有completion:参数的pushViewController方法。 最佳答案 更好的解决方案是用CATransaction包装推送动画并设置completionBlock。无需处理时间问题。[CATransactionbegin];[CATransactionsetCompletionBlock:^{//whateveryouwanttodoafterthepush}];[[selfnavigationController]pushViewController:view

ios - WatchKit 错误 - 无法找到要实例化的接口(interface) Controller 类 ''

每当我在WKIInterfaceController的子类中建立任何连接时,我都会收到错误WatchKiterror-unabletofindinterfacecontrollerclass'myClass'toinstantiate并且事件指示器显示在模拟器和View不加载。断开所有连接,View显示正确但仍然报错尝试过Unabletofindinterfacecontrollerclass'InterfaceController'toinstantiateWatchKit:unabletofindinterfacecontrollerclassWatchKitreloadRootC

ios - WatchKit 错误 - 无法找到要实例化的接口(interface) Controller 类 ''

每当我在WKIInterfaceController的子类中建立任何连接时,我都会收到错误WatchKiterror-unabletofindinterfacecontrollerclass'myClass'toinstantiate并且事件指示器显示在模拟器和View不加载。断开所有连接,View显示正确但仍然报错尝试过Unabletofindinterfacecontrollerclass'InterfaceController'toinstantiateWatchKit:unabletofindinterfacecontrollerclassWatchKitreloadRootC

iphone - 带有导航栏和 View Controller 的自动布局 (iOS 7)

我目前正在将我的应用程序转移到iOS7(我希望它保持与iOS6兼容)。AppleNDA没有涵盖这个问题,它是关于自动布局的问题(似乎iOS7强制自动布局(编辑:错了,它不是强制的))。我有一个带有RootViewController的导航Controller(显而易见)。在iOS6中,我没有使用自动布局,所以RootViewController位于导航栏下方。在iOS7中,框架原点不包括导航栏,所以我的内容的顶部被隐藏了......您知道如何使用自动布局在导航栏上方制作整个View吗?谢谢! 最佳答案 在iOS7上,您有指定导航栏的

iphone - 带有导航栏和 View Controller 的自动布局 (iOS 7)

我目前正在将我的应用程序转移到iOS7(我希望它保持与iOS6兼容)。AppleNDA没有涵盖这个问题,它是关于自动布局的问题(似乎iOS7强制自动布局(编辑:错了,它不是强制的))。我有一个带有RootViewController的导航Controller(显而易见)。在iOS6中,我没有使用自动布局,所以RootViewController位于导航栏下方。在iOS7中,框架原点不包括导航栏,所以我的内容的顶部被隐藏了......您知道如何使用自动布局在导航栏上方制作整个View吗?谢谢! 最佳答案 在iOS7上,您有指定导航栏的

ios - 解除模态呈现的 View Controller 时框架不正确

我正在使用自定义转换和自定义UIPresentationController呈现一个UIViewController。ViewController的View不会覆盖整个屏幕,因此呈现ViewController仍然可见。接下来,我在这个ViewController的顶部展示了一个UIImagePickerController的实例。问题是,当我关闭图像选择器时,呈现ViewController的框架会覆盖整个屏幕,而不仅仅是我希望它覆盖的部分。在我的自定义UIPresentationController中由frameOfPresentedViewInContainerView指定的框架

ios - 解除模态呈现的 View Controller 时框架不正确

我正在使用自定义转换和自定义UIPresentationController呈现一个UIViewController。ViewController的View不会覆盖整个屏幕,因此呈现ViewController仍然可见。接下来,我在这个ViewController的顶部展示了一个UIImagePickerController的实例。问题是,当我关闭图像选择器时,呈现ViewController的框架会覆盖整个屏幕,而不仅仅是我希望它覆盖的部分。在我的自定义UIPresentationController中由frameOfPresentedViewInContainerView指定的框架

ios - 什么时候应该使用导航 Controller ?

我不知道什么时候应该使用NavigationController而不是将segue与普通ViewController一起使用?如果使用segue,Modal和Pushsegue有什么不同?你能举个例子吗? 最佳答案 简短回答:仅使用带“显示”segue的导航Controller来实现DRILLDOWN行为。例如,导航Controller→作者→图书→图书对于“根”(作者)以下的每个级别,导航Controller自动添加标题栏和后退按钮。所以在Books上,后退按钮自动命名为“subviewController必须与SHOWsegue