SEL Selector

11 views
Skip to first unread message

▶ Dev. Haider

unread,
Jul 28, 2016, 3:15:07 AM7/28/16
to iphonesdkd...@googlegroups.com

Hello every one, i need to know how to call below function

#pragma mark -- Review Controller

-(void)showReviewScreen:(NSMutableArray*)array sender:(id)sender {

        CGPoint buttonPosition = [sender convertPoint:CGPointZero toView:self.tableView];

    NSIndexPath *indexPath = [self.tableView indexPathForRowAtPoint:buttonPosition];

        AddReviews  *vc  =(AddReviews *) [self.storyboard instantiateViewControllerWithIdentifier:@"AddReviews"];

    vc.poiDetails = array[indexPath.row];

    [self presentPopupViewController:vc animated:YES completion:^{

        [self.navigationController setNavigationBarHidden:YES animated:YES];

    }];

        vc.dismodel = ^(BOOL states) {

        [self dismissPopupViewControllerAnimated:YES completion:nil];

    };

}


from UITableview cellForRowAtIndexPath button place in cell.

 [cell.reviewBtn addTarget:self action:@selector(showReviewScreen:) forControlEvents:UIControlEventTouchUpInside];

i need to pass array and sender value.



--
 
Developer

Meghan Kharva

unread,
Jul 28, 2016, 3:22:04 AM7/28/16
to iphonesdkd...@googlegroups.com
I think you need to play with UIButton's tag, and get array from that.

--
You received this message because you are subscribed to the Google Groups "iPhone SDK Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iphonesdkdevelop...@googlegroups.com.
To post to this group, send email to iphonesdkd...@googlegroups.com.
Visit this group at https://groups.google.com/group/iphonesdkdevelopment.
For more options, visit https://groups.google.com/d/optout.



--
- Regards,

 Meghan Kharva

 (9429886607)

▶ Dev. Haider

unread,
Jul 28, 2016, 3:29:23 AM7/28/16
to iphonesdkd...@googlegroups.com
yes i know that way, but data is comming from different arrays, so i need to make a generic function in which i can get the array data by passing array in argument and also the sender value. 
 
Developer

Jesse Tayler

unread,
Jul 28, 2016, 12:16:44 PM7/28/16
to iphonesdkd...@googlegroups.com
You can “Tag” your sender which is a UIVIew, otherwise, you won’t know your array so you can’t send that along with the button press. Hope that helps.
Reply all
Reply to author
Forward
0 new messages