You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.
你好,我在使用您的MMPopupView时遇到这个情况,自定义的View无法显示,一直找不到原因,以下是我的代码 能否麻烦您帮我看一下是不是哪里错了呢,感谢
`import UIKit
import ChameleonFramework
enum ShareType {
case TOPIC
case STATION
}
class ShareView: MMPopupView {
typealias cancelAc = ()
typealias confirmAc = () -> Void
internal var cancelBlock: cancelAc?
private var confirmBlock: confirmAc?
// 标题
private var titleLabel: UILabel = {
let label = UILabel()
label.textColor = FlatNavyBlue()
label.textAlignment = .Center
label.font = UIFont.systemFontOfSize(15)
label.layer.borderWidth = 0.3
label.layer.borderColor = FlatWhite().CGColor
label.backgroundColor = UIColor.vcMainColor()
label.layer.masksToBounds = true
return label
}()
// 确定 按钮
private var confirmBtn: UIButton = {
let confirmBtn = UIButton()
confirmBtn.titleLabel?.font = UIFont.systemFontOfSize(14)
confirmBtn.setTitleColor(FlatNavyBlueDark(), forState: .Normal)
confirmBtn.backgroundColor = UIColor.vcMainColor()
return confirmBtn
}()
// 图片
private var shareImageView: UIImageView = {
let imageView = UIImageView()
imageView.layer.cornerRadius = 5.0
imageView.layer.masksToBounds = true
return imageView
}()
// 正文标题
private var shareTitle: UILabel = {
let label = UILabel()
label.textColor = FlatBlack()
label.font = UIFont.systemFontOfSize(15)
return label
}()
// 正文
private var shareContentLabel: UILabel = {
let label = UILabel()
label.font = UIFont.systemFontOfSize(12)
label.textColor = FlatGray()
label.backgroundColor = UIColor.vcMainColor()
label.layer.cornerRadius = 1.0
label.layer.masksToBounds = true
return label
}()
// 标题 Title
internal var mainTitle: String? = "提示"{
didSet{
titleLabel.text = mainTitle
}
}
// ShareView背景色
internal var viewColor: UIColor? = UIColor.whiteColor(){
didSet{
self.backgroundColor = viewColor
}
}
// 确定按钮 Title
internal var confirmTitle: String? = "确定"{
didSet{
confirmBtn.setTitle(confirmTitle, forState: .Normal)
}
}
// 确定按钮 TitleColor
internal var confirmBtnTitleColor: UIColor? = FlatNavyBlueDark(){
didSet{
confirmBtn.setTitleColor(confirmBtnTitleColor, forState: .Normal)
}
}
override init(frame: CGRect) {
super.init(frame: frame)
}
// 取消按钮-事件
func cancel(){
The text was updated successfully, but these errors were encountered: