use swift file into Objective-C project -


can tell me how can use swift file objective-c project?

i have swift file inherits uiviewcontroller instead of nsobject. trying use swift file not able figure out how.

when add swift file objective-c project, asks create bridging header. in header file importing swift file -

#import "slidecontroller.swift" 

and bridging file name objctoswift-bridging-header.h

i read many answers asks import file

 #import "myproductmodulename-swift.h" 

into .m file, can't find such file in project.

i changed defines module = yes shown in answer.

but still not able access swift file. missing? please tell me right steps figure out.

after created bridging header.

go build setting =>search "objective-c bridging header"

just below find ""objective-c generated interface header name" file

and import file in view controller.

ex.in case: "dauble-swift.h"

enter image description here


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -