[go: nahoru, domu]

Skip to content

Commit

Permalink
Fix assertion error
Browse files Browse the repository at this point in the history
  • Loading branch information
mono0926 committed Oct 1, 2017
1 parent fcf5fa4 commit ca56669
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions NativePopup/NativePopup.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ public class NativePopup: UIView {
$0.attributedText = NSAttributedString(string: $0.text ?? "", attributes: [.paragraphStyle: style])
}

effectView.addSubview(imageContentView)
effectView.addSubview(titleLabel)
effectView.contentView.addSubview(imageContentView)
effectView.contentView.addSubview(titleLabel)

imageContentView.heightAnchor.constraint(equalTo: imageContentView.widthAnchor, multiplier: 1).isActive = true
imageContentView.heightAnchor.constraint(equalToConstant: 112).isActive = true
Expand All @@ -99,7 +99,7 @@ public class NativePopup: UIView {
if message?.isEmpty ?? true {
titleLabel.bottomAnchor.constraint(equalTo: bottomAnchor, constant: -bottomSpace).isActive = true
} else {
effectView.addSubview(messageLabel)
effectView.contentView.addSubview(messageLabel)
titleLabel.bottomAnchor.constraint(equalTo: messageLabel.topAnchor, constant: -6).isActive = true
messageLabel.leftAnchor.constraint(equalTo: leftAnchor, constant: sideSpace).isActive = true
messageLabel.rightAnchor.constraint(equalTo: rightAnchor, constant: -sideSpace).isActive = true
Expand Down

0 comments on commit ca56669

Please sign in to comment.