Conditionally following a segue

前端 未结 4 1287
北恋
北恋 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:36

    You can wire up your login button or whatever to some IBAction code, decide if the login should proceed and then (if it should) you can use performSegueWithIdentifier: to transition to the new view.

    I just wrote another post about using this method, here.

提交回复
热议问题