cyclingIsBetter
cyclingIsBetter

Reputation: 17591

IOS: UIView ever visible

In my app I want to set a UIView (called "functionView") ever visible in my app, and when I change view controller it should stay ever in its position. I show you an example:

enter image description here

as you can see view function is ever in its position and it shouldn't change its position.

Can I do set this view from appDelegate? and how I can control it? Can I use a class (subclass of UIView)?

**IMPORTANT: it shouldn't be a tab bar but a view that with animation can move over view controller

thanks

Upvotes: 0

Views: 119

Answers (2)

wattson12
wattson12

Reputation: 11174

You should use a container view controller, which contains the functionview, and a view controller for the first and second views

you will need to manage the navigation/transition logic inside this view controller

this question has a link to a good WWDC video and a blog post about this: Container View Controller Examples

Upvotes: 3

A-Live
A-Live

Reputation: 8944

You can add subview to the main window of the application instead of the root viewController:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
//...
    [window addSubview:functionView];
//...

Upvotes: 2

Related Questions