Apple Swift Tutorial: Simple iOS Swift GUI Application

In this tutorial you are going to write your first iOS Application using Swift. You are going to explore different kinds of familiar UIKit classes and use them with the new Swift syntax.

TUTORIAL FILES: http://goo.gl/WoALKI

Watch this tutorial for more information about UIKit classes, delegates and closures: https://www.youtube.com/watch?v=dxiv_tOEUUQ

***COMMENTS****
If you have questions about the video or Cocoae programming. Please comment below.

Web: http://www.prentis.de

Comments

Andrew Budziszek says:

Success! Thanks for the tutorial!

Polly Wu says:

Thank you so much your swift tutorial, this is my first application, I did it!! So happy for it!!

Nischal Gautam says:

is this a song ? but it was helpful thanks !! 

omar alhakeem says:

I could’t run the app because the first part of the tutorial is missing  for some reason ! Can you please add the first part of this tutorial to set up the app from blank page ? Thanks in advance 

Ashutosh Kumar says:

Don’t u ever use storyboard … :( .. m not much into codes

dustmouse says:

This was very helpful, thanks.

Tryoh says:

Thanks, Great video! 😀

Héctor Tortosa Martínez says:

Nice tutorials you are doing, really useful all of them.

With loops there are more ways to do what you did:

Directly get the items in the titles array:
for title in buttonTitles {
    // Create buttons here
}

or use two dots to not substract 1 to array.count:
for i in 0 .. buttonTitles.count {
    // Create buttons here
}

I would like to ask for a Extensions tutorial :) It would be rally nice!

Charles Montgomery says:

When I get upto 21:29 and test, I just see a blank white screen. I added images (including @2x) but still see nothing. Any help is appreciated.

Gabriel Musheyev says:

Thank you! Would you specify pls where the images go in the images.xassets bundle? I’ve added Background1 one the LaunchImage set. Where do I add Background2 images? Also, I added the 1x and 2x versions, which I assumed to be standard and hi res, correct?   

paracha3 says:

wish you had also showed how to add images to your assets, knowing this tutorial is for beginners as you said.

Mehmet Bilen says:

this video tutorial is really helpful, thank you Brian Advent

Polly Wu says:

Sorry, I just don’t know where to put “background1″and “background2”, when I finished build, it’s a white background, should I import two backgrounds to somewhere? 

svenax says:

Use the open range operator ‘for i in 0 .. buttonTitles.count’ to iterate over the indices in an array. Or even ‘for title in buttonTitles’ if you don’t actually need the index.

Jake Duncan says:

Hey mate, good tutorial, thanks for that.

3 questions: 

1. was imageView = UIImageView(frame: view.frame) necessary? wasn’t it already instantiated and you just needed to set the frame?
2. same with backgroundDict? or are the square brackets a shortcut to add objects to a dict?
3. was var button:UIButton = sender necessary? it looks like we already know that it is a UIButton from the parameter?

Cheers

AJ Keller says:

Great job. That was exactly what i was looking for. Keep it up. Thanks

Name Lastname says:

Hello, Brian! Great tutorials! Please give me your contacts… I have one idea, and I want do this with you :)

Tristan Henriksson Edwards says:

Great tutorial! I like how you went through it all programatically instead of using Storyboards. :)

jpsterr360 says:

Could you make a video explaining the UIKit and about what some of the classes used to make apps do? I am new to Xcode and don’t know any C++ and am trying to jump on board with swift along with everyone else. I feel there are others like me who are also new to xcode and app development who could benefit from a quick video catching us up to speed with others more familiar with the frameworks and such. Thanks man and awesome video!

Dhruv Ramani says:

Can I follow these tutorials if I am a beginner in  iOS Programming but know some of the other programming languages?

ugajin says:

For Xcode Version 6.1 (6A1052d)
var backgroundImage:UIImage = UIImage(named:backgroundDict[“background1”])
should be:
var backgroundImage:UIImage = UIImage(named:backgroundDict[“background1”]!)!
and,
UIView.animateWithDuration(0.9, animations: {self.imageView.alpha=0}, completion: {_ in self.imageView.image = UIImage(named:self.backgroundDict[imageSelector])
needs to be:
UIView.animateWithDuration(0.9, animations: {self.imageView.alpha=0}, completion: {_ in self.imageView.image = UIImage(named:self.backgroundDict[imageSelector]!)

A Aguilar says:

Issue Value of optional type ‘String?’ not unwrapped; did you mean to use ‘!’ or ‘?’ ? 

var backgroundImage:UIImage = UIImage(named: backgroundDict[“Background1”])

Flavius says:

There’s a much easier way to do this..

sandeep c says:

Thank you . I learnt a lot !

Vural Mecbur says:

VERY VERY COOL VIDEO :D:D

Jonathan Buford says:

When I download the tutorial files, it only gives me the ViewController.swift file.  Would you be willing to share the images you used as well?

Marvin Trilles says:

when to use semicolon to end a statement and when not to use it?

James Franklin says:

I appreciate the video but it’s very difficult to get through with your speech pattern. You should consider writing out what you want to say ahead of time. The coherence is lost when your words are constantly scrambling around and incoherent.

jtmaca9 says:

your code dosent work, unresolved identifier image

        UIView.animateWithDuration(0.4, animations: {self.imageView.alpha=0}, completion: {_ in self.imageView.image = UIImage(named : image)
            UIView.animateWithDuration(0.4, animations: {self.imageView.alpha=1})
            
        })

MyChangement says:

hey Brian! my program has failed, I have 5 mistakes can you help me please??

1) var button:UIButton = UIButton.buttonWithType(UIButtonType.System) as UIButton

error: buttonWithType is unavailible: use object construction ‘UIButton(type:)’

2) button.center=CGPointMake(view.center.x, CGFloat(100+i*50),
error: extra argument in call

3) view.addSubview(button),
error: expected ‘ , ‘ separator

4) override func didReceiveMemoryWarning() {
error ‘override’ only be class specified on class menbers

5) let ImageSelector:String = ” background(button.tag)”
error : Initialization of immuable ‘imageSelector ‘was nerver use replacing with assignment to ‘ _’ or remote it

Gary Dorman says:

Hi I want to open a 2nd view controller when I click on a button in the first view controller. How could I do this? Thanks! :)

Søren Clausen says:

I noticed you wrote “0…buttonTitles.count-1” in your for loop..
Isn’t this the same as: “0..buttonTitles.count”?

BTW.. Thank you for making these videos :)

El Kayayo says:

var backgroundImage:UIImage = UIImage(named: backgroundDict[“Background1”])
value of optional type “UIImage?” not unwrapped. what is this? i can’t build the program.

Jose Armando Santiago Tun says:

Helo, my friend is good you tutorial about the swift.

Kemily Play says:

beijos sabor morango

Write a comment

*

Human Verification: In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.


Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!

Send this to a friend

▷ Other ReviewsVehicles▷ Show Cars▷ Motorbikes▷ Scooters▷ Bicycles▷ Rims & Tires▷ Luxury BoatsFashion▷ Sunglasses▷ Luxury Watches▷ Luxury Purses▷ Jeans Wear▷ High Heels▷ Kinis Swimwear▷ Perfumes▷ Jewellery▷ Cosmetics▷ Shaving Helpers▷ Fashion HatsFooding▷ Chef Club▷ Fooding Helpers▷ Coktails & LiquorsSports▷ Sport Shoes▷ Fitness & Detox▷ Golf Gear▷ Racquets▷ Hiking & Trek Gear▷ Diving Equipment▷ Ski Gear▷ Snowboards▷ Surf Boards▷ Rollers & SkatesEntertainment▷ DIY Guides▷ Zik Instruments▷ Published Books▷ Music Albums▷ Cine Movies▷ Trading Helpers▷ Make Money▷ Fishing Equipment▷ Paintball Supplies▷ Trading Card Games▷ Telescopes▷ Knives▷ VapesHigh Tech▷ Flat Screens▷ Tech Devices▷ Camera Lenses▷ Audio HiFi▷ Printers▷ USB Devices▷ PC Hardware▷ Network Gear▷ Cloud Servers▷ Software Helpers▷ Programmer Helpers▷ Mobile Apps▷ Hearing AidsHome▷ Home Furniture▷ Home Appliances▷ Tools Workshop▷ Beddings▷ Floor Layings▷ Barbecues▷ Aquarium Gear▷ Safe Boxes▷ Office Supplies▷ Security Locks▷ Cleaning ProductsKids▷ Baby Strollers▷ Child Car Seats▷ Remote ControlledTravel▷ Luggages & Bags▷ Airlines Seats▷ Hotel Rooms▷ Fun Trips▷ Cruise Ships▷ Mexico Tours