不规则区域的点击事件判断
来源:互联网 发布:exsi虚拟机linux网络 编辑:程序博客网 时间:2024/05/21 10:25
不规则区域的点击事件判断
import "CircleView.h"@implementation CircleView- (instancetype)initWithCoder:(NSCoder *)aDecoder{ if (self = [super initWithCoder: aDecoder]) {// self.layer.cornerRadius = 100;// self.clipsToBounds = YES; self.backgroundColor = [UIColor clearColor]; } return self;}- (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{ UIAlertView * alert = [[UIAlertView alloc] initWithTitle: nil message: @"点击了目标区域" delegate: nil cancelButtonTitle: @"确认" otherButtonTitles: nil]; [alert show];}- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event{ UIBezierPath * path = [UIBezierPath bezierPathWithOvalInRect: CGRectMake(0, 0, 200, 200)]; UIBezierPath *path0 = [UIBezierPath bezierPathWithArcCenter:CGPointMake(100, 100) radius:100 startAngle:0 endAngle:M_PI/3.0 clockwise:YES]; [path0 addLineToPoint:CGPointMake(100, 100)]; return [path0 containsPoint: point];}-(void)drawRect:(CGRect)rect{ [super drawRect:rect]; [[UIColor yellowColor]set]; UIBezierPath *path0 = [UIBezierPath bezierPathWithArcCenter:CGPointMake(100, 100) radius:100 startAngle:0 endAngle:M_PI/3.0 clockwise:YES]; [path0 addLineToPoint:CGPointMake(100, 100)]; path0.lineWidth = 3; [path0 closePath]; [path0 fill];}
0 0
- 不规则区域的点击事件判断
- 不规则区域响应点击事件
- Android 不规则图形点击区域判断
- 自定义控件实现不规则区域点击事件
- 不规则图片的点击事件
- android不规则区域的点击响应思路
- 不规则imageview区域点击
- hitTest:方法练习 - 不规则区域点击事件处理
- Android ImageView图片透明区域不响应点击事件,不规则图片透明区域响应点击事件
- iOS不规则控件的点击事件
- iOS不规则控件的点击事件(转载)
- iOS不规则控件的点击事件
- 不规则图形点击事件的识别 更好
- Android不规则点击区域详解
- Android不规则点击区域详解
- Android不规则点击区域详解
- Android不规则点击区域详解
- Android不规则点击区域详解
- ios简单的功能类的封装
- 字符串的全排列——《编程之法》课后题答案
- 动态规划之矩阵链乘法(第15章)
- md5校验
- 多渠道打包
- 不规则区域的点击事件判断
- 如何获得手机屏幕分辨率?
- web.xml
- css3、jquery实现边框闪烁小例
- 1.设置用户A对目录C有rw权限,用户B对目录C有只读权限。
- 产品新人一年的产品经历,产品经理的世界是这样的!
- 127.Examine the data in the CUSTOMERS table:
- LINUX 中的 dump 和 restore 命令
- Linode主机搭建(一)—— 注册账号和申请机器