How do I create a bridge header in swift 4?



How do I create a bridge header in swift 4?..

Answer / 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

More Apple iOS Swift Interview Questions

How multiple line comment can be written in swift?

1 Answers  


Can enum be extended in swift?

1 Answers  


What is dynamic keyword in swift?

1 Answers  


Is swift written in c++?

1 Answers  


What is memory leak in swift?

1 Answers  


How do you implement delegates in swift?

1 Answers  


What is $0 in swift?

1 Answers  


What are the control transfer statements in swift?

1 Answers  


Is singleton thread safe swift?

1 Answers  


What is instance variable in swift?

1 Answers  


What are generics? How to make a method or variable generics in swift?

1 Answers  


What is thread in swift?

1 Answers  


Categories