Chcę przesunąć komórkę po kliknięciu przycisku. Udało mi się przesuwać komórkę. Ale chcę przesunąć przycisk, który znajduje się w komórce. mój kod jestSposób przesuwania komórki po kliknięciu przycisku
- (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];
}
czego chcesz? Przesuń palcem po przycisku kliknij lub przesuń palcem po przycisku, który powoduje przesunięcie komórki –
Kliknięcie przycisku na komórce Przesuń palcem –
Przesuń palcem komórkę po kliknięciu przycisku, prawda? –