[Swift 1] Day 1 - Lesson


#1

Post any questions, comments, or feedback to the Day 1 Lesson materials here.

Day 1 Lecture: http://learn.iphonedev.tv/lecture/91448/11-lecture-welcome-to-swift-and-ios-8-apps-in-31-days/

The daily lessons may change based on your input. Let me know if you like this lesson.

-Paul


#2

I do like this type of lesson’s structure. I mean, there is a balance between theory and practice. Actually you kind of favor practice, which IMO is the best approach on learning how to program.

I find the proposed “Notebook Activity” a really nice addition. In my experience, it’s fundamental to take notes and really dig into concepts, specially the complex ones (we sometimes just stop at a Google / Stack Overflow solution, but there is much more than that).

So yeah. For me the lesson’s format is great. Way to go!


#3

Thanks!

I’ve posted the Day 1 Q&A.

http://learn.iphonedev.tv/lecture/92173/19-swift-qa-day-1/


#4

Tried the link and just kept getting this error:
Lost connection to MySQL server at ‘reading initial communication packet’, system error: 111

I will check back later.
-Lindsey


#5

Working on it! Will update the post when it’s up.

-Paul


#6

Hi
I’m sorry I just registered for the course and I’m hoping to catch up ! :slight_smile:
but when I wrote the code in the first lesson I had some problems , here is my code and the errors !

 import UIKit

class ViewController: UIViewController {

    var myFirstLabel: UILabel!
    var iPhoneLabel: UILabel!
    
    
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
    myFirstLabel = UILabel()
    myFirstLabel.text = "My First"
    myFirstLabel.font = UIFont.systemFontOfSize(36)
    myFirstLabel.sizeToFit()
    myFirstLabel.center = CGPoint(x: 100, y: 40)
    myFirstLabel.addSubview(myFirstLabel)
    
    iPhoneLabel = UILabel()
    iPhoneLabel.text = "Iphone App"
    iPhoneLabel.font = UIFont.boldSystemFontOfSize(48)
    iPhoneLabel.sizeToFit()
    iPhoneLabel.center = CGPoint(x: 200, y: 90)
    iPhoneLabel.addSubview(iPhoneLabel)
    
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }


}

The errors :
console :

libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 

AppDelegate.swift file

class AppDelegate: UIResponder, UIApplicationDelegate {    

Iget the yellow sign |> signal SIGABRT

،،،
so How can I fix this problem ?!
Thanks in Advance :smiley:


#8

Watch the troubleshooting video. It’ll show you how to diagnose that error and fix it.


#9

Ok , Thank you :smile:
and Thanks for the fast respond :slight_smile: