How to use the objective c files inside the swift project?
Hai friends , if you confused for using the objective c files already you had but you had developed the app with swift.Then don't worry, apple had already the setup for the migration.
Just you can drag and drop the objective c files inside your swift project it says an alert to create a Bridging header.After that you must select the yes then it will create the bridging header.
Then you have to open the bridging header file and import the .h files of your objective c files.Then you can clean your project and import the file inside of your swift view controller file.
Then you can easily access the variables and functions inside of your swift file.
Just you can drag and drop the objective c files inside your swift project it says an alert to create a Bridging header.After that you must select the yes then it will create the bridging header.
Then you have to open the bridging header file and import the .h files of your objective c files.Then you can clean your project and import the file inside of your swift view controller file.
Then you can easily access the variables and functions inside of your swift file.
Comments
Post a Comment