import UIPOSTView
//init
let postViewController = UIPOSTViewController()
postViewController.delegate = self
//config
let style = UIPOSTStyle()
style.maxInputCount = 100
postViewController.postViewStyle = style
//present
self.present(postViewController, animated: true, completion: nil)
/// 背景顏色
public var backgroundColor: UIColor
/// 標題顏色
public var titleLabelColor: UIColor
/// 內容文字顏色
public var contentTextColor: UIColor
/// 上方Bar顏色
public var topBarColor: UIColor
/// 取消按鈕圖片
public var cancelImage: UIImage
/// 送出按鈕圖片
public var sendImage: UIImage
/// 限制文字顏色
public var limitLabelColor: UIColor
/// 最大限制文字數量
public var maxInputCount: Int
/// 標題文字
public var titleText: String
extension ViewController: UIPOSTViewControllerDelegate {
func onCanceled() {
NSLog("已經取消")
}
func onSended(string: String) {
NSLog("已經傳送")
}
}
pod 'UIPOSTView'
- iOS 10以上
League2EB
UIPOSTView is available under the MIT license. See the LICENSE file for more info.