![]() ![]() The name of that file will be like “NameOfTheProject-swift.h” according to your project name. We will need to import that hidden (Xcode generated background file) Swift file into Objective C classes to create Swift objects in Objective C. To solve this issue, we will need the background file generated by Xcode when created the swift file in step 1. The bridge file allows Objective C classes to be imported swift classes but does not allow Swift class objects to be created in Objective C classes. Step 3: Import Xcode generated background Swift file to allow Swift objects in Objective-C At this stage, we can create objects of Objective C classes in Swift, however, if we try to create Swift classes objects in Objective C classes it will show an error. This bridge header file allows us to create Objective C objects in Swift classes. Figure 4 – Import the Header Files of Object-C in Bridging Header ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |