uinavigationbar

Custom animation when hiding UINavigationBar

两盒软妹~` 提交于 2019-12-04 12:44:08
I'm making an application which shows/hides (in custom animation) the UINavigationBar on single tap. I have created two functions (one for showing and the other for hiding). The function for showing the UINavigationBar works perfectly: - (void) showNavigationBar { [UINavigationBar beginAnimations:@"NavBarFadeIn" context:nil]; self.navigationController.navigationBar.alpha = 0; [UINavigationBar setAnimationCurve:UIViewAnimationCurveEaseIn]; [UINavigationBar setAnimationDuration:0.5]; [UINavigationBar setAnimationTransition:UIViewAnimationOptionTransitionFlipFromTop forView:self

iPhone UINavigationBar change font style for all controllers with [UINavigationBar appearance]

我们两清 提交于 2019-12-04 12:03:49
问题 I'm aware that I can individually change the font of a navigation bar as outlined in this answer: Change the navigation bar's font Currently I'm using a more global approach: //in my app delegate: [[UINavigationBar appearance] setBarStyle:UIBarStyleBlackTranslucent]; Is there a way to globally change the font that the Navbar through the appearance object? thank you! 回答1: From Ray Wenderlich: http://www.raywenderlich.com/4344/user-interface-customization-in-ios-5 // Customize the title text

Strange overlapping bug between navigation and status bars when rotating fullscreen videos in iPad

我们两清 提交于 2019-12-04 11:52:11
I'm implementing a video player inside my application and strange things happen when rotating the iPad when the video player is working in full screen. My test case is kind of easy: 1.- I set orientation to Vertical 2.- I start video playing (non full screen) 3.- I set full screen 4.- I rotate the iPad while in fullscreen and set it to horizontal 5.- I go back to "non full screen" 6.- Navigation and status bar become overlapped overlapped in a very silly way. Look: 7.- Then I rotate the iPad to Vertical again Status and Navigation Bars don't overlap anymore. Look again: 8.- Then I rotate back

How do i remove text from back button on navbar within Xcode?

纵饮孤独 提交于 2019-12-04 11:39:36
问题 I set an arrow custom image to navigation bar by adding the following code in app delegate, it works but now im looking to remove the text completely for back button. UIImage * backButtonImage = [UIImage imageNamed: @"BackButtonGrey.png"]; backButtonImage = [backButtonImage stretchableImageWithLeftCapWidth: 15.0 topCapHeight: 30.0]; [[UIBarButtonItem appearance] setBackButtonBackgroundImage: backButtonImage forState: UIControlStateNormal barMetrics: UIBarMetricsDefault]; 回答1: I just did it

iOS 11: Height of UINavigationBar for large title (mimic Apple Music App)

丶灬走出姿态 提交于 2019-12-04 11:19:31
I'm trying to mimic the look of UINavigationBar as used by the Apple Music App (the date is shown above the large title). I know that the Apple Music App doesn't use the standard UINavigationBar of ios11 but a header view is UICollectionView . I also want to use the standard UINavigationBar of ios11 because of the resizing feature for title text. I'm able to add the custom date label to view hierarchy of the large title view , my code as shown below: self.title = "Large Title" navigationController?.navigationBar.prefersLargeTitles = true guard let navigationBar = navigationController?

iOS: Monotouch bindings for Appearance on Bar Style missing?

醉酒当歌 提交于 2019-12-04 11:14:34
I'm trying to convert this to Monotouch C#: [[UINavigationBar appearance] setBarStyle:UIBarStyleBlackOpaque]; But on the Appearance object there doesn't seem to be a Bar Style. Is there a work around or alternative access point? This property is not decorated with UI_APPEARANCE_SELECTOR in the Objective-C header files. The initial MonoTouch Appearance work was based on that documentation (but we added more cases over time). However the way Apple implement it's appearance support allows a lot of undocumented things will work (and hopefully continue to work if Apple change it's internal

Navigation bar with large title shrinks when webview is loaded

好久不见. 提交于 2019-12-04 11:00:37
In viewcontroller, I'm loading a webview(WKWebview) with large navigation title enabled. The problem is its showing the large navigation bar and title perfectly before the webview gets loaded once the webview got loaded it shrinks to normal. Anyhelp would be appreciated. Thanks in advance...! Swift4, Swift5 : The reason of this issue is your navigationBar height is changing when you webView starts loading the page. so using viewLayoutMarginsDidChange() we can change navigationBar height. viewLayoutMarginsDidChange() Called to notify the view controller that the layout margins of its root view

How to properly build a navigation menu that highlights the current page

大城市里の小女人 提交于 2019-12-04 09:48:16
问题 I've setup a menu for a fairly simple site based on icant.co.uk. It's fairly simple with maybe 5 pages. The small site is mainly a mysql browser for a few tables using MATE. Theres a common.php file that contains the header & footer HTML so thats where I put the code below. The code below highlights the current page on the menu. Its ugly and I'm sure there has to be a better way to do it. Any help is appreciated, thank you! heres my code <?php $currentFile = Explode('/', $_SERVER["PHP_SELF"])

Add title and image to navigationbar

帅比萌擦擦* 提交于 2019-12-04 09:15:25
I need so set the name of the UIViewController and an image to the navigationBar. So far I am able to display the image, but the title is of course missing. // show image UIImage *image = [UIImage imageNamed: @"bar_icon.png"]; UIImageView *imageView = [[UIImageView alloc] initWithImage: image]; imageView.frame = CGRectMake(0, 0, 40, 40); self.navigationItem.titleView = imageView; [imageView release]; Thanks for your help, BR, doonot // show image UIImage *image = [UIImage imageNamed: @"bar_icon.png"]; UIImageView *imageView = [[UIImageView alloc] initWithImage: image]; imageView.frame =

iOS 7: modal view controller status bar is wrong color but normal view controllers are correct

≯℡__Kan透↙ 提交于 2019-12-04 09:00:27
问题 I have an issue in iOS7 where a normal UINavigationController pushed view controller has the correct status bar text color for the UINavigationController navbar color (which is a light gray, almost white so the status bar text is black). However, when a "modal" view controller is presented using -presentViewController:animated:completion: , the status bar text color is changed to white and is very hard to see given the color of the navbar. Navbar color is always the same across the whole app