UIButton*button=[[UIButtonalloc]initWithFrame:CGRectMake(0,0,100,100)];
button.showsTouchWhenHighlighted=YES;
[self.viewaddSubview:button];
button.backgroundColor=[UIColorpurpleColor];
但button高亮的時(shí)候按鈕會(huì)發(fā)亮简逮。用戶手指接觸的部分會(huì)發(fā)亮球散,就是變成白色。
判斷觸摸的點(diǎn)是否在某個(gè)view上面
BOOL isin=? CGRectContainsPoint(view.frame,point);