Crash when pushing to another controller after `didFinishPickingMediaWithInfo`

后端 未结 2 1585
面向向阳花
面向向阳花 2021-01-26 09:56

I\'m trying to have the app go to a different view controller after the user chooses a photo from the picker.

func imagePickerController(_ picker: UIImagePickerC         


        
2条回答
  •  南方客
    南方客 (楼主)
    2021-01-26 10:44

    add this to your function

    dismiss(animated:true, completion: nil)
    

    In the completion, you can define a closure that does whatever you want.

提交回复
热议问题