Tôi muốn vuốt ô khi nhấp vào nút. Tôi thành công khi vuốt một ô. Nhưng tôi muốn swipe vào nút đó là trong tế bào. mã của tôi làCách vuốt ô khi nhấp vào nút
- (NSArray *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *simpleTableIdentifier = @"SimpleCell";
SimpleCell *cell = (SimpleCell *)[tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier];
if (cell == nil)
{
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"SimpleCell" owner:self options:nil];
cell = [nib objectAtIndex:0];
}
SimpleCell *cekks=[[SimpleCell alloc]init];
cekks.scrollButton.alpha =0.0;
NSString *titleString;
UIButton *sender = [[UIButton alloc]init];
//[sender setBackgroundImage:[UIImage imageNamed:@"swipe.png"] forState:UIControlStateNormal];
sender.tag = indexPath.row;
titleString [email protected]"Send A Gift";
UITableViewRowAction *sendAGift = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleNormal title:titleString handler:^(UITableViewRowAction *action, NSIndexPath *indexPath){
// [self deleteMail:[NSArray arrayWithObject:indexPath]:YES];
}];
[sendAGift setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"swipe.png"]]];
return @[sendAGift];
}
bạn muốn gì? Swipe on Button click hoặc Swipe trên nút mà làm cho các tế bào swipe –
Khi nhấp vào một nút trên tế bào Swipe –
Swipe các tế bào khi bạn nhấp vào nút, phải không? –