Putting a large logo on UINavigationBar as the title view - iOS
By : sujith chappidi
Date : March 29 2020, 07:55 AM
it should still fix some issue Here is a post with a similar situation. The accepted answer used a UIButton instead of an imageview. Code from accepted answer: code :
- (void)viewDidLoad {
[super viewDidLoad];
UIButton *logoView = [[[UIButton alloc] initWithFrame:CGRectMake(0,0,85,40)] autorelease];
[logoView setBackgroundImage:[UIImage imageNamed:@"navBarLogo.png"] forState:UIControlStateNormal];
[logoView setUserInteractionEnabled:NO];
self.navigationItem.titleView = logoView;
}
|
Showing a white UINavigationBar for MFMailComposer with custom UINavigationBar themes in the app
By : Greendield
Date : March 29 2020, 07:55 AM
will help you To fill UINavigationBar with color you can use backgroundImage property with blank shadow image: code :
[[UINavigationBar appearance] setBackgroundImage:[self imageWithColor:[UIColor whiteColor]] forBarMetrics:UIBarMetricsDefault];
[[UINavigationBar appearance] setShadowImage:[[UIImage alloc] init]];
- (UIImage *)imageWithColor:(UIColor *)color {
CGRect rect = CGRectMake(0.0f, 0.0f, 1.0f, 1.0f);
UIGraphicsBeginImageContext(rect.size);
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetFillColorWithColor(context, [color CGColor]);
CGContextFillRect(context, rect);
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return image;
}
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];
[[UINavigationBar appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor blackColor]}];
|
Custom height for UINavigationBar or alternative of UINavigationBar
By : reethureddy kunta
Date : March 29 2020, 07:55 AM
This might help you You can use your custom view as your navigation bar. Customize view as per your requirement and hide the default navigation bar as code :
[self.navigationController setNavigationBarHidden:YES];
[self.navigationController popViewControllerAnimated:YES];
|
How to allow custom logo image upload if logo is on home page, not in header?
By : Chrisos
Date : March 29 2020, 07:55 AM
|
Default UINavigationBar titleView frame incorrect after custom UINavigationBar display
By : Doran Gray
Date : March 29 2020, 07:55 AM
help you fix your problem I solved this issue by re-setting the navigation bar with a new instance of UINavigationBar!
|