leading or trailing horizontal alignment before iOS 11

For me the problem was in using trailing leading alignment on UIButton itself. Safe area seems to be completely fine to use – it’s backward compatible and it translates into proper super view margins. But this feature is iOS 11 only, so use standard left / right alignment instead if you are targeting lower iOS … Read more

Safe Area of Xcode 9

Safe Area is a layout guide (Safe Area Layout Guide). The layout guide representing the portion of your view that is unobscured by bars and other content. In iOS 11+, Apple is deprecating the top and bottom layout guides and replacing them with a single safe area layout guide. When the view is visible onscreen, … Read more

Get safe area inset top and bottom heights

Try this : In Objective C if (@available(iOS 11.0, *)) { UIWindow *window = UIApplication.sharedApplication.windows.firstObject; CGFloat topPadding = window.safeAreaInsets.top; CGFloat bottomPadding = window.safeAreaInsets.bottom; } In Swift if #available(iOS 11.0, *) { let window = UIApplication.shared.keyWindow let topPadding = window?.safeAreaInsets.top let bottomPadding = window?.safeAreaInsets.bottom } In Swift – iOS 13.0 and above // Use the first … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)