Weak connection and UIKit?

I recently published "Printing via AirPrint", but did not want to give up support for versions prior to 4.2 (obviously). Did this before for things like Game Center, etc. What I found particularly strange in this case was due to a weak UIKit connection. The seal was not contained in its own framework, which allowed me to be more granular.

I just didnโ€™t like it, although it solves my problem, which allows the application to work fine on all versions.

The Apple SDK Compatibility Guide says:

When using the framework that is available for your deployment purpose, you will need this framework (and not loosely link it).

UIKit is available, just not classes like UIPrintInfo , UIPrintInteractionController , etc.

Am I right that it seems strange to loosely tie such a basic structure? Is there a better way?

+6
iphone
source share
1 answer

There is a better way. iOS 4.2 introduced NS_CLASS_AVAILABLE for this purpose, but there are some restrictions on its use. All details are listed in the documentation below:

http://developer.apple.com/library/ios/#documentation/DeveloperTools/Conceptual/cross_development/Using/using.html

+2
source share

All Articles