2010-10-04 38 views
1

我知道這已被問了一千次,人們會說@pagecurl會被拒絕。PAGECURL ANIMATION SUBTYPE

我試着與客戶推理,但他們堅持他們希望推入與該功能的應用程序,它將有機會不被拒絕。

問題是,如果我嘗試animation.subtype,動畫將不會聽它。也就是說,如果我在橫向上具有定位模式,即使嘗試設置動畫子類型,頁面捲曲也會從其他位置開始。

任何人都知道我能做些什麼嗎?

的代碼如下:

CATransition *animation = [CATransition animation]; 
    [animation setDelegate:self]; 
    // animation.subtype = kCATransitionFromTop; 

    if(rotation == UIInterfaceOrientationPortraitUpsideDown){ 
    animation.subtype = kCATransitionFromLeft; 
    }else if(rotation == UIInterfaceOrientationPortrait){ 
    animation.subtype = kCATransitionFromRight; 
    }else if(rotation == UIInterfaceOrientationLandscapeRight){ 
    animation.subtype = .... 
    }else if(rotation == UIInterfaceOrientationLandscapeLeft){ 

    animation.subtype = .... 
} 

animation setDuration:0.35]; 
     [animation setTimingFunction:UIViewAnimationCurveEaseInOut]; 
     animation.type = @"pageCurl"; 

頂部2似乎工作,但是當取向在橫向模式我不能改變它。

非常感謝。

回答

0

有沒有私人的API這樣做的方法,我自己建立一個允許我使用任何UIView,而不僅僅是一個具有頁面捲曲效果的CALayer。你最好的選擇是使用Github的Leaves或PageCurl。它們預先計劃用於圖像,PDF和簡單圖形。