Note that there are some explanatory texts on larger screens.

plurals
  1. POapplication life cycle issue
    primarykey
    data
    text
    <p>i have made changes in navigation bar means i have increasd the height of navigation bar &amp; made some custom changes,it works fine but when i minimizes the application and again maximize it, it shows only original height that is what changes i made, those not works after minimization, my code is </p> <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { NSLog(@" i m in didFinishLaunchingWithOptions" ); [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"TopHeader"] forBarMetrics:UIBarMetricsDefault]; [[UINavigationBar appearance] setFrame:CGRectMake(0, 0, 320, 55)]; [[UINavigationBar appearance] setTitleVerticalPositionAdjustment:(-15.0) forBarMetrics:UIBarMetricsDefault]; [[UINavigationBar appearance] setTitleTextAttributes: [NSDictionary dictionaryWithObjectsAndKeys: [UIColor colorWithRed:245.0/255.0 green:245.0/255.0 blue:245.0/255.0 alpha:1.0], UITextAttributeTextColor, [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.8],UITextAttributeTextShadowColor, [NSValue valueWithUIOffset:UIOffsetMake(0, 1)], UITextAttributeTextShadowOffset, [UIFont fontWithName:@"HelveticaNeue-CondensedBlack" size:16.0], UITextAttributeFont, nil]]; return YES; } </code></pre> <p>after maximize it goes to <code>applicationDidBecomeActive</code> thats why i put above code in <code>applicationDidBecomeActive</code> but its not working, why this is happening?<br> before minimize<br> <img src="https://i.stack.imgur.com/92xUK.png" alt="enter image description here"><br> after minimize &amp; maximize again it looks like below i.e. height again automatically sets to 44.<br> <img src="https://i.stack.imgur.com/vhg3n.png" alt="enter image description here"> </p> <p>Update: i written following code in <code>applicationWillEnterForeground</code> </p> <pre><code>- (void)applicationWillEnterForeground:(UIApplication *)application { UINavigationController *my=(UINavigationController * )self.window.rootViewController; UINavigationBar *navigationBar = [my navigationBar]; CGRect frame = [navigationBar frame]; frame.size.height = 55.0f; [navigationBar setFrame:frame]; NSLog(@" i m in applicationWillEnterForeground" ); } </code></pre> <p>at the time of debugging when i writes its description it shows that height is 55. but on screen it still looks like second image. why this is happening.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload