草庐IT

ViewController_ipad

全部标签

ios - 如何在关闭 ViewController 时将数据传递给另一个 Controller ?

我想在VC关闭时将我的数据从一个ViewController传递到另一个VC。可能吗?我已经尝试了下一个方法但没有成功:点击按钮:self.dismiss(animated:true){letstoryboard=UIStoryboard(name:"Main",bundle:nil)letcontroller=storyboard.instantiateViewController(withIdentifier:"EditViewController")as!EditViewControllercontroller.segueArray=[values]}当EditViewContr

ios - 如何在关闭 ViewController 时将数据传递给另一个 Controller ?

我想在VC关闭时将我的数据从一个ViewController传递到另一个VC。可能吗?我已经尝试了下一个方法但没有成功:点击按钮:self.dismiss(animated:true){letstoryboard=UIStoryboard(name:"Main",bundle:nil)letcontroller=storyboard.instantiateViewController(withIdentifier:"EditViewController")as!EditViewControllercontroller.segueArray=[values]}当EditViewContr

ios - 如何检查 iPad 是否为 iPad Pro

新的iPadpro有不同的尺寸和分辨率。如果我根据屏幕宽度检查是否正确?我还没有升级到Xcode7.1,也没有设备,所以我还不能检查它。这个检查有用吗?if([UIScreenmainScreen].bounds.size.width>1024){//iPadisaniPadPro} 最佳答案 你可以用这个#defineIS_IPAD(UI_USER_INTERFACE_IDIOM()==UIUserInterfaceIdiomPad)#defineSCREEN_WIDTH([[UIScreenmainScreen]bounds].

ios - 如何检查 iPad 是否为 iPad Pro

新的iPadpro有不同的尺寸和分辨率。如果我根据屏幕宽度检查是否正确?我还没有升级到Xcode7.1,也没有设备,所以我还不能检查它。这个检查有用吗?if([UIScreenmainScreen].bounds.size.width>1024){//iPadisaniPadPro} 最佳答案 你可以用这个#defineIS_IPAD(UI_USER_INTERFACE_IDIOM()==UIUserInterfaceIdiomPad)#defineSCREEN_WIDTH([[UIScreenmainScreen]bounds].

ios - 如何从 GameScene 中的 ViewController 调用方法

我有一个在我的viewController中有一个自定义segue的方法,看起来像这样:funcgameOver(){performSegueWithIdentifier("GameOver",sender:nil)}我在GameScene.swift中这样调用方法:GameViewController().gameOver()我仔细检查了segue名称,它是正确的。每当我在我的GameScene.swift文件中调用它时,我都会收到SIGABRT消息,但我不知道为什么。我尝试仅使用println()消息调用该函数并且它起作用了。任何关于为什么会发生这种情况以及我如何成功调用GameS

ios - 如何从 GameScene 中的 ViewController 调用方法

我有一个在我的viewController中有一个自定义segue的方法,看起来像这样:funcgameOver(){performSegueWithIdentifier("GameOver",sender:nil)}我在GameScene.swift中这样调用方法:GameViewController().gameOver()我仔细检查了segue名称,它是正确的。每当我在我的GameScene.swift文件中调用它时,我都会收到SIGABRT消息,但我不知道为什么。我尝试仅使用println()消息调用该函数并且它起作用了。任何关于为什么会发生这种情况以及我如何成功调用GameS

ios - 当滑回根 viewController 时,大导航栏背景会变得清晰

我已经使用了largeNavigationBar并且在我滑回RootViewController并且大型导航以令人讨厌的方式获得清晰颜色之前一切正常。这是代码:funclargeNavigationTitle(){self.navigationController?.view.backgroundColor=VVUtility.navigationBarColor()letproductTitle=request?.product?.nameself.navigationItem.title="\(productTitle??"")".localized()self.navigatio

ios - 当滑回根 viewController 时,大导航栏背景会变得清晰

我已经使用了largeNavigationBar并且在我滑回RootViewController并且大型导航以令人讨厌的方式获得清晰颜色之前一切正常。这是代码:funclargeNavigationTitle(){self.navigationController?.view.backgroundColor=VVUtility.navigationBarColor()letproductTitle=request?.product?.nameself.navigationItem.title="\(productTitle??"")".localized()self.navigatio

xcode - Swift - 我如何从 ViewController 转到 TabBarController

如何在Swift中的TabBarController之前添加ViewController?我正在使用Parse在ViewController中进行自定义登录,这将导致TabBarController...帮助将不胜感激! 最佳答案 1.按住Control从黄色符号(ViewController)拖动到TabBarController这将在您的ViewController菜单中创建一个segue2.点击这个新的segue“ShowseguetoTab...”并在身份检查器中设置一个标识符名称。3.现在,当您想要进行segue时,请使用

xcode - Swift - 我如何从 ViewController 转到 TabBarController

如何在Swift中的TabBarController之前添加ViewController?我正在使用Parse在ViewController中进行自定义登录,这将导致TabBarController...帮助将不胜感激! 最佳答案 1.按住Control从黄色符号(ViewController)拖动到TabBarController这将在您的ViewController菜单中创建一个segue2.点击这个新的segue“ShowseguetoTab...”并在身份检查器中设置一个标识符名称。3.现在,当您想要进行segue时,请使用