1. Xcode Project -> Target -> Build Settings -> Defines Modules 'Yes'
Xcode Project -> Target -> Build Settings -> Swift Language Version 5


2. Swift Code 추가
3. Objective C 에서 swift 함수를 사용할 경우 @objc func , 프로퍼티를 참조 할 경우 @objc var
4. Swift에서 기존 Objective C 모듈에 연동이 필요한 경우
프로젝트이름-Bridging-Header.h 에 #import 추가
이 과정을 거치고 나면 objective c / swift를 함께 이용할 수 있다.
ojbective c 에서 swift 로 만든 ViewController를 이용하고 swift로 만든 ViewController에서 기존 objective c 모듈에 기능을 이용 할 수 있다.
댓글 없음:
댓글 쓰기