Advertisement
Guest User

Untitled

a guest
Apr 21st, 2015
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
  2. if ([touches count] == 1) {
  3. for (UITouch *touch in touches) {
  4. CGPoint point = [touch locationInView:[touch view]];
  5. point = [[touch view] convertPoint:point toView:nil];
  6.  
  7. CALayer *layer = [(CALayer *)self.view.layer.presentationLayer hitTest:point];
  8.  
  9. layer = layer.modelLayer;
  10. layer.opacity = 0.5;
  11. }
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement