UIApplication

1, statusBar

//to obtain the statusBar frame

[[UIApplication sharedApplication] statusBarFrame];




//hidden statusBar

[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];




//when you app will run at crosswise ,if you want hidden statusBar, you must do this

//this will have a crosswise keyboard

[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight|UIInterfaceOrientationLandscapeLeft];



2, delegate

+ (AppDelegate *)sharedAppDelegate

{

    return (AppDelegate *) [UIApplication sharedApplication].delegate;

}

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章