Friday, 15 March 2013

ios8 - iOS 8 drag and drop issue in tableview cell -



ios8 - iOS 8 drag and drop issue in tableview cell -

i working on feature drag , drop cell in tableview different rows. dragging 1st item lastly item , scrolling rows top of table view. working fine ios 7.1 version, when tested same code base of operations ios 8 beta simulator, drag buttons disappear i'm not able drag cell anymore. here sample code reference.

- (void)viewdidload { [super viewdidload]; list = [[nsmutablearray alloc]initwithobjects:@"1", @"2", @"3", @"4", @"5", @"6", @"7", @"8", @"9", @"10", @"11", @"12", @"13", @"14", @"15",@"16", nil]; } - (nsinteger) tableview:(uitableview *)tableview numberofrowsinsection:(nsinteger)section { homecoming [list count]; } - (uitableviewcell *) tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath { static nsstring *cellidentifier = @"dragcell"; uitableviewcell *cell = [tableview dequeuereusablecellwithidentifier:cellidentifier]; if (cell == nil) { cell = [[[uitableviewcell alloc]initwithstyle:uitableviewcellstyledefault reuseidentifier:cellidentifier]autorelease]; cell.showsreordercontrol = yes; } cell.textlabel.text = [list objectatindex:indexpath.row]; homecoming cell; } - (uitableviewcelleditingstyle) tableview:(uitableview *)tableview editingstyleforrowatindexpath:(nsindexpath *)indexpath{ homecoming uitableviewcelleditingstylenone; } - (bool) tableview:(uitableview *)tableview canmoverowatindexpath:(nsindexpath *)indexpath { homecoming yes; } - (void) tableview:(uitableview *)tableview moverowatindexpath:(nsindexpath *)sourceindexpath toindexpath:(nsindexpath *)destinationindexpath { nsinteger sourcerow = sourceindexpath.row; nsinteger destrow = destinationindexpath.row; id object = [list objectatindex:sourcerow]; [list removeobjectatindex:sourcerow]; [list insertobject:object atindex:destrow]; }

please allow me know if guys have same issue in ios 8.

i can confirm that. have tableview cells wich can sorted manually. on ios8b2 there no reorder buttons!

ios ios8

No comments:

Post a Comment