forked from mirrors/linphone-iphone
rework chats / checkboxes
This commit is contained in:
parent
11e760d3b8
commit
9e9e23befb
6 changed files with 112 additions and 103 deletions
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
|
||||
|
|
@ -8,22 +8,11 @@
|
|||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ChatsListView">
|
||||
<connections>
|
||||
<outlet property="addButton" destination="Z5G-IF-PBY" id="Tzw-rz-Bwe"/>
|
||||
<outlet property="backButton" destination="10" id="FsP-zG-prA"/>
|
||||
<outlet property="deleteButton" destination="e4g-nB-qYa" id="NMN-nd-I3d"/>
|
||||
<outlet property="editButton" destination="UxT-TB-Ri4" id="ycg-Aw-nDB"/>
|
||||
<outlet property="tableController" destination="4" id="18"/>
|
||||
<outlet property="toggleSelectionButton" destination="9" id="I4D-lq-R48"/>
|
||||
<outlet property="view" destination="5" id="14"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewController autoresizesArchivedViewToFullSize="NO" id="4" userLabel="tableController" customClass="ChatsListTableView">
|
||||
<extendedEdge key="edgesForExtendedLayout"/>
|
||||
<nil key="simulatedStatusBarMetrics"/>
|
||||
<connections>
|
||||
<outlet property="view" destination="6" id="13"/>
|
||||
</connections>
|
||||
</tableViewController>
|
||||
<view contentMode="scaleToFill" id="WKv-mw-S2B" userLabel="iphone6MetricsView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
|
|
@ -40,17 +29,59 @@
|
|||
<rect key="frame" x="0.0" y="0.0" width="375" height="42"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
|
||||
</imageView>
|
||||
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" id="10" userLabel="backButton">
|
||||
<rect key="frame" x="0.0" y="0.0" width="75" height="42"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<accessibility key="accessibilityConfiguration" label="New Discussion"/>
|
||||
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" reversesTitleShadowWhenHighlighted="YES" showsTouchWhenHighlighted="YES" lineBreakMode="middleTruncation" id="uqG-2T-VOa" userLabel="toggleSelectionButton" customClass="UIIconButton">
|
||||
<rect key="frame" x="225" y="0.0" width="75" height="42"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<accessibility key="accessibilityConfiguration" label="Edit"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<inset key="titleEdgeInsets" minX="0.0" minY="18" maxX="0.0" maxY="0.0"/>
|
||||
<state key="normal" image="back.png">
|
||||
<state key="normal" image="select_all.png">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<state key="selected" image="deselect_all.png"/>
|
||||
<connections>
|
||||
<action selector="onEditToggle:" destination="-1" eventType="touchUpInside" id="ye7-fY-hzW"/>
|
||||
<action selector="onSelectionToggle:" destination="4" eventType="touchUpInside" id="ct6-0c-d1q"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="KhE-c3-2Zj" userLabel="cancelButton" customClass="UIIconButton">
|
||||
<rect key="frame" x="0.0" y="1" width="75" height="40"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<accessibility key="accessibilityConfiguration" label="Delete all"/>
|
||||
<inset key="titleEdgeInsets" minX="0.0" minY="18" maxX="0.0" maxY="0.0"/>
|
||||
<state key="normal" image="cancel_edit.png">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<state key="selected" backgroundImage="color_E.png"/>
|
||||
<connections>
|
||||
<action selector="onCancelClick:" destination="4" eventType="touchUpInside" id="8xd-cU-loG"/>
|
||||
<action selector="onEditionChangeClick:" destination="-1" eventType="touchUpInside" id="hKF-q1-5DJ"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="Rxo-0W-iqY" userLabel="deleteButton" customClass="UIIconButton">
|
||||
<rect key="frame" x="300" y="1" width="75" height="40"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<accessibility key="accessibilityConfiguration" label="Delete all"/>
|
||||
<inset key="titleEdgeInsets" minX="0.0" minY="18" maxX="0.0" maxY="0.0"/>
|
||||
<state key="normal" image="delete.png">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<state key="selected" backgroundImage="color_E.png"/>
|
||||
<connections>
|
||||
<action selector="onDeleteClick:" destination="-1" eventType="touchUpInside" id="m6p-pf-GLX"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="qem-Y1-v78" userLabel="editButton" customClass="UIIconButton">
|
||||
<rect key="frame" x="300" y="1" width="75" height="40"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<accessibility key="accessibilityConfiguration" label="Edit"/>
|
||||
<inset key="titleEdgeInsets" minX="0.0" minY="18" maxX="0.0" maxY="0.0"/>
|
||||
<state key="normal" image="edit_list.png">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<state key="selected" backgroundImage="color_E.png"/>
|
||||
<connections>
|
||||
<action selector="onEditClick:" destination="4" eventType="touchUpInside" id="COv-sY-0TU"/>
|
||||
<action selector="onEditionChangeClick:" destination="-1" eventType="touchUpInside" id="e2C-A0-kjU"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" id="Z5G-IF-PBY" userLabel="addButton">
|
||||
|
|
@ -66,42 +97,6 @@
|
|||
<action selector="onAddClick:" destination="-1" eventType="touchUpInside" id="g4q-By-6nW"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" id="9" userLabel="toggleSelectionButton">
|
||||
<rect key="frame" x="211.00000607732113" y="0.0" width="76" height="42"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<accessibility key="accessibilityConfiguration" label="Edit"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<inset key="titleEdgeInsets" minX="0.0" minY="18" maxX="0.0" maxY="0.0"/>
|
||||
<state key="normal" image="select_all.png">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="onSelectionToggle:" destination="-1" eventType="touchUpInside" id="cGl-4j-f3b"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" id="UxT-TB-Ri4" userLabel="editButton">
|
||||
<rect key="frame" x="300" y="0.0" width="75" height="42"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<accessibility key="accessibilityConfiguration" label="Edit"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<inset key="titleEdgeInsets" minX="0.0" minY="18" maxX="0.0" maxY="0.0"/>
|
||||
<state key="normal" image="edit_list.png">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="onEditToggle:" destination="-1" eventType="touchUpInside" id="WZN-yP-LAu"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" id="e4g-nB-qYa" userLabel="deleteButton">
|
||||
<rect key="frame" x="300" y="0.0" width="75" height="42"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<accessibility key="accessibilityConfiguration" label="Edit"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<inset key="titleEdgeInsets" minX="0.0" minY="18" maxX="0.0" maxY="0.0"/>
|
||||
<state key="normal" image="delete.png">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
</button>
|
||||
</subviews>
|
||||
</view>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" allowsSelectionDuringEditing="YES" allowsMultipleSelectionDuringEditing="YES" showsSelectionImmediatelyOnTouchBegin="NO" rowHeight="60" sectionHeaderHeight="22" sectionFooterHeight="22" id="6" userLabel="tableView">
|
||||
|
|
@ -122,14 +117,27 @@
|
|||
<color key="backgroundColor" red="1" green="1" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina47"/>
|
||||
</view>
|
||||
<tableViewController autoresizesArchivedViewToFullSize="NO" id="4" userLabel="tableController" customClass="ChatsListTableView">
|
||||
<extendedEdge key="edgesForExtendedLayout"/>
|
||||
<nil key="simulatedStatusBarMetrics"/>
|
||||
<connections>
|
||||
<outlet property="cancelButton" destination="KhE-c3-2Zj" id="0BM-Q1-ZaR"/>
|
||||
<outlet property="deleteButton" destination="Rxo-0W-iqY" id="vsb-dD-1zl"/>
|
||||
<outlet property="editButton" destination="qem-Y1-v78" id="Ba4-I1-fI5"/>
|
||||
<outlet property="toggleSelectionButton" destination="uqG-2T-VOa" id="ytx-bj-7Qr"/>
|
||||
<outlet property="view" destination="6" id="13"/>
|
||||
</connections>
|
||||
</tableViewController>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="back.png" width="25" height="22"/>
|
||||
<image name="chat_add.png" width="33" height="30"/>
|
||||
<image name="cancel_edit.png" width="29" height="29"/>
|
||||
<image name="chat_add.png" width="32" height="29"/>
|
||||
<image name="color_E.png" width="1" height="1"/>
|
||||
<image name="color_F.png" width="1" height="1"/>
|
||||
<image name="delete.png" width="22" height="28"/>
|
||||
<image name="edit_list.png" width="31" height="29"/>
|
||||
<image name="select_all.png" width="27" height="27"/>
|
||||
<image name="delete.png" width="21" height="27"/>
|
||||
<image name="deselect_all.png" width="26" height="26"/>
|
||||
<image name="edit_list.png" width="29" height="28"/>
|
||||
<image name="select_all.png" width="26" height="26"/>
|
||||
</resources>
|
||||
<simulatedMetricsContainer key="defaultSimulatedMetrics">
|
||||
<simulatedStatusBarMetrics key="statusBar"/>
|
||||
|
|
|
|||
|
|
@ -28,14 +28,10 @@
|
|||
}
|
||||
|
||||
@property(nonatomic, strong) IBOutlet ChatsListTableView *tableController;
|
||||
@property(nonatomic, strong) IBOutlet UIButton *editButton;
|
||||
@property(weak, nonatomic) IBOutlet UIButton *toggleSelectionButton;
|
||||
@property(weak, nonatomic) IBOutlet UIButton *backButton;
|
||||
@property(weak, nonatomic) IBOutlet UIButton *addButton;
|
||||
@property(weak, nonatomic) IBOutlet UIButton *deleteButton;
|
||||
|
||||
- (IBAction)onAddClick:(id)event;
|
||||
- (IBAction)onEditToggle:(id)event;
|
||||
- (IBAction)onSelectionToggle:(id)sender;
|
||||
- (IBAction)onEditionChangeClick:(id)sender;
|
||||
- (IBAction)onDeleteClick:(id)sender;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -79,17 +79,24 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
[view setChatRoom:NULL];
|
||||
}
|
||||
|
||||
- (void)setEditing:(BOOL)editing {
|
||||
[_tableController setEditing:editing animated:TRUE];
|
||||
_toggleSelectionButton.hidden = _backButton.hidden = _deleteButton.hidden = !editing;
|
||||
_addButton.hidden = _editButton.hidden = editing;
|
||||
- (IBAction)onEditionChangeClick:(id)sender {
|
||||
_addButton.hidden = self.tableController.isEditing;
|
||||
}
|
||||
|
||||
- (IBAction)onEditToggle:(id)event {
|
||||
[self setEditing:!_tableController.isEditing];
|
||||
- (IBAction)onDeleteClick:(id)sender {
|
||||
NSString *msg =
|
||||
[NSString stringWithFormat:NSLocalizedString(@"Are you sure that you want to delete %d conversations?", nil),
|
||||
_tableController.selectedItems.count];
|
||||
[UIConfirmationDialog ShowWithMessage:msg
|
||||
onCancelClick:^() {
|
||||
[self onEditionChangeClick:nil];
|
||||
}
|
||||
onConfirmationClick:^() {
|
||||
[_tableController removeSelection];
|
||||
[_tableController loadData];
|
||||
[self onEditionChangeClick:nil];
|
||||
}];
|
||||
}
|
||||
|
||||
- (IBAction)onSelectionToggle:(id)sender {
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
|
||||
|
|
@ -16,16 +16,24 @@
|
|||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="17">
|
||||
<rect key="frame" x="0.0" y="0.0" width="360" height="60"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="60"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" image="avatar.png" id="19" userLabel="avatarImage" customClass="UIRoundedImageView">
|
||||
<rect key="frame" x="8" y="2" width="44" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<rect key="frame" x="8" y="2" width="46" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
</imageView>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="2" contentMode="left" text="11:15" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" minimumFontSize="1" id="r7A-Mk-LQX" userLabel="chatLatestTimeLabel">
|
||||
<rect key="frame" x="8" y="45" width="46" height="15"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<accessibility key="accessibilityConfiguration" label="Contact name"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="25"/>
|
||||
<color key="textColor" red="1" green="0.36862745099999999" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="2" contentMode="left" usesAttributedText="YES" lineBreakMode="tailTruncation" minimumFontSize="10" adjustsFontSizeToFit="NO" id="20" userLabel="addressLabel">
|
||||
<rect key="frame" x="60" y="0.0" width="260" height="31"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<rect key="frame" x="63" y="0.0" width="271" height="31"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<accessibility key="accessibilityConfiguration" label="Contact name"/>
|
||||
<attributedString key="attributedText">
|
||||
<fragment content="John ">
|
||||
|
|
@ -46,28 +54,20 @@
|
|||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="2" contentMode="left" text="This is a placeholder message" lineBreakMode="tailTruncation" numberOfLines="3" adjustsFontSizeToFit="NO" id="21" userLabel="chatContentLabel">
|
||||
<rect key="frame" x="60" y="31" width="300" height="29"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<rect key="frame" x="63" y="31" width="312" height="29"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<accessibility key="accessibilityConfiguration" label="Message"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="VDt-hI-meD" userLabel="unreadCountButton" customClass="UIIconButton">
|
||||
<rect key="frame" x="332" y="4" width="27" height="27"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<rect key="frame" x="346" y="4" width="28" height="27"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<state key="normal" title="0" backgroundImage="chat_list_indicator.png">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
</button>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="2" contentMode="left" text="11:15" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" minimumFontSize="1" id="r7A-Mk-LQX" userLabel="chatLatestTimeLabel">
|
||||
<rect key="frame" x="8" y="45" width="44" height="15"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<accessibility key="accessibilityConfiguration" label="Contact name"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="25"/>
|
||||
<color key="textColor" red="1" green="0.36862745099999999" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<nil key="simulatedStatusBarMetrics"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
|
|
@ -75,8 +75,8 @@
|
|||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="avatar.png" width="261" height="261"/>
|
||||
<image name="chat_list_indicator.png" width="21" height="21"/>
|
||||
<image name="avatar.png" width="255" height="255"/>
|
||||
<image name="chat_list_indicator.png" width="20" height="20"/>
|
||||
</resources>
|
||||
<simulatedMetricsContainer key="defaultSimulatedMetrics">
|
||||
<simulatedStatusBarMetrics key="statusBar"/>
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@
|
|||
@property(nonatomic, strong) IBOutlet UIRoundedImageView *avatarImage;
|
||||
@property (nonatomic, strong) IBOutlet UILabel* addressLabel;
|
||||
@property (nonatomic, strong) IBOutlet UILabel* chatContentLabel;
|
||||
@property (nonatomic, strong) IBOutlet UIButton * deleteButton;
|
||||
@property(weak, nonatomic) IBOutlet UILabel *chatLatestTimeLabel;
|
||||
@property(weak, nonatomic) IBOutlet UIIconButton *unreadCountButton;
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@
|
|||
@synthesize avatarImage;
|
||||
@synthesize addressLabel;
|
||||
@synthesize chatContentLabel;
|
||||
@synthesize deleteButton;
|
||||
@synthesize unreadCountButton;
|
||||
|
||||
#pragma mark - Lifecycle Functions
|
||||
|
|
@ -37,10 +36,11 @@
|
|||
NSArray *arrayOfViews =
|
||||
[[NSBundle mainBundle] loadNibNamed:NSStringFromClass(self.class) owner:self options:nil];
|
||||
|
||||
if ([arrayOfViews count] >= 1) {
|
||||
|
||||
[self.contentView addSubview:[arrayOfViews objectAtIndex:0]];
|
||||
}
|
||||
// resize cell to match .nib size. It is needed when resized the cell to
|
||||
// correctly adapt its height too
|
||||
UIView *sub = ((UIView *)[arrayOfViews objectAtIndex:0]);
|
||||
[self setFrame:CGRectMake(0, 0, sub.frame.size.width, sub.frame.size.height)];
|
||||
[self addSubview:sub];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
|
@ -114,11 +114,10 @@
|
|||
[UIView beginAnimations:nil context:nil];
|
||||
[UIView setAnimationDuration:0.3];
|
||||
}
|
||||
[super setEditing:editing animated:animated];
|
||||
if (editing) {
|
||||
[deleteButton setAlpha:1.0f];
|
||||
[unreadCountButton setAlpha:0.0f];
|
||||
} else {
|
||||
[deleteButton setAlpha:0.0f];
|
||||
[unreadCountButton setAlpha:1.0f];
|
||||
}
|
||||
if (animated) {
|
||||
[UIView commitAnimations];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue