uinavigationcontroller

Ipad NavigationBar Landscape Issue

时光总嘲笑我的痴心妄想 提交于 2020-01-05 08:17:36
问题 is there a way to use a different images for the ipad landscape/portrait mode? My navigationbar contains a logo in the middle and while it works great on the iphone with different images, I can't use different images for the iPad so the logo isn't centered when you turn the device. Alternatively, I can use a plain background image and maybe replace the navigation bar title with an image or center a button but I also couldn't manage to do that either. (I don't have a UINavigationController

Could not cast value of type 'UINavigationController' to 'jacrs_ios.TopViewController'

人盡茶涼 提交于 2020-01-05 05:42:06
问题 I'm new to Swift and I was trying to make a side menu base on the tutorial that I was following but I ran across with this error. "Could not cast value of type 'UINavigationController' (0x1026054a8) to 'jacrs_ios.TopViewController' (0x1009ac510)." I noticed that there were same problems already existing here but I still dont understand. I'm gonna included the current storyboard in case I did something wrong. Thanks. ViewController Error override func prepare(for segue: UIStoryboardSegue,

SearchBar in NavigationBar IOS 11

☆樱花仙子☆ 提交于 2020-01-05 04:40:50
问题 I tried using Navigation Bar Large Title and adding Search Bar to Navigation Controller. The Search Bar is displayed under the Navigation title. It should be hidden until I swipe down. I understand that the default behavior is hidden unless I set "navigationItem.hidesSearchBarWhenScrolling = false". Even I add "navigationItem.hidesSearchBarWhenScrolling = true", it doesn't work. I created a new app to test this function. It has ViewController and Navigation Controller embedded. Below is my

How to add shadow to UINavigationController

喜夏-厌秋 提交于 2020-01-04 11:11:41
问题 I want to create a Slide Menu like in Path or Facebook with a shadow between my menu and the UINavigationController with all the content inside. I can add rounded corners to the layer but the shadow I apply to the layer is not shown. What is wrong with that code? It is working if I use a UIViewController instead of the UINavigationController... (The code is inside a view added as rootViewController to the UINavigationController) The problem is that I don't want to loose the rounded borders of

How to add shadow to UINavigationController

左心房为你撑大大i 提交于 2020-01-04 11:11:13
问题 I want to create a Slide Menu like in Path or Facebook with a shadow between my menu and the UINavigationController with all the content inside. I can add rounded corners to the layer but the shadow I apply to the layer is not shown. What is wrong with that code? It is working if I use a UIViewController instead of the UINavigationController... (The code is inside a view added as rootViewController to the UINavigationController) The problem is that I don't want to loose the rounded borders of

How can I make a UINavigationController's UINavigationBar invisible or at least change color

一个人想着一个人 提交于 2020-01-04 09:08:09
问题 I have a UINavigationController that is Linked to a ViewController that is set as RootController. I have enabled the UINavigationBar and put 3 UIViews each with a UIButton inside. Ideally I would like to make the UINavigationBar completely invisible, but I would also settle for setting the color to the background color of my ViewController. I am working in swift and I have tried things like self.navigationBar.setBackgroundImage(UIImage(), forBarMetrics: UIBarMetrics.Default) self

How do I preserve the frame of a UIScrollView upon entering foreground?

江枫思渺然 提交于 2020-01-04 06:55:29
问题 This question discusses how to create gaps between views in a UIScrollView. The agreed method is to increase the width of UIScrollView's frame to create gaps between the views which will be scrolled past. However when the scroll view is a subview of a UINavigationController an issue arises. The UINavigationController changes the frame of the UIScrollView after it has been set up in -viewDidLoad . The solution proposed is to alter the frame size in -viewDidAppear , at which point

Custom uinavigatonbar exception

只愿长相守 提交于 2020-01-04 06:20:27
问题 I've made a custom uinavigation bar this way: @implementation UINavigationBar (UINavigationBarCategory) - (void)drawRect:(CGRect)rect { UIImage *img = [UIImage imageNamed: @"navigation_background.png"]; [img drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)]; } @end Now I'd like to add exception to show the normal uinavigation bar when i load an specific viewcontroller into de navigationcontroller. How can I code that exception? 回答1: I don't think that's possible with

Custom uinavigatonbar exception

旧街凉风 提交于 2020-01-04 06:20:25
问题 I've made a custom uinavigation bar this way: @implementation UINavigationBar (UINavigationBarCategory) - (void)drawRect:(CGRect)rect { UIImage *img = [UIImage imageNamed: @"navigation_background.png"]; [img drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)]; } @end Now I'd like to add exception to show the normal uinavigation bar when i load an specific viewcontroller into de navigationcontroller. How can I code that exception? 回答1: I don't think that's possible with

iOS5 - Storyboard - Multiple Segues from Navigation Controller

北城以北 提交于 2020-01-04 05:42:04
问题 I have been working with iOS5 on an app for a client, and I need to execute a different segue dynamically from a UINavigationController based on a state of the tableviewcell. If you see the storyboard (attached here http://www.online.com.bo/apple/multinavigationsegues.png), basicaly there is 2 segues generated from the navigation controller, I need to "bypass" the navigation controller to execute one of the segues, but I'm not sure how. Attached is the code I have on the ROOT tableview