forked from mirrors/linphone-iphone
ui cell color
This commit is contained in:
parent
7cc12f25ee
commit
9d2226c7db
6 changed files with 38 additions and 9 deletions
|
|
@ -1252,8 +1252,9 @@ static void linphone_iphone_popup_password_request(LinphoneCore *lc, LinphoneAut
|
|||
[msgData setObject:[NSNumber numberWithBool:isFileTransfer] forKey:@"isFileTransfer"];
|
||||
[msgData setObject:fromImageData forKey:@"fromImageData"];
|
||||
if (isFileTransfer) {
|
||||
// TODO
|
||||
[msgData setObject:[UIChatBubbleTextCell TextMessageForChat:msg] forKey:@"msg"];
|
||||
LinphoneContent *file = linphone_chat_message_get_file_transfer_information(msg);
|
||||
const char *filename = linphone_content_get_name(file);
|
||||
[msgData setObject:[NSString stringWithUTF8String:filename] forKey:@"msg"];
|
||||
} else {
|
||||
[msgData setObject:[UIChatBubbleTextCell TextMessageForChat:msg] forKey:@"msg"];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,6 +71,8 @@
|
|||
5E31290C20D7A37E00CF3AAE /* latestChatroomsWidget.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 5E31290020D7A37E00CF3AAE /* latestChatroomsWidget.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
|
||||
5E31291320D7AAA100CF3AAE /* avatar.png in Resources */ = {isa = PBXBuildFile; fileRef = 633FEBE61D3CD5570014B822 /* avatar.png */; };
|
||||
5E31291A20D7AAAD00CF3AAE /* chat_group_avatar.png in Resources */ = {isa = PBXBuildFile; fileRef = 8C2A81941F87B8000012A66B /* chat_group_avatar.png */; };
|
||||
5E3391EC20E387E000F66299 /* color_A.png in Resources */ = {isa = PBXBuildFile; fileRef = 633FEC701D3CD5570014B822 /* color_A.png */; };
|
||||
5E3391F320E387E700F66299 /* color_D.png in Resources */ = {isa = PBXBuildFile; fileRef = 633FEC721D3CD5570014B822 /* color_D.png */; };
|
||||
5E58962420DCE5700030868C /* UserNotifications.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C73477B1D9BA3A00022EE8C /* UserNotifications.framework */; };
|
||||
5E58962620DCE5700030868C /* UserNotificationsUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E58962520DCE5700030868C /* UserNotificationsUI.framework */; };
|
||||
5E58962A20DCE5700030868C /* NotificationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E58962920DCE5700030868C /* NotificationViewController.m */; };
|
||||
|
|
@ -4209,7 +4211,9 @@
|
|||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
5E3391F320E387E700F66299 /* color_D.png in Resources */,
|
||||
5E58962D20DCE5700030868C /* MainInterface.storyboard in Resources */,
|
||||
5E3391EC20E387E000F66299 /* color_A.png in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -18,15 +18,15 @@
|
|||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<prototypes>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="notificationCell" id="4dO-Sq-LtB" customClass="NotificationTableViewCell">
|
||||
<rect key="frame" x="0.0" y="28" width="375" height="44"/>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="notificationCell" rowHeight="100" id="4dO-Sq-LtB" customClass="NotificationTableViewCell">
|
||||
<rect key="frame" x="0.0" y="28" width="375" height="100"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="4dO-Sq-LtB" id="Q3t-C0-U1O">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="100"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="OXj-8D-5BS">
|
||||
<rect key="frame" x="60" y="10" width="305" height="23.5"/>
|
||||
<rect key="frame" x="60" y="10" width="305" height="80"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="WZa-ow-o0L">
|
||||
<rect key="frame" x="0.0" y="0.0" width="305" height="17"/>
|
||||
|
|
@ -38,13 +38,12 @@
|
|||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" text="Lorem ipsum " textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="3tK-2u-Ixe">
|
||||
<rect key="frame" x="0.0" y="17" width="305" height="0.0"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<rect key="frame" x="0.0" y="17" width="305" height="42.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
|
||||
</textView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gv1-l8-gh3">
|
||||
<rect key="frame" x="0.0" y="17" width="305" height="6.5"/>
|
||||
<rect key="frame" x="0.0" y="59.5" width="305" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
|
|
@ -67,17 +66,35 @@
|
|||
<constraint firstAttribute="width" constant="40" id="kWJ-Qu-esd"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="color_A.png" translatesAutoresizingMaskIntoConstraints="NO" id="Wh2-bk-96C" userLabel="BottomBar">
|
||||
<rect key="frame" x="0.0" y="99" width="375" height="1"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="xx0-Om-qom"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<imageView userInteractionEnabled="NO" alpha="0.20000000000000001" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="color_A.png" translatesAutoresizingMaskIntoConstraints="NO" id="FHB-G3-atz">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="100"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="OXj-8D-5BS" firstAttribute="top" secondItem="Q3t-C0-U1O" secondAttribute="top" constant="10" id="9no-0X-SIc"/>
|
||||
<constraint firstItem="SKQ-W1-Lmw" firstAttribute="top" secondItem="Q3t-C0-U1O" secondAttribute="top" constant="10" id="EqG-ZA-H0w"/>
|
||||
<constraint firstItem="Wh2-bk-96C" firstAttribute="centerX" secondItem="Q3t-C0-U1O" secondAttribute="centerX" id="GiJ-VV-sUL"/>
|
||||
<constraint firstItem="FHB-G3-atz" firstAttribute="centerX" secondItem="Q3t-C0-U1O" secondAttribute="centerX" id="Il9-x1-er0"/>
|
||||
<constraint firstItem="FHB-G3-atz" firstAttribute="centerY" secondItem="Q3t-C0-U1O" secondAttribute="centerY" id="M94-ru-dxk"/>
|
||||
<constraint firstAttribute="trailing" secondItem="OXj-8D-5BS" secondAttribute="trailing" constant="10" id="Oq5-ST-lUC"/>
|
||||
<constraint firstItem="FHB-G3-atz" firstAttribute="top" secondItem="Q3t-C0-U1O" secondAttribute="top" id="UHW-lR-QSP"/>
|
||||
<constraint firstItem="SKQ-W1-Lmw" firstAttribute="leading" secondItem="Q3t-C0-U1O" secondAttribute="leading" constant="10" id="ZPR-9n-0E4"/>
|
||||
<constraint firstItem="FHB-G3-atz" firstAttribute="leading" secondItem="Q3t-C0-U1O" secondAttribute="leading" id="d7N-zS-IjG"/>
|
||||
<constraint firstItem="OXj-8D-5BS" firstAttribute="leading" secondItem="Q3t-C0-U1O" secondAttribute="leading" constant="60" id="e0Q-na-hor"/>
|
||||
<constraint firstItem="Wh2-bk-96C" firstAttribute="leading" secondItem="Q3t-C0-U1O" secondAttribute="trailing" constant="-375" id="hOW-4m-Ke6"/>
|
||||
<constraint firstAttribute="bottom" secondItem="OXj-8D-5BS" secondAttribute="bottom" constant="10" id="mVA-WG-D1q"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Wh2-bk-96C" secondAttribute="bottom" id="scj-em-N61"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<outlet property="background" destination="FHB-G3-atz" id="x5b-Bw-EFi"/>
|
||||
<outlet property="bottomBarColor" destination="Wh2-bk-96C" id="wxV-mb-eTf"/>
|
||||
<outlet property="contactImage" destination="SKQ-W1-Lmw" id="nsD-4b-g0W"/>
|
||||
<outlet property="imdm" destination="gv1-l8-gh3" id="ceS-Ho-kpi"/>
|
||||
<outlet property="msgText" destination="3tK-2u-Ixe" id="aVq-ra-Sd7"/>
|
||||
|
|
@ -97,4 +114,7 @@
|
|||
<point key="canvasLocation" x="-263.19999999999999" y="18.440779610194905"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="color_A.png" width="2" height="2"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
|
|||
|
|
@ -12,5 +12,7 @@
|
|||
@property (weak, nonatomic) IBOutlet UILabel *nameDate;
|
||||
@property (weak, nonatomic) IBOutlet UITextView *msgText;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *imdm;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *background;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *bottomBarColor;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
// Initialization code
|
||||
_contactImage.layer.cornerRadius = _contactImage.frame.size.height / 2;
|
||||
_contactImage.clipsToBounds = YES;
|
||||
[self.contentView sendSubviewToBack:_background];
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@
|
|||
msgText.UTF8String);
|
||||
printf("Taille de l'image de profil : %d\n", (unsigned int)imageData.length);
|
||||
NotificationTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"notificationCell" forIndexPath:indexPath];
|
||||
cell.background.image = cell.bottomBarColor.image = [UIImage imageNamed:isOutgoing ? @"color_A" : @"color_D.png"];
|
||||
cell.contactImage.image = [UIImage imageWithData:imageData];
|
||||
cell.nameDate.text = display;
|
||||
cell.msgText.text = msgText;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue