로딩
요청 처리 중입니다...

[iOS/Swift] 개발때 사용하기 좋은 UI View Extension

 [iOS/Swift] 개발때 사용하기 좋은 UI View Extension

1. Shadow under UIView - 뷰 밑 그림자 생성 extension UIView { func dropShadow() { self.layer.shadowColor = UIColor.gray.cgColor self.layer.shadowOpacity = 0.3 self.layer.shadowOffset = CGSize(width: 2, height: 4) self.layer.shadowRadius = 5 } } 2. present ViewController extension UIViewController { func openMain() { if let viewController = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(identifier: "MainViewController") as?

MainViewController { viewController.modalPresentationStyle = ...