Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. @protocol changePictureProtocol <NSObject>
  2. -(void)loadNewScreen:(UIViewController)*controller;
  3. @end
  4.  
  5. @property (nonatomic, retain) id<changePictureProtocol> delegate;
  6.  
  7. -(IBAction)changePicture:(id)sender
  8. {
  9. // ..... blah blah
  10. [self.delegate loadNewScreen:picker];
  11. }
  12.  
  13. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  14. {
  15. // create cell here
  16.  
  17. cell.delegate = self;
  18. }
  19.  
  20. -(void)loadNewScreen:(UIViewController)*controller;
  21. {
  22. [self presentViewController:controller animated:YES completion:nil];
  23. }
  24.  
  25. CustomCell *customCell=[tableView dequeueReusableCellWithIdentifier:@"CellIdentifier"];
  26. [customCell.yourButton addTarget:self action:@selector(yourButtonAction:) forControlEvents:UIControlEventTouchUpInside];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement