Guest User

Untitled

a guest
Jan 21st, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. // Assuming ARC is enabled.
  2. // |button| is of type UIButton (works with NSButton as well).
  3.  
  4. [button addTarget:[^{ NSLog(@"Block invoked."); } copy]
  5. action:@selector(invoke)
  6. forControlEvents:UIControlEventTouchUpInside];
Add Comment
Please, Sign In to add comment