-
Notifications
You must be signed in to change notification settings - Fork 0
3.Usage
Nazmi Yavuz edited this page Dec 5, 2024
·
1 revision
To run the example project, clone the repo, and run pod install from the Example directory first.
import UIKit
import EdgeKit
class ViewController: UIViewController {
private let firstView: UIView = {
$0.backgroundColor = .systemPurple
$0.layer.cornerRadius = 5
return $0
}(UIView())
private let secondView: UIView = {
$0.backgroundColor = .systemOrange
$0.layer.cornerRadius = 5
return $0
}(UIView())
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
view.addSubview(firstView)
firstView.top(to: .parentView(inSafeArea: true), padding: 16)
firstView.left(to: .parentView(inSafeArea: true), padding: 16)
firstView.setSize(width: 200, height: 200)
view.addSubview(secondView)
secondView.anchor(leftAnchor: .leftEdge(of: firstView),
topAnchor: .bottomEdge(of: firstView),
rightAnchor: .rightEdge(of: firstView),
topPadding: 20)
secondView.setHeight(100)
}
}
1.Home | 2.Instalation | 3.Usage | 4.License | 5.Communication
Copyright © 2024-2025 Nazmi Yavuz