0

Can't figure out how to do UITableViewCell with custom mode with animation like this

make swipe on cell so UIPickerView will appear, like delete

I'm thinking I need to do in my controller in this method:

- (void)setEditing:(BOOL)editing animated:(BOOL)animated 
{
    [super setEditing:editing animated:animated];
    [self.tableView setEditing:editing animated:animated];
    //add something here
}

or in my custom cell class:

-(void)setEditing:(BOOL)editing animated:(BOOL)animated

found answer custom editingAccessoryView not working

Community
  • 1
  • 1
p.balmasov
  • 357
  • 1
  • 16

3 Answers3

1

You should add UIPickerView to your table cell as a subview

Andrey Chernukha
  • 21,488
  • 17
  • 97
  • 161
0

Add the custom picker as subview and keep it hidden.when you start editing in the delegate method make the view show by setting hidden property to no

Lithu T.V
  • 19,955
  • 12
  • 56
  • 101
-1

When you are making cell to show in tableview in method -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath here you can add your UIPickerview according to your need to UITableViewCell like this-

[cell.contentView addSubview:pickerView];

hope this helps.

iEinstein
  • 2,100
  • 1
  • 21
  • 32
  • i want to animate uitableviewcell than you swipe cell from right to left and pickerView will appear with animation – p.balmasov Jun 04 '13 at 09:49