uinavigationbar

How do I change UINavigationBar height programmatically?

风流意气都作罢 提交于 2019-12-08 11:28:19
问题 How to change UINavigationBar height with code int iOS8 swift? I've tried using: UINavigationBar.resizableSnapshotViewFromRect UINavigationBar.drawViewHierarchyInRect UINavigationBar.frameForAlignmentRect None of these seem to accomplish this. 回答1: Here is example for you: import UIKit class BaseViewConroller: UIViewController { var navBar:UINavigationBar=UINavigationBar() override func viewDidLoad() { super.viewDidLoad() setNavBarToTheView() // Do any additional setup after loading the view.

iPad landscape single navigation bar

风流意气都作罢 提交于 2019-12-08 09:30:54
问题 My app in iPad mode and landscape calls for a single navigation bar its proving troublesome. The idea is that in landscape there wouldnt be 2 separate nav bars for Master and Detail : see below (Images taken from Google Images and modified, not my project) but instead there would be a single nav bar, like so: I'm trying to avoid very hackish methods because my navs use a lot of custom stylings but the only way I can think at the moment is to resize the view in the SplitView superclass and

How to show Navigation Bar with Touch Near Top of Screen?

╄→尐↘猪︶ㄣ 提交于 2019-12-08 09:21:18
问题 What I want to do is have the navigation bar hidden at first, and then if the user touches the top of the screen (where it should be) the navigation bar will show for about 1 second or two and disappear. I tried adding a button that was the same color as the background and then when that is touched show the navigation bar, but that doesn't seem to be working. Also how would I do a demo so I could show the user that this works? Thanks! 回答1: first hide the navigation bar in the app delegate

On NavBar Swipe Hide, HeaderCell creates a Transparent Gap and Content Appears Through

半城伤御伤魂 提交于 2019-12-08 08:34:39
问题 I have a Header Cell and Content Cell.. Also, I have a NavBar that -- Status Bar -- -- NavBar -- - Header Cell - -- Content Cells - Until now, everything seems fine. Then I turned on Hide NavBar on Swipe. Everything was working perfect until Content Cells' views appear for a blink of an eye above the Header Cell. I gave Status Bar and Header Cell color to understand what was exactly causing the problem. I couldn't take a clear picture but the problem is : Header Cell takes a while to get

iOS 7 Status Bar Turns Black When Overriding UINavigationBar

人走茶凉 提交于 2019-12-08 08:19:17
问题 I am subclassing the UINavigationBar so that I can override the drawRect method. However, when I do so in iOS 7, the status bar becomes completely black. No text at all. In iOS 6 it doesn't have that problem; the status bar is where it should be. - (void)drawRect:(CGRect)rect // status bar goes pitch black { [super drawRect:rect]; } If I comment out this method, the status bar returns. How can I get the status bar back? UPDATE Apr 15, 2014 I tried to set the status bar to something else using

How to FULLY re-enable back/left swipe gesture in UINavigationController after unwind from popped view?

可紊 提交于 2019-12-08 08:16:52
问题 After unwind from a popped view, my back/left swipe gesture is gone. I fixed by: override func viewDidLoad() { super.viewDidLoad() reenableSwipeBack() } func reenableSwipeBack() { self.navigationController?.interactivePopGestureRecognizer?.isEnabled = true; self.navigationController?.interactivePopGestureRecognizer?.delegate = nil; } My swipe gesture is back but without animation (Shown here (Giphy)). How can I get the gesture animation back? 来源: https://stackoverflow.com/questions/45268086

Aspect Fill on navigation bar image?

余生长醉 提交于 2019-12-08 04:41:01
问题 I'm wanting to achieve the same look as an imageView's aspect fill for my navigation controller's background image. Currently I'm using this to setup the image: UINavigationBar.appearance().setBackgroundImage(imageToCache?.resizableImage(withCapInsets: UIEdgeInsetsMake(0, 0, 0, 0), resizingMode: UIImageResizingMode.stretch), for: .default) UIImageResizingMode.stretch obviously gives me a nasty stretched look. I don't care if the image is getting cut off on the top/bottom, I'm just needing it

BackBarButtonItem shows navbar title on it and updates each time when page is turned over

人盡茶涼 提交于 2019-12-08 04:22:03
问题 On first Push of ViewController it shows navbar title and backbarbuttonitem but when i turn page over nav bar title gets updated which is good as per requirement but at the same time navbar title reflects on the backbarbuttonitem and gets updated each time when i turn page over To perform the PDF Segue. Here is my code for reference - (IBAction)ReadAction:(id)sender { [self performSegueWithIdentifier:@"MySegue" sender:sender]; } - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id

How can i add a next and previous button at the segmented Controller on a navigation bar in iphone application development?

孤人 提交于 2019-12-08 04:03:42
问题 I am in great trouble....How can i set next and previous button/arrow at my segmented bar...if anyone need brief about my problem then please see this link...How can i add a next and previous button at the segmented Controller? i have attached an image to understand the problem...so anybody help me please.... NOTE THAT: In my current project it has more than 5 buttons to add at the segmented bar so when i will press next/previous arrow then segmented bar should be move from his place.If my

Subclassing UINavigationBar in Xcode

主宰稳场 提交于 2019-12-08 03:18:30
问题 I want to apply a custom alpha value to the title of the UINavigationBar . The UINavigationBar is part of the UINavigationController and the UINavigationController is part of a UITabBarController . Edit: Here is a picture of what I created using a UIToolbar and a UILabel. I want to do the same using the title in the UINavigationController: http://i.stack.imgur.com/B8YX0.png I think the only way to accomplish this would be to subclass the UINavigationBar and override a method that allows me to