草庐IT

viewController

全部标签

ios - Xcode 6 中的“Show”segue 将 viewcontroller 呈现为 iOS 7 中的模态

我的iPhone应用程序(使用swift构建)中有两个ViewController,该应用程序使用Xcode6.1构建并使用Storyboard。第一个ViewController嵌入在Storyboard中的导航Controller中,第二个ViewController的转场是“显示”转场。当应用程序运行时,它在iOS8.x中正确地将转换显示为推送,但在iOS7.x中它显示为没有导航栏的模态。无论是iOS7还是iOS8,我的应用程序要求都将转换显示为推送。有什么想法可以使它在两个iOS版本中都作为推送工作吗?我看到一篇相关帖子提到了这个问题,但找不到问题的解决方案:Adaptives

ios - Xcode 6 中的“Show”segue 将 viewcontroller 呈现为 iOS 7 中的模态

我的iPhone应用程序(使用swift构建)中有两个ViewController,该应用程序使用Xcode6.1构建并使用Storyboard。第一个ViewController嵌入在Storyboard中的导航Controller中,第二个ViewController的转场是“显示”转场。当应用程序运行时,它在iOS8.x中正确地将转换显示为推送,但在iOS7.x中它显示为没有导航栏的模态。无论是iOS7还是iOS8,我的应用程序要求都将转换显示为推送。有什么想法可以使它在两个iOS版本中都作为推送工作吗?我看到一篇相关帖子提到了这个问题,但找不到问题的解决方案:Adaptives

ios - 错误 : unreachable because it has no entry points

使用Swift我得到了我的“TableViewController”无法访问的错误,因为它没有入口点,也没有通过[UIStoryboardinstantiateViewControllerWithIdentifier]的运行时访问。在我的ViewController类中,建议在更改instantiateViewController(withIdentifier)中的instantiateViewController(withIdentfier...)时修复它。我应该这样做还是如何解决这个问题? 最佳答案 您需要在Storyboard

ios - 错误 : unreachable because it has no entry points

使用Swift我得到了我的“TableViewController”无法访问的错误,因为它没有入口点,也没有通过[UIStoryboardinstantiateViewControllerWithIdentifier]的运行时访问。在我的ViewController类中,建议在更改instantiateViewController(withIdentifier)中的instantiateViewController(withIdentfier...)时修复它。我应该这样做还是如何解决这个问题? 最佳答案 您需要在Storyboard

swift - 将 swift 文件添加到 xCode 中的新 View Controller ? (简单的)

我刚开始使用xCode6,我似乎无法弄清楚如何将新的swift-file添加到我在界面构建器中添加的新ViewController。如有任何关于如何进行的提示,我们将不胜感激。 最佳答案 添加一个新的CocoaTouch类。从菜单中选择文件->新建->文件...。为这个新类命名,例如“ViewController2”,并将Subclassof:弹出设置为UIViewController。将创建文件“ViewController2.swift”。在InterfaceBuilder中点击您的新ViewController。在Identi

swift - 将 swift 文件添加到 xCode 中的新 View Controller ? (简单的)

我刚开始使用xCode6,我似乎无法弄清楚如何将新的swift-file添加到我在界面构建器中添加的新ViewController。如有任何关于如何进行的提示,我们将不胜感激。 最佳答案 添加一个新的CocoaTouch类。从菜单中选择文件->新建->文件...。为这个新类命名,例如“ViewController2”,并将Subclassof:弹出设置为UIViewController。将创建文件“ViewController2.swift”。在InterfaceBuilder中点击您的新ViewController。在Identi

ios - 在 ViewController 的 UICollectionView 中拉动刷新

我在UICollectionViewController中使用了以下代码overridefuncviewDidLoad(){self.collectionView!.alwaysBounceVertical=trueletrefresher=UIRefreshControl()refresher.addTarget(self,action:"refreshStream",forControlEvents:.ValueChanged)refreshControl=refreshercollectionView!.addSubview(refreshControl!)}funcrefres

ios - 在 ViewController 的 UICollectionView 中拉动刷新

我在UICollectionViewController中使用了以下代码overridefuncviewDidLoad(){self.collectionView!.alwaysBounceVertical=trueletrefresher=UIRefreshControl()refresher.addTarget(self,action:"refreshStream",forControlEvents:.ValueChanged)refreshControl=refreshercollectionView!.addSubview(refreshControl!)}funcrefres

ios - 在 Swift 上弹出 ViewController

我需要从导航Controller中弹出一个UIViewController。只是写了这行代码却抛出了异常;在展开可选值时意外发现nilself.navigationController.popViewControllerAnimated(true)如果我将导航Controller设为可选,则此行无效,不会弹出self.navigationController?.popViewControllerAnimated(true)如何解决? 最佳答案 您需要正确解包您的navigationControllerifletnavControll

ios - 在 Swift 上弹出 ViewController

我需要从导航Controller中弹出一个UIViewController。只是写了这行代码却抛出了异常;在展开可选值时意外发现nilself.navigationController.popViewControllerAnimated(true)如果我将导航Controller设为可选,则此行无效,不会弹出self.navigationController?.popViewControllerAnimated(true)如何解决? 最佳答案 您需要正确解包您的navigationControllerifletnavControll