Posts

Post not yet marked as solved
2 Replies
670 Views
I have tried several times to login into iCloud on the iOS 13.3 simulator with two different accounts and one works and the other doesn't. I have even manually typed the passwords in instead of copy and pasting. Again, one works and one doesn't. Is there a situation where an account will not work on the simulator?Simulator VersionVersion 11.3.1 (SimulatorApp-912.5.1 SimulatorKit-570.3 CoreSimulator-681.17.2)
Posted
by CMoebius.
Last updated
.
Post marked as solved
4 Replies
1.4k Views
I have inherited an Objective-C code base with a nasty bug where a view controller has a tableview that is seemingly exiting edit mode.Items are dragged from a view that is above the table and dropped onto the table, which adds them to the backing data store. When the items are dragged onto the table, reloadData is used to refresh the table with the added items. As a matter of fact, reloadData is used a lot sprinkled in the code which bothers me a bit since the table could be moving into edit and non-edit mode via various means.The code sets the table view into edit mode when a button (labeled Edit) is pressed using the following code [_tableView setEditing:YES animated:YES];and when the button is pressed again (labeled Done), the table view is told to exit edit mode using [_tableView setEditing:NO animated:NO];While the table is in edit mode, rows can be reordered and deleted. When a row is deleted it is removed from the backing data store and [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];is called to update the table and when there are no more rows in the backing data store, reloadData is called on the table (although I am not sure why since the rows was just deleted from the table with the line above. The problem is that I can add then remove rows from the table view the first time just fine. After that, I drag items to the table view to build the list again. I put the table in edit mode and remove the first row. Once the row gets deleted (with the code directly above) and reloadData is called, the table exits edit mode, meaning that the red circles and reorder buttons go away and the table is out of edit mode.I guess the bottom line is that the code isn't the best, it feels like spaghetti to me. I had an idea that I would like to observe isEditing of the UITableView instance to see when it is being set to NO. I may try that next to see if I can pinpoint when the tableview is being taken out of edit mode and what may be causing that to happen.Any ideas why this might be happening would be greatly appreciated.
Posted
by CMoebius.
Last updated
.