Learn to Code. Check out the all new Devslopes 2.0 – Visit https://devslopes.com to learn more
Devslopes 2.0 launches February 1st 2018! Get notified on special Early Bird deals! Visit https://devslopes.com
Learn how to use Swift in an Objective-C Xcode project and learn how to use Objective-C in a Xcode Swift project – Swift interoperability and Objective-C interoperability
If you liked this video be sure to subscribe and get more helpful programming tutorials https://www.youtube.com/devslopes
Devslopes is dedicated to teaching beginners and non-programmers all about building mobile apps for iOS and Android, Web, Backend and Blockchain development. We’ve taught over 200,000 students how to code.
Our students have gotten jobs, made career changes, launched and sold start-ups, & much more. Some are at companies changing the world.
▶ Learn more at http://devslopes.com/
▶ Instagram: https://www.instagram.com/devslopes/
▶ Facebook: https://www.facebook.com/devslopes/
▶ Twitter: https://twitter.com/devslope
▶ Snapchat: devslopes
Amazon Auto Links: No products found.
It is giving me error. It says unknown type name. It is not importing all the swift files.
Swift will only works for iOS7+
This video got me moving forward… and this S.O. got me that last bit. My app also started with a number which jacks up the Product Module Name and is something tricky to catch. Now I’m Swifting up my app at work! GET SOME!!!! https://stackoverflow.com/questions/24206732/cant-use-swift-classes-inside-objective-c
Hi Mark – just wondering why you use ” _secondVC”?
What if project name (release / debug) has different name ?
Nice Tips…. Tanks dude!
Great tutorial! but mine doesn’t work in using swift classes in objc.
I did exactly what is stated step-by-step then i also checked the “Define Module” option under Packaging under Build Settings to be set as “YES”. Still I received “Unknown Type name” error on the swift Class that im trying to use in my objc Project. What seems to be lacking?
hi thx fot the great video and your course is just amazing best course ever, i have a problem the button do navigate to swift and change the backgroundcolor but any changes i make in the swift ui doesn’t effect it at all and when i removed the swift UI background code from object c it navigate to blackscreen that is the button code :
_secondVc = [[SecondVC alloc]init];
_secondVc.view.backgroundColor = [UIColor redColor];
[[self navigationController] pushViewController:_secondVc animated:YES];
It keeps saying the .h file was not found.
Great video mate.
hey how can i call views with the swift class that i just created?
Thank You
Wow me salvo la vida, Thanks!!!
Awesome. Thank you, man!
Great tutorial. Thanks. Keep posting more videos.
Perfect tutorial for Swift < -> ObjC.
How about Swift < -> C, or even Swift < -> C++?
I have only found examples for C functions and simple types. How would you make structs/classes and their members/methods map to Swift equivalents?
Hi Mark, Thanks for posting this! It was very helpful to me. One thing I’d like to add for other users is if your project has some spaces or non alpha numeric characters, you need to substitute a “_” for the non alpha numeric character when adding the “-Swift.h” to your objective C code. It took me a few minutes to figure it out 🙂
This is great! Thanks! Just one question- when working across multiple projects in a Workspace, how does one target the Obj C classes we want to import to use in Swift from another project? I tried #import “../OtherProject/classpath.h” and the compiler doesn’t complain but the classes don’t auto-complete in swift.
Hi, I would like to ask whether the performance will be badly affected when mixing objective c and swift together in the same file?