Post

Replies

Boosts

Views

Activity

Comment on I keep getting "Terminating app due to uncaught exception 'NSRangeException', reason: 'Attempted to scroll the table view to an out-of-bounds row...."
Yes viewWillDisappear() is called. It sets savedRowMainFave and (for test purposes prints "Leaving indexPath = savedRowMainFave). The variable does not disappear. When I come back in viewWillAppear() runs i also print out savedRowMainFave coming in = savedRowMainFave to verify it is still set properly. I do have an else statement as you suggested but the code never runs.
Aug ’24
Comment on I keep getting "Terminating app due to uncaught exception 'NSRangeException', reason: 'Attempted to scroll the table view to an out-of-bounds row...."
yes, that code does scroll to the >>>>savedRowMainFave<<<<. It works most of the time but sometimes, as the error message indicates, it says there are only 4 rows in the tableview....when in reality there are 10 rows which is why I think it has something to do with the tableView not being fully loaded. I am working on a reproducible code. Thank you for replying
Aug ’24