I moved the UIDevice.current.safeAreaInsets value into a constant to avoid using it directly in multiple places.
Before:
.padding(.bottom, UIDevice.current.safeAreaInsets.bottom)
After:
enum Constant {
static let safeAreaInsets = UIDevice.current.safeAreaInsets
}
.padding(.bottom, Constant.safeAreaInsets.bottom)
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: