티스토리 뷰
반응형
안녕하세요 오늘은 노치 Or Safe Area를 사용이 가능한지
check 하는 방법을 알아보겠습니다..
최근 아이폰들이 6plus 까지 13.0 버전 이상 업데이트가 되면서
더이상 버전으로는 Safe Area를 사용하지 여부를 알수 없게되었습니다.
그래서 최근에 찾다가 알아낸사실을
포스팅 할까 합니다.
사진에서 볼수 있듯 Buttom 에는 계속 있는것을 확인해볼수 있습니다.
extension UIDevice {
var hasNotch: Bool {
let bottom = UIApplication.shared.keyWindow?.safeAreaInsets.bottom ?? 0
return bottom > 0
}
}
if UIDevice.current.hasNotch {
//... consider notch
} else {
//... don't have to consider notch
}
확장해서 사용하시길 바래요.
반응형
'IOS' 카테고리의 다른 글
WWDC21) swift actor 대한 간략한 생각 (0) | 2022.06.18 |
---|---|
[Swift] AutoClosure 에 대해서... (0) | 2022.04.26 |
Swift) [WindowScene] Failed to Error....designated entry point is not set? (0) | 2020.08.25 |
Sandbox account "sign out" (0) | 2020.08.11 |
Swift) How to convert a Substring to a String (0) | 2020.08.05 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- iPhone X safe area size
- How to get version swift
- 쇼미더머니6
- Swift check notch
- Swift 앱 버전
- Swift app version check
- Sandbox account sign out
- Android
- 맛집
- Swift label underline storyboard
- firebase remote config
- 샤브샤브
- Swift version code
- Swift button text underline
- Swift 노치 구분
- [WindowScene] Failed to Error
- autoclosure
- Swift textField max length
- SceneDelegate error
- Sandbox test login on
- Swift button underline programmatically
- android notification
- swift uitextfield 글자수 제한
- swift actor
- 위메프
- Bundle main infodictionary swift 4
- swift autoclosure
- Sandbox account logout
- wwdc21 actor
- [WindowScene] Failed to instantiate the default view controller for UIMainStoryboardFile 'Main' - perhaps the designated entry point is not set?
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
글 보관함