Conditionally following a segue

前端 未结 4 1284
北恋
北恋 2020-12-13 20:29

In my app I have a login screen. When connecting a segue from the login button to the next (table) view controller however, you are always able to proceed, no matter what yo

4条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-13 20:32

    This is belated, but imo it's best to setEnabled:NO whatever is triggering the segue until the segue is "valid". That separates your segue logic from your view logic....

提交回复
热议问题