iOS 개발/Swift

[Swift] Objective C 프로젝트에서 Swift 를, Swift 프로젝트에서 Objective C 를 사용하기

beankhan 2017. 6. 8. 19:00


출처

http://seorenn.blogspot.kr/2014/07/swift-objective-c.html
http://seorenn.blogspot.kr/2014/08/objective-c-swift.html




개요






Objective C 프로젝트에서 Swift 코드 사용하기


Class 사용하기

1. 프로젝트 설정



2. Swift Code 작성



3. Objective C 에서의 사용




Enum 사용하기

  





delegate 사용하기

   






Swift 프로젝트에서 Objective C 코드 사용하기



Class 사용하기

1. 프로젝트 설정



2. Objective C Code 작성




3. Swift 에서의 사용





Enum 사용하기



delegate 사용하기









Apple Guide (Interacting With Objective-C Apis)

https://developer.apple.com/library/content/documentation/Swift/Conceptual/BuildingCocoaApps/InteractingWithObjective-CAPIs.html#//apple_ref/doc/uid/TP40014216-CH4-ID45


initialize


class method



optional initialze