I want to show a logo UIView
always on top when the app running,
I know there is a way to do that,add same UIView
to every UIViewController
,
but I think this is not the best way to do that.
when i have lot of pages,and modify the logo UIView
,must modify it every page.
Did someone have better way to do this? thanks.
look like this:
Since you only every have one window per app, and view's don't have levels, you have to make sure that view stays on top of the hierarchy, no matter what. One relatively easy way is to add it directly to the window above the rest of the interface (the navigation controller):
In applicationDidLaunch:
// After the main navigation controller or tab controller has been added
// either programmatically or in the xib:
UIImage *logo = [UIImage imageNamed:@"logo.png"];
UIImageView *logoView = [[UIImageView alloc] initWithImage:logo];
[self.window addSubview:logoView];