So I have been developing for iOS using cheats for a really long time and now that Swift is in beta I am going to try and convert over to using that instead of Xamarin and Appcelerator. I will be creating a series of blog posts outlining the things I have learned. Most of what I am discussing will be related to a Microsoft Developer converting to an Apple world.
Next, you will right click the UI control (in this case, the label that reads “First View”) and drag into the code on the right and drop inside the class definition above the viewDidLoad method. You will see a blue line while you are dragging. If you do not see that and your control moves you did not right click.
To demonstrate using the variable I set the text property of the label control I referenced to the text “Title”. As you can see, I put this code in the viewDidLoad method.
This is a very basic example of how to reference a UI component and set a property with swift.