5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Swift Doge App

Last updated at Posted at 2014-06-05

Doge犬のアプリを作ってみました。
Objective Cとの違い点はUIImageのinitializationは簡単にりました!

        var image: UIImage = UIImage(named: "dog.png")
        dogImageView.image = image

Screen Shot 2014-06-05 at 18.26.18.jpg

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.
    }
}
5
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?