欢迎光临
我们一直在努力

一种更好的交互方式

建站超值云服务器,限时71元/月

一种更好的交互方式

项目介绍:

Translation to STPopup

Overview

There are two ways to provide,formSheetbottomSheet,and you can customize backgroundView.
You just need to touch the bar and then move down to close.

Installtion

  • Cocoapods

pod MTPopup

  • Carthage

github "huangboju/MTPopup"

Usage

  • BottomSheet


`github "huangboju/MTPopup"`

# Usage

* **BottomSheet**

class YourController: UIViewController {

override func viewDidLoad() {

class YourController: UIViewController {

override func viewDidLoad() {
    super.viewDidLoad()

    contentSizeInPopup = CGSize(width: 300, height: 200)
    landscapeContentSizeInPopup = CGSize(width: 400, height: 200)
}

}

let popupController = MTPopupController(rootViewController: YourController())
popupController.style = .bottomSheet // Default is formSheet
popupController.present(in: self)


* **Custom backgroundView**

swift
let popupController = MTPopupController(rootViewController: YourController())

let blurEffect = UIBlurEffect(style: .dark)
popupController.backgroundView = UIVisualEffectView(effect: blurEffect)
popupController.backgroundView?.alpha = 0.8
popupController.present(in: self)

github地址:
https://github.com/huangboju/MTPopup
code4app

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 一种更好的交互方式
分享到: 更多 (0)