반응형
iOS Swift UISheetPresentationController.Detent (하프 모달 Half screen size custom modal drag bottom sheet present)
안녕하세요 Gons 입니다. 반만 나오는 하프 모달 바텀 시트입니다. 드래그해서 크기를 변경할 수도 있습니다. iOS 15 부터 지원합니다. 전체 코드 import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() let btn = UIButton(type: .system) view.addSubview(btn) btn.frame = .init(x: 100, y: 100, width: 100, height: 100) btn.setTitle("presentModal", for: .normal) btn.addTarget(self, action: #selector(presentModalBt..
iOS Swift + UIKit
2022. 9. 1. 00:00
반응형