質問

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

役に立ちましたか?

解決

You should add UIPickerView to your table cell as a subview

他のヒント

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

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top