4
我有和問題與UIInterpolatingMotionEffect
類,應用程序編譯,但是當我試圖存檔我得到這個編譯錯誤:爲「UIInterpolatingMotionEffect」不可見@interface聲明選擇「initWithKeyPath:類型:」
No visible @interface for 'UIInterpolatingMotionEffect' declares the selector 'initWithKeyPath:type:'
我得到這個錯誤對UIInterpolatingMotionEffect
這個功能initialisers:
- (void)addMotionEffects
{
UIInterpolatingMotionEffect *horizontalMotionEffect = [[UIInterpolatingMotionEffect alloc]
initWithKeyPath:@"center.x" type:UIInterpolatingMotionEffectTypeTiltAlongHorizontalAxis];
horizontalMotionEffect.minimumRelativeValue = @(-20);
horizontalMotionEffect.maximumRelativeValue = @(20);
UIInterpolatingMotionEffect *verticalMotionEffect = [[UIInterpolatingMotionEffect alloc]
initWithKeyPath:@"center.y" type:UIInterpolatingMotionEffectTypeTiltAlongVerticalAxis];
verticalMotionEffect.minimumRelativeValue = @(-20);
verticalMotionEffect.maximumRelativeValue = @(20);
UIMotionEffectGroup *group = [UIMotionEffectGroup new];
group.motionEffects = @[horizontalMotionEffect, verticalMotionEffect];
[self.containerView addMotionEffect:group];
}
我認爲這是一種錯誤的嘗試編譯arm64架構的時候,但我無法弄清楚如何解決問題。
任何想法?
你是否建設以支持iOS 6以及,偶然? – 2014-11-25 10:43:29
Nop,部署目標是iOS7和基礎SDK iOS8.1 – jberlana 2014-11-25 10:45:47
可能這個鏈接會幫助你.. http://www.teehanlax.com/blog/introduction-to-uimotioneffect/ – iMash 2014-11-25 12:34:31