uinavigationbar

iOS Navbar starts as a small instead of large iOS 11 style

孤人 提交于 2019-12-13 03:25:40
问题 When I launch my app, my Navbar automatically starts as a small one, but I have specified in my code to use large navigation bars: navigationController?.navigationBar.prefersLargeTitles = true , I'm using a collectionView in the same ViewController. Every time I launch my app I have to scroll down to get the iOS 11 style Navbar to appear. What could cause this problem? Result when I launch my app: Result when I slide down and what it should look like when the app initially launches Storyboard

Remove UINavigationBar background and preserve shadow

送分小仙女□ 提交于 2019-12-13 03:03:32
问题 Flickr has a gorgeous Settings view controller (even if they put the close button on the wrong side!) and I want to know how I can achieve a similar effect. Notice the navigation controller does not have a background but it does have a shadow line underneath it to provide separation. The underlying blurred view fills the entire display including underneath the status bar. How would you achieve that - how could you remove the background of the UINavigationBar ? Note you can't simply remove the

UINavigation Title color change issue

让人想犯罪 __ 提交于 2019-12-13 02:31:28
问题 I am facing the navigation title color not change when I pop controller. Please find the below code. ProfilescreenVC.swift override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) self.navigationController?.navigationBar.tintColor = UIColor.white self.navigationController?.navigationBar.barTintColor = UIColor.primaryGreen let textAttributes = [NSAttributedStringKey.foregroundColor:UIColor.white] self.navigationController?.navigationBar.titleTextAttributes =

Is it possible to programatically disable 'Button Shapes' in iOS 7.1?

我的未来我决定 提交于 2019-12-13 02:29:49
问题 As the title states, is it possible to disable it? Granted this may not be a user-friendly thing to do but it does mess with the design of some of my apps. 回答1: I know of no way to do this short of reimplementing the UIKit controls that you want to have ignore the setting. Please, please consider changing your design rather than attempt to subvert system settings. Button Shapes is an Accessibility setting for a reason: some users rely on this sort of thing to use apps at all, not just to

How to set custom font and weight (style) to UInavigationbar title

爱⌒轻易说出口 提交于 2019-12-12 23:35:42
问题 How to set custom font name and custom font weight (font style) for UINavigationBar title? 回答1: Try this code. Swift 3x This could be a better approach to set nanvigationBar title font and Style. navigationController?.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName:UIColor.ANY COLOUR, NSFontAttributeName:UIFont(name:"FontName-FontStyle", size: ANY SIZE)!] Some Font Styles: Regular,Bold,BoldItalic,CondensedBlack,CondensedBold,Italic,Light,LightItalic,Thin,ThinItalic

setNavigationBarHidden with animation not working on iPad

微笑、不失礼 提交于 2019-12-12 23:07:33
问题 I use the following code in my app when user click on a button : [self.navigationController setNavigationBarHidden:NO animated:YES]; The appearance animates normally on iPhone but not on iPad. Do you know why ? 回答1: The best solution here may be to put self.navigationBar.hidden = NO; in the -viewWillAppear: method of the UIViewController where you dont wish to have the bar perpetually hidden. EDIT: i found this, may help you; if( UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad ) { CGRect

How to remove unwanted black area during navigation bar animation. Screen shots

可紊 提交于 2019-12-12 22:13:38
问题 I have a view controller, in which the navigation bar is transparent. My next view is a table view, in which the navigation bar is white. To stop an unwanted animation carrying over, I am setting the navigation bar to transparent in the 'viewDidDissapear' of the table view. Unfortunately this leaves me with the image below when I navigate back (its even worse when you navigate forward). Does anyone know how to get rid of the black area? -(void)viewWillDisappear:(BOOL)animated { [self

How to make the height of the div take all the space?

人走茶凉 提交于 2019-12-12 19:56:51
问题 Here is my css rule together with the markup: <div style = "height:100%;"> <div style = "width:220px; margin-left: 200px;font-size:16px; height:auto;"> <div class='navbar-inner'> <div class='container'> <ul class="nav nav-list"> <div> <li <?php if($page == 'upload_track'){ echo "class = \"active\""; }?>><a href = "#">Upload a new Track</a></li> <li><a href = "#">View all blog post</a></li> <li><a href = "#">View all tracks uploaded</a></li> </div> </ul> </div> </div> </div> <div style =

Navigation bar flashes black on performing popViewController

牧云@^-^@ 提交于 2019-12-12 19:07:11
问题 My app requires Pop animation in reverse direction.It's deployment target is IOS 7 only. So ,I have implemented TRVSNavigationControllerTransition api. I have default translucent navigation bar. It get popped successfully but flashed black at time of animation. I have attached image of how actually it is being displayed. Any help appreciated. Thanks, Bazinga. 回答1: Okay so below is the solution I used to manage the situation . To Push in reverse (i.e. from Left to Right) CATransition

UILabel text not changing, however xx.title is working

浪子不回头ぞ 提交于 2019-12-12 12:29:19
问题 I have two view controller. In first view controller I have list of names. When I click on that, I want the same name to be displayed in second view controller. I have below code. -(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { // PropDetailViewController is second view controller PropDetailViewController *prop = [self.storyboard instantiateViewControllerWithIdentifier:@"prop"]; ListOfProperty *propList = [propListFinal objectAtIndex:indexPath.row