Skip to content

Instantly share code, notes, and snippets.

@jgonfer
Last active November 5, 2017 01:07
Show Gist options
  • Save jgonfer/c511466fd6ad2b594442d5b8a047ae5f to your computer and use it in GitHub Desktop.
Save jgonfer/c511466fd6ad2b594442d5b8a047ae5f to your computer and use it in GitHub Desktop.
Vector Images Tutorial for Xcode 9: https://github.com/jgonfer/vector-images-tutorial-xcode
override func viewDidLoad() {
super.viewDidLoad()
if #available(iOS 11.0, *) {
pumpkinPngImageView.adjustsImageSizeForAccessibilityContentSizeCategory = true
pumpkinPdfImageView.adjustsImageSizeForAccessibilityContentSizeCategory = true
} else {
// Fallback on earlier versions
}
}
override func viewDidLoad() {
super.viewDidLoad()
if #available(iOS 11.0, *) {
let image = UIImage(named: "first_large")
imagesBarItem.largeContentSizeImage = image
} else {
// Fallback on earlier versions
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment