Skip to content

Instantly share code, notes, and snippets.

@myersjac
myersjac / hasTopNotch.swift
Created July 9, 2019 19:01
if device has Top notch #swift #ios
var hasTopNotch: Bool {
if #available(iOS 11.0, tvOS 11.0, *) {
return UIApplication.shared.delegate?.window??.safeAreaInsets.top ?? 0 > 20
}
return false
}