Retired Document
Important: This document may not represent best practices for current development. Links to downloads and other resources may no longer be valid.
CloudPhotos (OS X).swift/CloudPhotos/ImageViewController.swift
/* |
Copyright (C) 2017 Apple Inc. All Rights Reserved. |
See LICENSE.txt for this sample’s licensing information |
Abstract: |
View controller that shows the photo in a popover. |
*/ |
import Cocoa |
import Foundation |
class ImageViewController : NSViewController { |
// MARK: - Properties |
var image: NSImage! |
@IBOutlet private weak var imageView: NSImageView! |
// MARK: - View Controller Lifecycle |
override func viewDidAppear() { |
super.viewDidAppear() |
guard image != nil else { return } |
imageView.image = image |
} |
} |
Copyright © 2017 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2017-03-09