Built-in shaking effects of ios7 and built-in shaking effects of ios7
Built-in shaking effect of ios7
By Wu xueying
- (void)registerEffectForView:(UIView *)aView depth:(CGFloat)depth;{ UIInterpolatingMotionEffect *effectX; UIInterpolatingMotionEffect *effectY; effectX = [[UIInterpolatingMotionEffect alloc] initWithKeyPath:@"center.x" type:UIInterpolatingMotionEffectTypeTiltAlongHorizontalAxis]; effectY = [[UIInterpolatingMotionEffect alloc] initWithKeyPath:@"center.y" type:UIInterpolatingMotionEffectTypeTiltAlongVerticalAxis]; effectX.maximumRelativeValue = @(depth); effectX.minimumRelativeValue = @(-depth); effectY.maximumRelativeValue = @(depth); effectY.minimumRelativeValue = @(-depth); [aView addMotionEffect:effectX]; [aView addMotionEffect:effectY];}
Why is the wallpaper still shaking on the mobile phone?
This is only for better looks.
Ios7 everyone knows that the interface icon is shaking around with the tilt angle. Today I don't know why I have set it to shake up or down, but not left or right. Why?
This is normal! It seems that there is a panoramic photo! No problem! Hope to adopt it!