草庐IT

UINavigationcontroller

全部标签

ios - Swift——在 App Delegate 中实例化一个没有 Storyboard的导航 Controller

我正在重建一个没有Storyboard的应用程序,其中我遇到最大麻烦的部分是以编程方式导航View到View。那里写的东西很少不使用Storyboard,因此很难找到答案。我的问题很简单。我有我的ViewController和我的SecondViewController,我想从前者推送到后者。在AppDelegate中:funcapplication(application:UIApplication,didFinishLaunchingWithOptionslaunchOptions:[NSObject:AnyObject]?)->Bool{//Overridepointforcus

ios - Swift——在 App Delegate 中实例化一个没有 Storyboard的导航 Controller

我正在重建一个没有Storyboard的应用程序,其中我遇到最大麻烦的部分是以编程方式导航View到View。那里写的东西很少不使用Storyboard,因此很难找到答案。我的问题很简单。我有我的ViewController和我的SecondViewController,我想从前者推送到后者。在AppDelegate中:funcapplication(application:UIApplication,didFinishLaunchingWithOptionslaunchOptions:[NSObject:AnyObject]?)->Bool{//Overridepointforcus

ios - 覆盖 shouldAutorotate 在 Swift 3 中不起作用

我试图阻止一个UIViewController上的旋转,但我无法实现。我正在做这样的事情:openoverridevarshouldAutorotate:Bool{get{returnfalse}}overridevarsupportedInterfaceOrientations:UIInterfaceOrientationMask{get{return.portrait}}UIViewControler仍然在旋转。UIViewController位于模态打开的UINavigationController中。我从这里看了很多问题,但没有一个答案适合我。在Swift2中,我曾经重写sho

ios - 覆盖 shouldAutorotate 在 Swift 3 中不起作用

我试图阻止一个UIViewController上的旋转,但我无法实现。我正在做这样的事情:openoverridevarshouldAutorotate:Bool{get{returnfalse}}overridevarsupportedInterfaceOrientations:UIInterfaceOrientationMask{get{return.portrait}}UIViewControler仍然在旋转。UIViewController位于模态打开的UINavigationController中。我从这里看了很多问题,但没有一个答案适合我。在Swift2中,我曾经重写sho

ios - DestinationViewController Segue 和 UINavigationController swift

所以我有一个像这样的prepareForSegue方法:overridefuncprepareForSegue(segue:UIStoryboardSegue,sender:AnyObject?){ifsegue.identifier=="fromEventTableToAddEvent"{letaddEventViewController:AddEventViewController=segue.destinationViewControlleras!AddEventViewControlleraddEventViewController.newTagArray=newTagArra

ios - DestinationViewController Segue 和 UINavigationController swift

所以我有一个像这样的prepareForSegue方法:overridefuncprepareForSegue(segue:UIStoryboardSegue,sender:AnyObject?){ifsegue.identifier=="fromEventTableToAddEvent"{letaddEventViewController:AddEventViewController=segue.destinationViewControlleras!AddEventViewControlleraddEventViewController.newTagArray=newTagArra

objective-c - 在 iOS 7 中自定义导航栏 - 标题颜色不起作用

我正在尝试自定义iOS7中导航Controller的导航栏,但标题颜色没有改变。我正在做以下事情:[navigationController.navigationBarsetBarTintColor:[UIColorcolorWithRed:46.0f/256.0fgreen:46.0f/256.0fblue:46.0f/256.0falpha:1]];[navigationController.navigationBarsetTranslucent:NO];[navigationController.navigationBarsetTitleTextAttributes:@{[UIC

objective-c - 在 iOS 7 中自定义导航栏 - 标题颜色不起作用

我正在尝试自定义iOS7中导航Controller的导航栏,但标题颜色没有改变。我正在做以下事情:[navigationController.navigationBarsetBarTintColor:[UIColorcolorWithRed:46.0f/256.0fgreen:46.0f/256.0fblue:46.0f/256.0falpha:1]];[navigationController.navigationBarsetTranslucent:NO];[navigationController.navigationBarsetTitleTextAttributes:@{[UIC

ios - 导航栏的实时模糊效果

如何像iPhone中的Trailersapp一样实现导航栏的实时模糊效果。即当您滚动时,导航栏后面的内容应该变得模糊。请帮我写一些代码。谢谢!我想达到这样的效果:- 最佳答案 Apple推出了新类(class)UIVisualEffectView以及在iOS8.0版本的View上添加半透明和模糊效果。如何使用它来为导航栏或任何其他UIView添加模糊效果:swift5funcaddBlurEffect(){letbounds=self.navigationController?.navigationBar.boundsletvisu

ios - 导航栏的实时模糊效果

如何像iPhone中的Trailersapp一样实现导航栏的实时模糊效果。即当您滚动时,导航栏后面的内容应该变得模糊。请帮我写一些代码。谢谢!我想达到这样的效果:- 最佳答案 Apple推出了新类(class)UIVisualEffectView以及在iOS8.0版本的View上添加半透明和模糊效果。如何使用它来为导航栏或任何其他UIView添加模糊效果:swift5funcaddBlurEffect(){letbounds=self.navigationController?.navigationBar.boundsletvisu