xib 하나 만듦. 비어있는 View 추가

File Inspector 탭에서 Use Safe Area Layout Guides 해제

Simulated Metrics에서 Size를 Freeform 으로 변경

Size Inspector 탭에서 600, 309 로 width, height 변경

내부에 view 추가(Background view)

Background view 내부에 stack view 추가(Content view)


        btnQuestionMark.addTarget(self, action: #selector(btnQuestionmark), for: .touchUpInside)



@IBAction func btnQuestionmark() {

        let view: BottomDialogView = try! SwiftMessages.viewFromNib()

        view.configureDropShadow()

        view.cancelAction = { SwiftMessages.hide() }

        var config = SwiftMessages.defaultConfig

        config.presentationContext = .window(windowLevel: UIWindowLevelStatusBar)

        config.duration = .forever

        config.presentationStyle = .bottom

        config.dimMode = .gray(interactive: true)

        SwiftMessages.show(config: config, view: view)

    }


주의할 점 : Interface Builder 에서 Ctrl+C, V로 생성된 박스는 인식 안됨.



'{BE} Python 3.1x' 카테고리의 다른 글

Alamofire SwiftyJSON  (0) 2020.06.23
log 출력  (0) 2020.06.23
swift free book pdf  (0) 2020.06.23
swift 4.2에서 잘되는 background timer  (0) 2020.06.23
swift badge  (0) 2020.06.23

+ Recent posts