草庐IT

UItabBarController

全部标签

ios - 实例化 View Controller Swift 3 标签栏 Controller

如何切换到标签栏Controller?在带有导航Controller的选项卡上有2个ViewController,在选项卡栏Controller上有一个导航Controller。letstoryboard=UIStoryboard(name:"PendingOverview",bundle:nil)letvc=storyboard.instantiateViewController(withIdentifier:"PendingOverviewVC")as!PendingOverViewControllerletnc=UINavigationController(rootViewCon

ios - 跨多个 View 共享导航栏的最佳方式?

我有三个ViewController,我希望它们具有相同的导航栏,但我想不出在这三个View之间“共享”导航栏的方法。有没有更有效的方法将导航Controller与ViewController链接起来,这样即使导航Controller完全相同,我也没有三个不同的导航Controller?此外,如果有区别的话,我还有一个标签栏Controller。图片说明: 最佳答案 正如Ch0k0I8提到的,UIAppearance是在整个应用中设置通用UI主题的好方法。如果您正在寻找导航Controller之间的相同功能,那么您应该子类化UINa

ios - 摄像头下方有一个黑色的底部空间

我从UITabBarController呈现一个UIImagePickerController。letimagePicker=UIImagePickerController()imagePicker.delegate=selfimagePicker.sourceType=.CameraimagePicker.allowsEditing=falseimagePicker.showsCameraControls=falsepresentViewController(imagePicker,animated:true,completion:nil)我已明确将showsCameraContro

ios - 准备转至 UITabBarController 选项卡

我想将信息从ViewController传递到UITabBarController以便我可以从UITabBarController.但是,问题是当我尝试这样做时我的程序总是崩溃。到目前为止,这是我的代码:我这样称呼segue:self.firstName=user.first_nameself.lastName=user.last_nameself.performSegueWithIdentifier("OffersView",sender:self)然后我覆盖了prepareForSegue函数,这样我就可以像这样在这个函数中传递信息:overridefuncprepareForSe

swift - 为什么我不能使我的 UITabBarController 模糊?

我有一个UITabBar,我想让它变得模糊。我写了下面的代码:importUIKitclassTabBarController:UITabBarController{overridefuncviewDidLoad(){super.viewDidLoad()letblur=UIBlurEffect(style:UIBlurEffectStyle.Light)letblurView=UIVisualEffectView(effect:blur)blurView.frame=self.view.boundsblurView.autoresizingMask=[.FlexibleWidth,.

ios - segue 后在 View 上保留标签栏?

这个问题在这里已经有了答案:TabBarcontrollerdisappearingwhenmovingtoanotherview(iOSSDK,Usingstoryboards)(2个答案)关闭2年前。我有一个标签栏Controller,然后是一个导航Controller,然后是第一个ViewController。正如预期的那样,这个ViewController有一个标签栏。但是,当我从此View继续时,我丢失了选项卡栏。我希望它保留其在其他VC中的地位,源于第一个观点。这是我的IB:我希望标签栏在从右侧VC通过segue加载后也出现在左侧VC上,这是如何实现的,因为无论我如何设置V

ios - 在 ViewController 和 TabBarController 之间传递数据

我有几个问题。如何将数据(我在Alamofire请求完成后获得)传递给TabBarController的子项之一?我遇到的第一个问题是我无法覆盖登录操作中的funcprepareForSegue(点击按钮时),它说我只能覆盖类成员。但是,如果我将函数放在IBAction之外,那么我将不会发送我需要的数据。第二个问题是,当我将覆盖函数放在IBAction之外时,代码如下所示:overridefuncprepareForSegue(segue:UIStoryboardSegue,sender:AnyObject!){lethomeVC=segue.destinationViewContro

ios - Swift 标签栏 View prepareforsegue

在VC1(CollectionView)中,这是我的prepareforsegue代码:overridefuncprepareForSegue(segue:UIStoryboardSegue,sender:AnyObject?){letsegue=segue.destinationViewControllerasTabBarViewControllervarselectedIndex=self.collectionView.indexPathForCell(senderasUICollectionViewCell)segue.selectedIndexPassing=selectedI

ios - presentingViewController 总是得到 UITabBarController

我只是添加了TabBarController+NavigationController。在此之前一切正常,但现在当我从模态调用presentingViewController时,出现此错误:Terminatingappduetouncaughtexception'NSInvalidArgumentException',reason:'-[UITabBarControllertableViewListado]:unrecognizedselectorsenttoinstance我收到的不是预期的对象(ViewController),而是“UITabBarController”,在使用Ta

ios - presentingViewController 总是得到 UITabBarController

我只是添加了TabBarController+NavigationController。在此之前一切正常,但现在当我从模态调用presentingViewController时,出现此错误:Terminatingappduetouncaughtexception'NSInvalidArgumentException',reason:'-[UITabBarControllertableViewListado]:unrecognizedselectorsenttoinstance我收到的不是预期的对象(ViewController),而是“UITabBarController”,在使用Ta