compile for 3.0 with optional support for 3.1 API
-
06-07-2019 - |
Question
My app uses the camera, and I added the zoom function thanks to 3.1 API (cameraViewTransform most importantly). But I want my app to run also on 3.0 (without the zoom of course). The problem is that, I cannot compile the app in 3.0 due to this line which calls 3.1 properties:
CGAffineTransform initialTransform = photoPicker.cameraViewTransform;
If it was a method then I could have used performSelector or something like that. Changing it to initialTransform = [photoPicker cameraViewTransform] doesn't work neither. Is there any solution for this?
Solution
I think this question is similar to yours, maybe the solution there might help you.
OTHER TIPS
You want to set your deployment target to 3.0, but then compile with the 3.1 SDK, checking at runtime for the availability of the functionality using [photoPicker respondsToSelector:@selector(cameraViewTransform)]
before calling it. There's a rant about deployment targets and SDKs at http://groups.google.com/group/iphonesdk/msg/1f47eae223a9fe90?dmode=source that might be helpful.