UIImagePickerController startVideoCapture with custom overlay

后端 未结 2 1151
花落未央
花落未央 2021-01-13 14:58

I am using UIImagePickerController with a custom overlay to record a video in my app. For the implementation of the UIImagePickerController, I have used the code from a grea

2条回答
  •  自闭症患者
    2021-01-13 15:22

    Actually I've just quickly tested it in some code I've gotten open, the sender for your action on the button press is UIBarButtonItem *. So there's a couple of things you can do, you can either go down the root of

    UIBarButtonItem *senderButton = (UIBarButtonItem *)sender; 
    if(senderButton.image == UIBarButtonSystemItemCamera)
    {
       //Handle behaviour
    }
    

    Or set the tag variable for each button and skip the image check and look at the tags instead, which might make the logic a bit easier.

提交回复
热议问题