Unlike Objective-C projects (where common imports like UIKit or Foundation can be placed in the Precompiled Header file), in Swift you would normally have to include such imports in every single .swift file.
However, in Swiftify we give you a better way: import modules such as `UIKit` from the Objective-C Bridging Header file.
In our Advanced Project Converter (available in all Cloud plans) we address this by automatically moving imports from the Precompiled Header (.pch) file to the Objective-C Bridging Header file.
You can manually achieve the same functionality by:
- Creating the Objective-C Bridging Header file;
- Adding
#import <UIKit/UIKit.h>
to the Objective-C Bridging Header file (so that you don't need to repeat this for every single .swift file).
Comments
0 comments
Please sign in to leave a comment.