OceanLabs / iOS-Print-SDK

iOS Print SDK. Easily add print on demand functionality to your app within minutes! Print Postcards, Magnets, Photo Prints, Posters, Stickers, T-Shirts, PhotoBooks, etc.
https://www.kite.ly
111 stars 33 forks source link

Issue#298 recentsAvailable has reversed logic causing all editing con… #299

Closed cortis closed 6 years ago

cortis commented 6 years ago

…trols to hide if disableCameraRoll == true

Changing cameraRollEnabled to false (aka disableCameraRoll in swift) causes button1 of the editingTools to be removedFromSuperView (inexplicably also button2 and button3). It seems the root cause for this is because the code thinks it has no imageProviders. The root cause of this is that recentsAvailable of OLKiteUtils.m has the opposite logic of what it supposed to have. It returns true if no recents are available and false otherwise.

The function should read:

Further proof of problem: If you turn off the camera using kiteViewController.disableCameraRoll = true and send no assets to the viewController, button1 will appear but will crash when you tap it.