chatsecureios / ChatSecure / Classes / Views / Cells / OTRMessageUnknownSenderCell.swift @ af89c1fb
History | View | Annotate | Download (695 Bytes)
| 1 |
// |
|---|---|
| 2 |
// OTRMessageUnknownSenderCell.swift |
| 3 |
// ChatSecureCore |
| 4 |
// |
| 5 |
// Created by N-Pex on 2017-11-27. |
| 6 |
// Copyright © 2017 Chris Ballinger. All rights reserved. |
| 7 |
// |
| 8 |
|
| 9 |
@objc public class OTRMessagesUnknownSenderCell: UICollectionReusableView {
|
| 10 |
@objc public static let reuseIdentifier = "unknownSenderCell" |
| 11 |
|
| 12 |
@objc @IBOutlet open weak var titleLabel:UILabel! |
| 13 |
|
| 14 |
override open func layoutSubviews() {
|
| 15 |
super.layoutSubviews() |
| 16 |
for view in subviews {
|
| 17 |
if let label = view as? UILabel {
|
| 18 |
if label.numberOfLines == 0 {
|
| 19 |
label.preferredMaxLayoutWidth = label.bounds.width |
| 20 |
} |
| 21 |
} |
| 22 |
} |
| 23 |
|
| 24 |
} |
| 25 |
} |