View switcher on the toolbar
BIDAppDelegate.h
#import <UIKit/UIKit.h>@class bidswitchviewcontroller; @interface Bidappdelegate:uiresponder <UIApplicationDelegate>**Switchviewcontroller; @end
Bidappdelegate.m
#import "BIDAppDelegate.h"#import "BIDSwitchViewController.h"@implementationbidappdelegate-(BOOL) Application: (UIApplication *) application didfinishlaunchingwithoptions: (Nsdictionary *) launchoptions{Self.window=[[UIWindow alloc] initwithframe:[[uiscreen mainscreen] bounds]; //Override point for customization after application launch.Self.switchviewcontroller=[[Bidswitchviewcontroller alloc] Initwithnibname:@"SwitchView"Bundle:nil]; UIView*switchview = Self.switchViewController.view;//get the view managed by the controllerCGRect switchviewframe = switchview.frame;//get a view of X,y,width,heightSWITCHVIEWFRAME.ORIGIN.Y + =[UIApplication sharedapplication].statusbarframe.size.height; //set height is under StatusBarSwitchview.frame =Switchviewframe; [Self.window Addsubview:switchview]; //add view to WindowSelf.window.backgroundColor=[Uicolor Whitecolor]; [Self.window makekeyandvisible]; returnYES;}- (void) Applicationwillresignactive: (UIApplication *) application{//Sent when the application are about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as a incoming phone call or SMS message) or when the US Er quits the application and it begins the transition to the background state. //Use the This method to the pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.}- (void) Applicationdidenterbackground: (UIApplication *) application{//Use the method to release the shared resources, save user data, invalidate timers, and store enough application state in Formation to the restore your application to the it is terminated later. //If Your application supports background execution, this method is called instead of Applicationwillterminate:when th E user quits.}- (void) Applicationwillenterforeground: (UIApplication *) application{//Called as part of the transition from the background to the inactive state; Here you can undo many of the changes mad E on entering the background.}- (void) Applicationdidbecomeactive: (UIApplication *) application{//Restart Any tasks this were paused (or not yet started) while the application is inactive. If the application is previously in the background, optionally refresh the user interface.}- (void) Applicationwillterminate: (UIApplication *) application{//Called when the application are about to terminate. Save data if appropriate. See also Applicationdidenterbackground:.}@end
BIDSwitchViewController.h
#import <UIKit/UIKit.h>@class bidyellowviewcontroller; @class Bidblueviewcontroller; @interface **Blueviewcontroller; -(Ibaction) Switchviews: (ID) sender; @end
Bidswitchviewcontroller.m
Pending