Revision af89c1fb

View differences:

ChatSecure.xcodeproj/project.pbxproj
109 109
		63FCB1371DA3224A00A801F2 /* OTRSignalEncryptionHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63FCB1361DA3224A00A801F2 /* OTRSignalEncryptionHelper.swift */; };
110 110
		7A6540ECCA04445E88F06962 /* Pods_ChatSecureCorePods_ChatSecureTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 281981F599E0F5C8397E6A3F /* Pods_ChatSecureCorePods_ChatSecureTests.framework */; };
111 111
		8F56C3272EBE7F45BC8F925A /* OTRMessagesLoadingView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8F56C50436DA64774EBB16E3 /* OTRMessagesLoadingView.xib */; };
112
		9212364E1FCD779D009F97F0 /* OTRMessageUnknownSenderCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9212364C1FCD779C009F97F0 /* OTRMessageUnknownSenderCell.swift */; };
113
		921236501FCD77B7009F97F0 /* OTRMessageUnknownSenderCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9212364D1FCD779C009F97F0 /* OTRMessageUnknownSenderCell.xib */; };
112 114
		9236F56B1F21FFA600C963D0 /* OTRGroupAvatarGenerator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9236F56A1F21FFA600C963D0 /* OTRGroupAvatarGenerator.swift */; };
113 115
		924F67C51EA5541C00528FB6 /* MigrationInfoHeaderView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 924F67C41EA5541C00528FB6 /* MigrationInfoHeaderView.xib */; };
114 116
		924F67C71EA55C6F00528FB6 /* MigrationInfoHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 924F67C61EA55C6F00528FB6 /* MigrationInfoHeaderView.swift */; };
......
1019 1021
		7A62FCE8FEC1E7C9644F8C38 /* Pods-ChatSecureCorePods-ChatSecure.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ChatSecureCorePods-ChatSecure.release.xcconfig"; path = "Pods/Target Support Files/Pods-ChatSecureCorePods-ChatSecure/Pods-ChatSecureCorePods-ChatSecure.release.xcconfig"; sourceTree = "<group>"; };
1020 1022
		8F56C50436DA64774EBB16E3 /* OTRMessagesLoadingView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = OTRMessagesLoadingView.xib; sourceTree = "<group>"; };
1021 1023
		9118152C0A7B287ABD07FF70 /* Pods-ChatSecureCorePods-ChatSecureCore.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ChatSecureCorePods-ChatSecureCore.release.xcconfig"; path = "Pods/Target Support Files/Pods-ChatSecureCorePods-ChatSecureCore/Pods-ChatSecureCorePods-ChatSecureCore.release.xcconfig"; sourceTree = "<group>"; };
1024
		9212364C1FCD779C009F97F0 /* OTRMessageUnknownSenderCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OTRMessageUnknownSenderCell.swift; sourceTree = "<group>"; };
1025
		9212364D1FCD779C009F97F0 /* OTRMessageUnknownSenderCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = OTRMessageUnknownSenderCell.xib; sourceTree = "<group>"; };
1022 1026
		9236F56A1F21FFA600C963D0 /* OTRGroupAvatarGenerator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OTRGroupAvatarGenerator.swift; sourceTree = "<group>"; };
1023 1027
		924F67C41EA5541C00528FB6 /* MigrationInfoHeaderView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = MigrationInfoHeaderView.xib; path = Interface/MigrationInfoHeaderView.xib; sourceTree = "<group>"; };
1024 1028
		924F67C61EA55C6F00528FB6 /* MigrationInfoHeaderView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MigrationInfoHeaderView.swift; sourceTree = "<group>"; };
......
1745 1749
				D9C6E6A01B71575300572273 /* OTRUsernameCell.swift */,
1746 1750
				92CC68F01F42FF8D0006CDF8 /* OTRComposeGroupBuddyCell.swift */,
1747 1751
				92CC68F21F43054E0006CDF8 /* OTRComposeGroupBuddyCell.xib */,
1752
				9212364C1FCD779C009F97F0 /* OTRMessageUnknownSenderCell.swift */,
1753
				9212364D1FCD779C009F97F0 /* OTRMessageUnknownSenderCell.xib */,
1748 1754
			);
1749 1755
			path = Cells;
1750 1756
			sourceTree = "<group>";
......
2635 2641
				D97070921EEF382D004FEBDE /* MediaDownloadView.xib in Resources */,
2636 2642
				924F68591EA7A31A00528FB6 /* MigratedBuddyHeaderView.xib in Resources */,
2637 2643
				8F56C3272EBE7F45BC8F925A /* OTRMessagesLoadingView.xib in Resources */,
2644
				921236501FCD77B7009F97F0 /* OTRMessageUnknownSenderCell.xib in Resources */,
2638 2645
			);
2639 2646
			runOnlyForDeploymentPostprocessing = 0;
2640 2647
		};
......
3067 3074
				D93DDA861BA79A2400CD8331 /* OTREncryptionManager.m in Sources */,
3068 3075
				D93DDA881BA79A2400CD8331 /* OTROAuthRefresher.m in Sources */,
3069 3076
				6340431B1BD5BCD800ECA95A /* OTRXMPPRoomMessage.swift in Sources */,
3077
				9212364E1FCD779D009F97F0 /* OTRMessageUnknownSenderCell.swift in Sources */,
3070 3078
				D93DDA891BA79A2400CD8331 /* OTRProtocolManager.m in Sources */,
3071 3079
				63DC417B1BB3767100D42857 /* Errors.swift in Sources */,
3072 3080
				D93DDA8A1BA79A2400CD8331 /* OTRSettingsManager.m in Sources */,
ChatSecure/Classes/Views/Cells/OTRMessageUnknownSenderCell.swift
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
}
ChatSecure/Classes/Views/Cells/OTRMessageUnknownSenderCell.xib
1
<?xml version="1.0" encoding="UTF-8"?>
2
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
3
    <device id="retina4_7" orientation="portrait">
4
        <adaptation id="fullscreen"/>
5
    </device>
6
    <dependencies>
7
        <deployment identifier="iOS"/>
8
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13527"/>
9
        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
10
        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
11
    </dependencies>
12
    <objects>
13
        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
14
        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
15
        <collectionReusableView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="22J-kO-64R" customClass="OTRMessagesUnknownSenderCell" customModule="ChatSecureCore">
16
            <rect key="frame" x="0.0" y="0.0" width="375" height="50"/>
17
            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
18
            <subviews>
19
                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="1000" verticalHuggingPriority="1000" horizontalCompressionResistancePriority="1000" verticalCompressionResistancePriority="1000" text="No data" textAlignment="center" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tP4-Uw-Q8q">
20
                    <rect key="frame" x="10" y="10" width="355" height="30"/>
21
                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
22
                    <nil key="textColor"/>
23
                    <nil key="highlightedColor"/>
24
                </label>
25
            </subviews>
26
            <constraints>
27
                <constraint firstItem="2Di-RS-Jjo" firstAttribute="bottom" secondItem="tP4-Uw-Q8q" secondAttribute="bottom" constant="10" id="PTO-Cn-PH4"/>
28
                <constraint firstItem="2Di-RS-Jjo" firstAttribute="trailing" secondItem="tP4-Uw-Q8q" secondAttribute="trailing" constant="10" id="ZqZ-wZ-92N"/>
29
                <constraint firstItem="tP4-Uw-Q8q" firstAttribute="leading" secondItem="2Di-RS-Jjo" secondAttribute="leading" constant="10" id="lTY-I5-fsW"/>
30
                <constraint firstItem="tP4-Uw-Q8q" firstAttribute="top" secondItem="2Di-RS-Jjo" secondAttribute="top" constant="10" id="vjV-ke-Pc2"/>
31
            </constraints>
32
            <viewLayoutGuide key="safeArea" id="2Di-RS-Jjo"/>
33
            <connections>
34
                <outlet property="titleLabel" destination="tP4-Uw-Q8q" id="b4e-Ao-C3K"/>
35
            </connections>
36
        </collectionReusableView>
37
    </objects>
38
</document>

Also available in: Unified diff