Can Swift code embed in existing Objective-C file - or must one add that code to a discrete Swift file? -


i have objective-c file used work older xcode's

with emergence of xcode 6.x - code no longer performs

i found same functionality in code written in swift online

i read apple's documentation using bridging header's allow use of swift objective-c. able setup ok, believe.

what not clear - can cut , paste swift code objective-c file (a viewcontroller.me file actually), or limited having use swift file start ?

if have use new file in (very simple) app, im not quite sure how pull off having 2 viewcontroller.m files work 1 used work fine, method creates new problem me.

thanks assistance in advance !

i recommend creating class or struct swift code, , access class or struct in objective-c viewcontroller.


Comments