1and2papa / CTAssetsPickerController

iOS control that allows picking multiple photos and videos from user's photo library.
MIT License
2.15k stars 550 forks source link

Move CTAssetsGridViewController.m [self setupButtons] from viewDidLoad to viewWillAppear #178

Closed germs5 closed 8 years ago

germs5 commented 8 years ago

I was trying to set my own value for the Done button text throughout the library, by referring to a property that I added to CTAssetsPickerController.h. However, self.picker evaluates to nil in the setupButtons method, as CTAssetsGridViewController has not yet been placed in the view controller hierarchy. Setting the action for a nil target works anyway, probably due to run-time searching for a view controller that responds to the action. So this is a low priority change. However, this a bug waiting to happen. Maybe other view controllers have this same problem.