Guest User

Untitled

a guest
Jul 20th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. //in the interface file
  2. @interface NSArray (each)
  3. -(void) each: (void (^)(id *))block;
  4. @end
  5.  
  6. //in the implementation file
  7. @implementation NSArray (each)
  8.  
  9. -(void) each: (void (^)(id *))block {
  10. for (id *object in self) {
  11. block(object);
  12. }
  13. }
  14. @end
Add Comment
Please, Sign In to add comment