Q:

Obj-C to swift in xcode

I am a swift newbie. I have an old app in obj-c, I would like to translate it to swift. Despite what I read, I am not quite sure how to use the convert to swift feature in Xcode. Can some one give me some guidances? Thanks. I am mainly confused about how the .h and .m on the obj-c side merge into one .swift file. In the .h file, I have a lot of variables and IBOutlets and IBActions declared. How does these all translate to the swift side. Thanks

A:

AFAIK there is no convert Objective C to swift code feature in Xcode. There is only a convert from Swift X to newer Swift Y features.
That said. The .h file is the header file of your objective c. These are the methods and properties that other objects in your code can call on that specific class. 
Swift has a similar feature but its all in the Swift file. If you mark a function as private then its roughly equivalent to a method being in the .m file but NOT in the .h file.
However, when you're just getting started with swift, don't sweat it too much. Use the default func declaration in place of -( declaration in objective c and just forget about the .h file for now. This will expose all functions and properties as if they were in the .h file in Objective C. But while you're getting started, thats the easier, more permissive way. Once you get more experienced you can start marking functions and methods as private and then they will no longer be exposed to other parts of your code.

