2010-08-04 41 views
1

我目前正在創建一個需要非常漂亮的轉換的應用程序。我希望能夠;iPhone SDK - CoreAnimation ViewController轉換,從右側翻轉EDGE

調用我的[self presentModalViewControllerAnimated:YES];並且,我不想使用CrossDissolve,Generic Flip或CoverVertical,我想使用CoreAnimation強制它從右邊翻轉。注意正常的翻蓋是如何使用中軸的?那麼,我想從中心移動到右邊緣,給翻轉更多的「在你臉上」的效果,類似於ZuneHD的用戶界面。

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { 
    if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) 
{ 
      self.wantsFullScreenLayout = YES; // we want to overlap the status bar.   
    // when presented, we want to display using a cross dissolve 
    self.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; 
} 
    return self; 
} 

我是如何獲得ViewController的轉換集。如果可能的話,我想在這裏設置CoreAnimation右邊緣翻轉。

如果微軟能夠做到這一點,它必須在iPhone上成爲可能。誰能幫我?

+1

手動執行此動畫可能是可能的,但使用presentModalViewControllerAnimated:當然不可能實現:假定轉換樣式由枚舉指定。 – 2010-08-04 02:26:41

回答

0

如果我沒有記錯的話,anchorPoint或anchorPointZ定義了旋轉發生的軸。我在開源的「OpenFlow」項目中閱讀了一些使用類似的代碼。希望這可以幫助。

+0

是啊...似乎只是一個普通的UIView,我需要這個適用於ViewController,雖然...我完全卡在它上面。 儘管感謝您的幫助! :-) – topLayoutGuide 2010-08-08 08:10:19