2014-06-25 80 views
1

如果在設置包中顯示子視圖設置視圖模態可能,它是如何實現的? 我曾看過Apple的文檔「首選項和設置編程指南」,但只發現瞭如何將其推入導航堆棧的說明。當前設置兒童視圖模態

基本上,我試圖實現與下面的Facebook設置包中相同的彈出視圖。還是它是Apple私有API的一部分?

enter image description here

+2

這是私有API的一部分:( –

+0

如果您打算展示蘋果的設置畫面,它不是http://stackoverflow.com/questions/5655674/opening-the-settings-的possible.Possible重複應用程序從另一個應用程序 – Krishnan

+0

這就是我想:/但無論如何感謝您的時間 –

回答

0

請參考下面的代碼。你會發現它從屏幕下方到屏幕中間顯示動畫。

YourViewController *viewController = [[YourViewController alloc] init]; 
    [viewController.view setFrame:CGRectMake(0, -(CGRectGetHeight(viewController.view.frame)), CGRectGetWidth(viewController.view.frame), CGRectGetHeight(self.view.frame))]; 

    [self.view addSubview:viewController.view]; 
    [UIView animateWithDuration:0.8 animations:^{ 

     [viewController.view setFrame:CGRectMake(0, 0, CGRectGetWidth(viewController.view.frame), CGRectGetHeight(viewController.view.frame))]; 

    } completion:^(BOOL finished) { 
     [self.navigationController pushViewController:viewController animated:NO]; 
    }]; 
+0

感謝您的時間,但它不是我想要的。不幸的是,我想要的是私人API的一部分: ( –

+0

@Flyingbinary ohhhh好的。 –