1.直接在工程中command+n,出现如图,点击Header File创建桥接文件Bridging-Header.h,如图:
![](http://upload-images.jianshu.io/upload_images/1416363-942273dde74839da.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
2.点击next,出现如图画面,一定要记得勾选第一项,再点击create创建完成。
![](http://upload-images.jianshu.io/upload_images/1416363-814ca6b487e0f2b8.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
3.配置桥接文件,点击target - build settings 通过搜索找到 Objective-C Bridging Header,配置一下文件路径即可,记得使用相对路径:$(SRCROOT),配置完成即可愉快的使用OC中的方法了。
![](http://upload-images.jianshu.io/upload_images/1416363-0fb5926ff59f2c8c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
4.使用的时候按照如图的方式导入OC的.h文件即可使用。
![](http://upload-images.jianshu.io/upload_images/1416363-1df4f72e2bbd2c47.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
注意使用的时候要按照swift的方法调用oc类中的方法,会自动进行转换的。