adspace


How do I create a bridge header in swift 4?

Answer Posted / Mohd Nadeem

To create a bridge header in Swift 4, you can follow these steps:
1. Create a new Swift file and give it the extension .h instead of .swift.
2. Include any Objective-C headers that your Swift code will be accessing at the top of the file.
3. Use the @objc attribute before any classes, protocols, or methods that you want to make available to Objective-C code.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain some biggest changes in usernotifications.

926


Explain the common execution states for a swift ios app (ios application lifecycle).

900


How can you define a base class in swift?

931