Created
June 5, 2016 11:13
-
-
Save olxios/7b5bbe9fc5268fd963c7db0c30014482 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class PageItemController: UIViewController { | |
// MARK: - Variables | |
// *** | |
var itemIndex: Int = 0 | |
// *** | |
var imageName: String = "" { | |
didSet { | |
if let imageView = contentImageView { | |
imageView.image = UIImage(named: imageName) | |
} | |
} | |
} | |
@IBOutlet var contentImageView: UIImageView? | |
// MARK: - View Lifecycle | |
// *** | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
contentImageView!.image = UIImage(named: imageName) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment