你好,歡迎來到IOS教程網

 Ios教程網 >> IOS編程開發 >> IOS開發綜合 >> IOS UI 第四篇:基本UI

IOS UI 第四篇:基本UI

編輯:IOS開發綜合
ViewController 應用     再第一個XIB頁面創建另一個XIB頁面,並且通過按鈕調用它     - (IBAction)GoSecond:(id)sender {     secondViewController *secVC = [[secondViewController alloc] initWithNibName:@"secondViewController" bundle:nil];     secVC.modalTransitionStyle = UIModalPresentationPageSheet;     [self presentViewController:secVC animated:YES completion:^{         NSLog(@"success ");     }]; }   在第二個XIB頁面創建一個按鈕,按鈕PRESS返回第一個頁面     - (IBAction)Backfirst:(id)sender {     [self dismissViewControllerAnimated:YES completion:^{         NSLog(@"dismiss");     }]; }     創造生命周期函數:     -(void)viewWillAppear:(BOOL)animated{     [super viewWillAppear:animated];     NSLog(@"view will appear"); } -(void)viewDidAppear:(BOOL)animated{     [super viewDidAppear:animated];     NSLog(@"view did appear"); } -(void)viewWillDisappear:(BOOL)animated{     [super viewWillDisappear:animated];     NSLog(@"view will disappear"); } -(void)viewDidDisappear:(BOOL)animated{     [super viewDidDisappear:animated];     NSLog(@"view did disappear"); }     頁面切換方法:          secVC.modalTransitionStyle = UIModalPresentationPageSheet;     UIModalPresentationFullScreen = 0, #if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_3_2     UIModalPresentationPageSheet,     UIModalPresentationFormSheet,     UIModalPresentationCurrentContext, #endif #if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_7_0     UIModalPresentationCustom,     UIModalPresentationNone = -1,   
  1. 上一頁:
  2. 下一頁:
蘋果刷機越獄教程| IOS教程問題解答| IOS技巧綜合| IOS7技巧| IOS8教程
Copyright © Ios教程網 All Rights Reserved