I am making an app and was asked to put in a logo over the navigation bar, but also reaching outside the borders of the bar, covering part of my view. This is how it's exactly supposed to be placed (the white circle is the logo).
Due to complicated view controllers structure in this app I want to use UINavigationController, but it seems it could make placing the logo a bit more problematic.
What's a good way to do this? (since obviously putting logo as title image of navigation bar is out of the question due to weird placement)
I was thinking about either making it a subview of keyWindow or of the navigationController.view. Can the first one cause my app to be rejected by Apple?
If you want to add an image from a UIViewController
not from a subclass of UINavigationController
you can do something like this:
-(void)addImageOnTopOfTheNavigationBar {
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"yourImage"]];
imageView.frame = CGRectMake(....); //set the proper frame here
[self.navigationController.view addSubview:imageView];
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With