04/05/2015

// 1 获得点击的位置的点(point)

CGPoint location = [recognizer locationInView:recognizer.view];

 

// 2 判断点击的是哪个view(点击的点是否在该view中)

- if(CGRectContainsPoint(<#CGRect rect#>, <#CGPoint point#>);   // (View.frame, 点)

 

// 3 遍历某些东西(sample :subview )

- [self.subviews enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {

        // TO-DO

  }];

 

// 4 didMoveToSuperview

- 当添加subview的时候调用didMoveToSuperview

 

// 5 UITableView 不会被点击选中

posted on 2015-05-05 15:23  puppyb2m  阅读(98)  评论(0编辑  收藏  举报

导航