Doge犬のアプリを作ってみました。
Objective Cとの違い点はUIImageのinitializationは簡単にりました!
var image: UIImage = UIImage(named: "dog.png")
dogImageView.image = image
import UIKit
class ViewController: UIViewController {
@IBOutlet var dogImageView : UIImageView = nil
override func viewDidLoad() {
super.viewDidLoad()
let label = UILabel()
label.frame = CGRect(x: 30.0, y: 30.0, width:200.0, height:200.0)
label.text = "Much Swift"
self.view.addSubview(label)
var image: UIImage = UIImage(named: "dog.png")
dogImageView.image = image
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}