Is it possible on iOS that a view always floats above all other views. I ask this because what I would like to achieve is a view that floats above a ViewController, and then a Modal View Controller slides in, whilst that particular view is still floating over that Modal View Controller (hope you get what I am trying to say).
I am looking to create a system which on signup will create a subdomain on my website for the users account area.
There is. You can add your view to the main window and bring it to front when you have to.
ReplyDeleteIn following code is presumed that _viewConroller and _anotherView are strong properties of appDelegate - configuration could of course be different.
This code would add small blue square on top left corner of the screen.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
_viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
_anotherView = [[UIView alloc] initWithFrame: CGRectMake (0.0,0.0,20.0,20.0)];
[anotherView setBackgroundColor: [UIColor blueColor]];
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
[self.window addSubView: _anotherView];
[self.window bringSubViewToFront: _anotherView]; //not really needed here but it doesn't do any harm
return YES;
}