-1

I have a project contains objective C code and I want to implement new features using Swift so I created Bridging header and added it to the build paths, the problem now is when I add #import "xx" to the Bridging header #import is not recognized and when I add it manually by copying and pasting like #import "MBProgressHUD.h", then i try to view the source code I get "?" although when I import the same library in any other .h or .m file it works. Note: I know that "MBProgressHUD" works with swift, it was just for reference.

Appreciating any support and thanks in advance

Kiran Sarvaiya
  • 1,318
  • 1
  • 13
  • 37
Ahmad Mahmoud Saleh
  • 169
  • 1
  • 4
  • 15

1 Answers1

0

I think you should do like this
1、drag the MBProgressHUD into your project
2、you can create an OC class first
, which will remind if you create yourProject-Bridging-Header.h, choose yes
3、import #import "MBProgressHUD.h" in the -Bridging-Header.h,And then compile the project
4、use it

liangju
  • 98
  • 1
  • 5