ios7自带的晃动效果
2016-03-27 21:54
399 查看
ios7自带的晃动效果
by 伍雪颖- (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]; }
相关文章推荐
- iOS SDK与Xcode
- IOS main函数
- iOS大牛博客
- 36. Quartz 2D之渐变和裁剪
- HDU 1017:A Mathematical Curiosity【水】
- iOS开发-beginUpdates && endUpdates用法
- iOS Xib文件详解
- [杂七杂八-iOS]个人总结3.27
- iOS学习之 plist文件的读写
- iOS动态更新方式选择
- iOS --- OpenGLES之图片纹理
- ios 第三方qq登陆,号码禁止授权
- iOS 摇一摇
- iOS 只在主页面显示TabBar
- iOS之使用距离传感器(靠近/远离屏幕-变暗/变亮)
- iOS中 动态热修补技术JSPatch 韩俊强的博客
- iOS中 动态热修补技术JSPatch 韩俊强的博客
- cornerStone查看日志出错:Could not contact repository to read the latest log entries
- iOS开发中的小技巧
- iOS Fmdb数据存储