草庐IT

currentViewController

全部标签

ios - UIPageViewController 在方向改变时抛出 SIGABRT

我有以下代码来显示杂志类型的应用程序。旋转应用程序时,它会运行此代码。我确保它仅在旋转到支持的方向时运行。当此函数返回时,应用程序失败并返回SIGABRT。没有其他迹象表明原因。我知道是这个函数,因为当我删除它时程序不会失败。-(UIPageViewControllerSpineLocation)pageViewController:(UIPageViewController*)pageViewControllerspineLocationForInterfaceOrientation:(UIInterfaceOrientation)orientation{//Ifportraitmo

iphone - UISegmented View 改变 View

我已经设置了两个barbutton项,一个在右边,一个在左边。右边的一个成功地在两个View之间切换,右边的第二个是一个分段控件,它应该像明智的那样在两个View之间切换。这是我的代码,我想知道如何使用分段控件实现更改View。-(void)setupNavigationBar{UINavigationBar*navBar=[[UINavigationBaralloc]initWithFrame:CGRectMake(0,0,self.view.frame.size.width,44.0f)];UINavigationItem*navItem=[[UINavigationItemall

ios - 64 位 iOS 设备中的 UIViewControllerHierarchyInconsistency

我正在开发一个iPad应用程序,它有一个ViewController(称为ContentViewController),其中有3个不同的View。sliderView-从底部打开,其中包含图标列表。基于选择一个图标,我必须在内容View中加载一个ViewController控制View-屏幕左侧有几个按钮和文本容器View——它覆盖了大部分屏幕,我想根据从slider中选择的图标加载ViewController我是这样实现的在应用程序启动时(第一次),我通常在容器View中加载主视图Controller,它有包含应用程序相关项目的TableView。每个ViewController都在

ios - 呈现 UIImagePickerController 时如何获取顶 View Controller ?

有时我会显示UIImagePickerViewController。呈现后,我调用我的函数:UIStoryboard.topViewController():extensionUIStoryboard{classfunctopViewController(base:UIViewController?=UIApplication.sharedApplication().keyWindow?.rootViewController)->UIViewController?{ifletnav=baseas?UINavigationController{returntopViewControlle

iOS 11 iPhone x 安全区域布局指南

我的应用程序已经在应用程序商店中,昨天我已经将我的Xcode版本更新到9,并且除了iPhonex之外都可以正常工作。UI折叠了。1.我在这里创建了两个UIView(都是固定高度),分别命名为Header和Tabbar,我隐藏了整个应用程序的NavigationBar。2.为UIViewController添加扩展,用于制作Header和TabbarfuncaddHeaderTab(currentViewController:UIViewController,content:String,isMenu:Bool){letnoView=TopHeaderView()noView.tag=1

iOS 11 iPhone x 安全区域布局指南

我的应用程序已经在应用程序商店中,昨天我已经将我的Xcode版本更新到9,并且除了iPhonex之外都可以正常工作。UI折叠了。1.我在这里创建了两个UIView(都是固定高度),分别命名为Header和Tabbar,我隐藏了整个应用程序的NavigationBar。2.为UIViewController添加扩展,用于制作Header和TabbarfuncaddHeaderTab(currentViewController:UIViewController,content:String,isMenu:Bool){letnoView=TopHeaderView()noView.tag=1

iOS swift : UIPageViewController - Turning page programmatically

我有一个UIPageViewController,当我们向左或向右滑动翻页时,它工作正常。classViewController:UIViewController,UIPageViewControllerDataSource{...}现在我打算在页面上也提供上一个/下一个按钮,这样就可以通过点击这些按钮来翻页。如何以编程方式触发左/右滑动行为或翻页?注意事项这是针对Swift语言的问题,而不是Objective-C。 最佳答案 通常不需要摆弄页面索引等等。您可能已经在实现dataSource:UIPageViewController

iOS swift : UIPageViewController - Turning page programmatically

我有一个UIPageViewController,当我们向左或向右滑动翻页时,它工作正常。classViewController:UIViewController,UIPageViewControllerDataSource{...}现在我打算在页面上也提供上一个/下一个按钮,这样就可以通过点击这些按钮来翻页。如何以编程方式触发左/右滑动行为或翻页?注意事项这是针对Swift语言的问题,而不是Objective-C。 最佳答案 通常不需要摆弄页面索引等等。您可能已经在实现dataSource:UIPageViewController