awkward / Tatsi

A drop-in replacement for UIImagePickerController with the ability to select multiple images and/or videos
MIT License
110 stars 30 forks source link

Update doneButton to use UIButton #57

Closed alexanderriv closed 2 years ago

alexanderriv commented 2 years ago

Because we are creating a UIBarButtonItem that is using a customView which has an underlying implementation of UIButton, we must specify the target and selector on the UIButton itself.

Because the original implementation for a custom UIBarButtonItem Sets the target and action properties on the UIBarButtonItem itself, the selector function is never called because the selector needs to on the UIButton.

We could create our UIButton and specify the selector but then the delegate method for getting a custom done button is never called because we can't access it.