AccessibilityUIExamples/Buttons/ButtonSubclassViewController.swift
/* |
See LICENSE folder for this sample’s licensing information. |
Abstract: |
View controller demonstrating an accessible, custom NSButton subclass. |
*/ |
import Cocoa |
class ButtonSubclassViewController: ButtonBaseViewController { |
// MARK: - View Controller Lifecycle |
override func viewDidLoad() { |
super.viewDidLoad() |
button.setAccessibilityLabel(NSLocalizedString("My label", comment: "label to use for this button")) |
} |
} |
Copyright © 2017 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2017-09-12