detailsButton = [UIButton buttonWithType:UIButtonTypeCustom];
detailsButtonImage = [UIImage imageNamed:@"read-more.png"];
[detailsButton setBackgroundImage:detailsButtonImage forState:UIControlStateNormal];
detailsButton.frame = CGRectMake(250, 40, 60, 30);
detailsButton.tag = indexPath.row;
[detailsButton addTarget:self action:@selector(ShowDetails:) forControlEvents:UIControlEventTouchUpInside];
NSLog(@"%d", detailsButton.tag);
-(IBAction)ShowDetails:(id)sender{
//code here
}
detailsButtonImage = [UIImage imageNamed:@"read-more.png"];
[detailsButton setBackgroundImage:detailsButtonImage forState:UIControlStateNormal];
detailsButton.frame = CGRectMake(250, 40, 60, 30);
detailsButton.tag = indexPath.row;
[detailsButton addTarget:self action:@selector(ShowDetails:) forControlEvents:UIControlEventTouchUpInside];
NSLog(@"%d", detailsButton.tag);
-(IBAction)ShowDetails:(id)sender{
//code here
}
No comments:
Post a Comment