iOS-添加新手操作指引
2016-03-04 17:53
417 查看
找了许久都没找到好用的操作指引代码,终于有参考的了,下面上代码:
实际的效果是:
//先创建一个与主屏幕同样大小的半灰色背景(其实是个长方形) UIBezierPath *path = [UIBezierPath bezierPathWithRect:CGRectMake(0, 0, DZScreenWidth, DZScreenHeight)]; //接着在这个路径下继续加其它路径:椭圆形的路径 [path appendPath:[[UIBezierPath bezierPathWithOvalInRect:maskFrame] bezierPathByReversingPath]]; CAShapeLayer *shapeLayer = [CAShapeLayer layer]; shapeLayer.path = path.CGPath; [btn.layer setMask:shapeLayer]; //可以将你想加的提示啊什么加上 UIImage *image = DZImageNameWith(imageStr, @"png"); UIImageView *imgaeView = [[UIImageView alloc] initWithImage:image]; imgaeView.centerX = centerX; imgaeView.y = LabelY; self.helpImageView = imgaeView; [btn addSubview:imgaeView];
实际的效果是:
相关文章推荐
- iOS开发 之 可穿戴设备 蓝牙4.0 BLE 开发
- iOS开发系列--音频播放、录音、视频播放、拍照、视频录制
- Mac和IOS碰到的问题
- 关于16年2月14日以后上传AppStore出现:Missing iOS Distribution
- iOS开发:插件记录
- iOS开发基础知识:Core Animation(核心动画) 详解
- iOS-Core-Animation之十二----性能调优
- IOS 使用CoreLocation定位 不弹出权限提示
- ios block
- iOS Path 路径 绘制 详解
- iOS7以后,我们如何统计和跟踪用户
- iOS IQKeyBoardManager 引起的界面漂移bug 解决
- 使用quartus和NIOS过程中遇到的问题和解决方法
- 使用Cordova编写 iOS应用
- nRF iOS项目(github开源项目)编译运行相关问题解决方案
- iOS 竖屏和横屏的切换
- iOS开发之静态库-基本概念
- iOS消息推送
- ios第三方库Masonry学习资料(链接)
- iOS使用RSA进行加解密