UITableView Voice Over focus issue

Number:rdar://36283035 Date Originated:January 3 2018, 3:54 PM
Status:Open Resolved:
Product:iOS + SDK Product Version:11.2.1
Classification:UI/Usability Reproducible:Always

After double tapping to selecting an cell and navigating to is corresponding detail view controller, UITableView insists to set Voice Over focus on this cell in viewDidAppear in later navigations even though another cell has already taken the focus before navigating to detail view.

Steps to Reproduce:
1. Launch sample app on iPhone.
2. Tap + button 3 times to insert 3 cells.
3. Tune on Voice Over.
4. Focus on the 3rd cell.
5. Double tap to navigate to detail view.
6. Navigate back to master view.
7. Make sure UITableView correctly focuses on the 3rd cell. If not(another bug I suppose), repeat 5–6 until it does.
8. Focus on the 1st cell.
9. Use 3 finger horizontal swipe gesture to trigger navigation.
10. Navigate back to master view.
11. See UITableView incorrectly focuses on the 3rd cell instead of the 1st cell.

Code: https://mega.nz/#!tagHHRyT!9krsOxHRf0NWugOSo2V79dR3Gxz4R5ApVflc6y014eo


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!