QuartzDemo/DetailViewController.swift
/* |
Copyright (C) 2017 Apple Inc. All Rights Reserved. |
See LICENSE.txt for this sample’s licensing information |
Abstract: |
A DetailViewController from the 'Master-Detail Application' template in Xcode 8.3.2. |
*/ |
import UIKit |
class DetailViewController: UIViewController { |
@IBOutlet weak var detailDescriptionLabel: UILabel! |
func configureView() { |
// Update the user interface for the detail item. |
if let detail = detailItem { |
if let label = detailDescriptionLabel { |
label.text = detail.description |
} |
} |
} |
override func viewDidLoad() { |
super.viewDidLoad() |
// Do any additional setup after loading the view, typically from a nib. |
configureView() |
} |
override func didReceiveMemoryWarning() { |
super.didReceiveMemoryWarning() |
// Dispose of any resources that can be recreated. |
} |
var detailItem: NSDate? { |
didSet { |
// Update the view. |
configureView() |
} |
} |
} |
Copyright © 2017 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2017-09-19