* init * done * feat(mobile): integrate Galeria component for image preview and carousel Signed-off-by: Innei <tukon479@gmail.com> * revert Signed-off-by: Innei <tukon479@gmail.com> * chore: auto-fix linting and formatting issues --------- Signed-off-by: Innei <tukon479@gmail.com>
20 lines
599 B
Swift
20 lines
599 B
Swift
import UIKit
|
|
|
|
extension UINavigationBar {
|
|
|
|
func insert(to view: UIView) {
|
|
view.addSubview(self)
|
|
translatesAutoresizingMaskIntoConstraints = false
|
|
leftAnchor.constraint(equalTo: view.leftAnchor).isActive = true
|
|
rightAnchor.constraint(equalTo: view.rightAnchor).isActive = true
|
|
|
|
if #available(iOS 11.0, *) {
|
|
topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor)
|
|
.isActive = true
|
|
} else {
|
|
topAnchor.constraint(equalTo: view.topAnchor)
|
|
.isActive = true
|
|
}
|
|
}
|
|
}
|