forked from mirrors/linphone-iphone
UI: fix rotation in chat when hidding/showing keyboard
This commit is contained in:
parent
15ccbeebbe
commit
0eaba9c674
4 changed files with 382 additions and 146 deletions
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9059" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9060" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9051"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ChatConversationView">
|
||||
|
|
@ -14,11 +14,13 @@
|
|||
<outlet property="chatView" destination="49" id="Rxt-Zy-19x"/>
|
||||
<outlet property="composeIndicatorView" destination="fx4-ao-53M" id="xk5-nK-lur"/>
|
||||
<outlet property="composeLabel" destination="fpY-Fv-ht2" id="4L6-ik-ZAe"/>
|
||||
<outlet property="landscapeView" destination="VoU-7Q-fgp" id="iRJ-sh-thF"/>
|
||||
<outlet property="listSwipeGestureRecognizer" destination="dzw-n4-l9i" id="JVP-Vl-lIa"/>
|
||||
<outlet property="listTapGestureRecognizer" destination="tkk-Tm-A7C" id="gqU-iJ-RGm"/>
|
||||
<outlet property="messageField" destination="pqa-tg-5ml" id="emj-yI-K60"/>
|
||||
<outlet property="messageView" destination="14" id="89"/>
|
||||
<outlet property="pictureButton" destination="73" id="84"/>
|
||||
<outlet property="portraitView" destination="6" id="xJJ-1H-6N6"/>
|
||||
<outlet property="sendButton" destination="15" id="27"/>
|
||||
<outlet property="tableController" destination="29" id="32"/>
|
||||
<outlet property="topBar" destination="7" id="JH8-F4-Bdq"/>
|
||||
|
|
@ -30,22 +32,22 @@
|
|||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" id="6">
|
||||
<view tag="1" contentMode="scaleToFill" id="6">
|
||||
<rect key="frame" x="0.0" y="42" width="375" height="559"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" id="7" userLabel="topBar">
|
||||
<view tag="2" contentMode="scaleToFill" id="7" userLabel="topBar">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="color_F.png" id="v5G-Qf-X82" userLabel="backgroundColor">
|
||||
<imageView userInteractionEnabled="NO" tag="3" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="color_F.png" id="v5G-Qf-X82" userLabel="backgroundColor">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
</imageView>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" id="9" userLabel="backButton" customClass="UIIconButton">
|
||||
<button opaque="NO" tag="4" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" id="9" userLabel="backButton" customClass="UIIconButton">
|
||||
<rect key="frame" x="0.0" y="0.0" width="75" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<accessibility key="accessibilityConfiguration" label="Back"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
|
|
@ -59,7 +61,7 @@
|
|||
<action selector="onBackClick:" destination="-1" eventType="touchUpInside" id="12"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Contact1" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="10" id="40" userLabel="addressLabel">
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="5" contentMode="left" text="Contact1" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="10" id="40" userLabel="addressLabel">
|
||||
<rect key="frame" x="75" y="0.0" width="150" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
|
|
@ -70,9 +72,9 @@
|
|||
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="Wzg-i0-spp" userLabel="callButton" customClass="UIIconButton">
|
||||
<button opaque="NO" tag="6" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="Wzg-i0-spp" userLabel="callButton" customClass="UIIconButton">
|
||||
<rect key="frame" x="225" y="0.0" width="75" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<state key="normal" image="call_alt_start_default.png">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
|
|
@ -83,9 +85,9 @@
|
|||
<action selector="onCallClick:" destination="-1" eventType="touchUpInside" id="Dsf-nS-K3V"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="Hc0-GX-fC5" userLabel="backToCallButton" customClass="UIBackToCallButton">
|
||||
<button opaque="NO" tag="7" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="Hc0-GX-fC5" userLabel="backToCallButton" customClass="UIBackToCallButton">
|
||||
<rect key="frame" x="225" y="0.0" width="75" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<state key="normal" image="call_back_default.png">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
|
|
@ -96,9 +98,9 @@
|
|||
<action selector="onBackToCallClick:" destination="-2" eventType="touchUpInside" id="bOG-ra-UpM"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="Wag-Nx-kd6" userLabel="deleteButton" customClass="UIIconButton">
|
||||
<button hidden="YES" opaque="NO" tag="8" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="Wag-Nx-kd6" userLabel="deleteButton" customClass="UIIconButton">
|
||||
<rect key="frame" x="300" y="0.0" width="75" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<accessibility key="accessibilityConfiguration" label="Delete all"/>
|
||||
<inset key="titleEdgeInsets" minX="0.0" minY="18" maxX="0.0" maxY="0.0"/>
|
||||
|
|
@ -111,9 +113,9 @@
|
|||
<action selector="onDeleteClick:" destination="-1" eventType="touchUpInside" id="JoY-wC-JQy"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="FqM-Ud-i58" userLabel="editButton" customClass="UIIconButton">
|
||||
<button opaque="NO" tag="9" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="FqM-Ud-i58" userLabel="editButton" customClass="UIIconButton">
|
||||
<rect key="frame" x="300" y="0.0" width="75" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<accessibility key="accessibilityConfiguration" label="Edit"/>
|
||||
<inset key="titleEdgeInsets" minX="0.0" minY="18" maxX="0.0" maxY="0.0"/>
|
||||
|
|
@ -127,9 +129,9 @@
|
|||
<action selector="onEditionChangeClick:" destination="-1" eventType="touchUpInside" id="0we-lw-TyJ"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" reversesTitleShadowWhenHighlighted="YES" showsTouchWhenHighlighted="YES" lineBreakMode="middleTruncation" id="c9z-aq-2UP" userLabel="toggleSelectionButton" customClass="UIIconButton">
|
||||
<button hidden="YES" opaque="NO" tag="10" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" reversesTitleShadowWhenHighlighted="YES" showsTouchWhenHighlighted="YES" lineBreakMode="middleTruncation" id="c9z-aq-2UP" userLabel="toggleSelectionButton" customClass="UIIconButton">
|
||||
<rect key="frame" x="225" y="0.0" width="75" height="69"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<accessibility key="accessibilityConfiguration" label="Select all"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
|
|
@ -144,9 +146,9 @@
|
|||
<action selector="onSelectionToggle:" destination="29" eventType="touchUpInside" id="eP5-bU-LEA"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="bci-3K-AcG" userLabel="cancelButton" customClass="UIIconButton">
|
||||
<button hidden="YES" opaque="NO" tag="11" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="bci-3K-AcG" userLabel="cancelButton" customClass="UIIconButton">
|
||||
<rect key="frame" x="0.0" y="0.0" width="75" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<accessibility key="accessibilityConfiguration" label="Cancel"/>
|
||||
<inset key="titleEdgeInsets" minX="0.0" minY="18" maxX="0.0" maxY="0.0"/>
|
||||
|
|
@ -163,11 +165,11 @@
|
|||
</subviews>
|
||||
<animations/>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" id="49" userLabel="contentView">
|
||||
<view tag="12" contentMode="scaleToFill" id="49" userLabel="contentView">
|
||||
<rect key="frame" x="0.0" y="66" width="375" height="493"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="none" allowsSelection="NO" allowsSelectionDuringEditing="YES" allowsMultipleSelectionDuringEditing="YES" rowHeight="60" sectionHeaderHeight="22" sectionFooterHeight="22" id="8" userLabel="messagesTableView">
|
||||
<tableView clipsSubviews="YES" tag="13" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="none" allowsSelection="NO" allowsSelectionDuringEditing="YES" allowsMultipleSelectionDuringEditing="YES" rowHeight="60" sectionHeaderHeight="22" sectionFooterHeight="22" id="8" userLabel="messagesTableView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="399"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<animations/>
|
||||
|
|
@ -180,11 +182,11 @@
|
|||
<outletCollection property="gestureRecognizers" destination="tkk-Tm-A7C" appends="YES" id="rxU-cr-Kav"/>
|
||||
</connections>
|
||||
</tableView>
|
||||
<view contentMode="scaleToFill" id="fx4-ao-53M" userLabel="composeIndicatorView">
|
||||
<view hidden="YES" tag="14" contentMode="scaleToFill" id="fx4-ao-53M" userLabel="composeIndicatorView">
|
||||
<rect key="frame" x="0.0" y="404" width="375" height="22"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="%@ is composing..." lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="10" id="fpY-Fv-ht2" userLabel="composeLabel">
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="15" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="%@ is composing..." lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="10" id="fpY-Fv-ht2" userLabel="composeLabel">
|
||||
<rect key="frame" x="0.0" y="1" width="375" height="22"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<animations/>
|
||||
|
|
@ -196,25 +198,25 @@
|
|||
<animations/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="No conversation." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="p7C-WH-uR1" userLabel="emptyTableLabel">
|
||||
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" tag="16" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="No conversation." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="p7C-WH-uR1" userLabel="emptyTableLabel">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="430"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" id="14" userLabel="messageView">
|
||||
<view tag="17" contentMode="scaleToFill" id="14" userLabel="messageView">
|
||||
<rect key="frame" x="0.0" y="427" width="375" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="color_F.png" id="pGT-LQ-zpg" userLabel="backgroundColor">
|
||||
<imageView userInteractionEnabled="NO" tag="18" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="color_F.png" id="pGT-LQ-zpg" userLabel="backgroundColor">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<animations/>
|
||||
</imageView>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="73" userLabel="pictureButton">
|
||||
<button opaque="NO" tag="19" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="73" userLabel="pictureButton">
|
||||
<rect key="frame" x="0.0" y="2" width="63" height="63"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
|
|
@ -228,14 +230,14 @@
|
|||
<action selector="onPictureClick:" destination="-1" eventType="touchUpInside" id="87"/>
|
||||
</connections>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" id="pqa-tg-5ml" userLabel="messageField" customClass="HPGrowingTextView">
|
||||
<view tag="20" contentMode="scaleToFill" id="pqa-tg-5ml" userLabel="messageField" customClass="HPGrowingTextView">
|
||||
<rect key="frame" x="71" y="14" width="233" height="40"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<accessibility key="accessibilityConfiguration" label="Message field"/>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" enabled="NO" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="15" userLabel="sendButton">
|
||||
<button opaque="NO" tag="21" contentMode="scaleToFill" enabled="NO" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="15" userLabel="sendButton">
|
||||
<rect key="frame" x="312" y="2" width="63" height="63"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
|
|
@ -264,9 +266,250 @@
|
|||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<simulatedOrientationMetrics key="simulatedOrientationMetrics"/>
|
||||
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina47"/>
|
||||
<point key="canvasLocation" x="228.5" y="-40.5"/>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" id="680-UL-sil" userLabel="iphone6MetricsView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="736" height="414"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<view tag="1" contentMode="scaleToFill" id="VoU-7Q-fgp">
|
||||
<rect key="frame" x="90" y="42" width="646" height="372"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view tag="2" contentMode="scaleToFill" id="Z3y-hY-5xp" userLabel="topBar">
|
||||
<rect key="frame" x="0.0" y="0.0" width="646" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" tag="3" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="color_F.png" id="Uvs-m3-GPj" userLabel="backgroundColor">
|
||||
<rect key="frame" x="0.0" y="0.0" width="646" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
</imageView>
|
||||
<button opaque="NO" tag="4" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" id="N2g-vL-3x8" userLabel="backButton" customClass="UIIconButton">
|
||||
<rect key="frame" x="0.0" y="0.0" width="129" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<accessibility key="accessibilityConfiguration" label="Back"/>
|
||||
<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_default.png">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<state key="disabled" image="back_disabled.png"/>
|
||||
<state key="highlighted" backgroundImage="color_E.png"/>
|
||||
<connections>
|
||||
<action selector="onBackClick:" destination="-1" eventType="touchUpInside" id="oLf-ke-zgQ"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="5" contentMode="left" text="Contact1" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="10" id="uEp-mD-eik" userLabel="addressLabel">
|
||||
<rect key="frame" x="129" y="0.0" width="259" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<accessibility key="accessibilityConfiguration" label="Contact name">
|
||||
<accessibilityTraits key="traits" none="YES"/>
|
||||
</accessibility>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="22"/>
|
||||
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" tag="6" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="wag-QV-oUD" userLabel="callButton" customClass="UIIconButton">
|
||||
<rect key="frame" x="388" y="0.0" width="129" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<state key="normal" image="call_alt_start_default.png">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<state key="disabled" image="call_alt_start_disabled.png"/>
|
||||
<state key="highlighted" backgroundImage="color_E.png"/>
|
||||
<connections>
|
||||
<action selector="onCallClick:" destination="-1" eventType="touchUpInside" id="gcb-ac-VkW"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" tag="7" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="t25-en-4LP" userLabel="backToCallButton" customClass="UIBackToCallButton">
|
||||
<rect key="frame" x="388" y="0.0" width="129" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<state key="normal" image="call_back_default.png">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<state key="disabled" image="call_back_disabled.png"/>
|
||||
<state key="highlighted" backgroundImage="color_E.png"/>
|
||||
<connections>
|
||||
<action selector="onBackToCallClick:" destination="-2" eventType="touchUpInside" id="5cp-dW-Oc7"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button hidden="YES" opaque="NO" tag="8" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="RDW-7W-25T" userLabel="deleteButton" customClass="UIIconButton">
|
||||
<rect key="frame" x="517" y="0.0" width="129" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<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_default.png">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<state key="disabled" image="delete_disabled.png"/>
|
||||
<state key="highlighted" backgroundImage="color_E.png"/>
|
||||
<connections>
|
||||
<action selector="onDeleteClick:" destination="-1" eventType="touchUpInside" id="NWL-CQ-eNR"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" tag="9" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="KeL-Ej-92j" userLabel="editButton" customClass="UIIconButton">
|
||||
<rect key="frame" x="517" y="0.0" width="129" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<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_default.png">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<state key="disabled" image="edit_list_disabled.png"/>
|
||||
<state key="highlighted" backgroundImage="color_E.png"/>
|
||||
<connections>
|
||||
<action selector="onEditClick:" destination="29" eventType="touchUpInside" id="4ei-sX-oIk"/>
|
||||
<action selector="onEditionChangeClick:" destination="-1" eventType="touchUpInside" id="fNp-ya-dag"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button hidden="YES" opaque="NO" tag="10" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" reversesTitleShadowWhenHighlighted="YES" showsTouchWhenHighlighted="YES" lineBreakMode="middleTruncation" id="4RV-US-Kr1" userLabel="toggleSelectionButton" customClass="UIIconButton">
|
||||
<rect key="frame" x="388" y="0.0" width="129" height="69"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<accessibility key="accessibilityConfiguration" label="Select all"/>
|
||||
<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="deselect_all.png">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<state key="disabled" image="select_all_disabled.png"/>
|
||||
<state key="selected" image="select_all_default.png"/>
|
||||
<state key="highlighted" backgroundImage="color_E.png"/>
|
||||
<connections>
|
||||
<action selector="onSelectionToggle:" destination="29" eventType="touchUpInside" id="17V-y4-JHi"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button hidden="YES" opaque="NO" tag="11" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="Bqf-Gg-2Rw" userLabel="cancelButton" customClass="UIIconButton">
|
||||
<rect key="frame" x="0.0" y="0.0" width="129" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<accessibility key="accessibilityConfiguration" label="Cancel"/>
|
||||
<inset key="titleEdgeInsets" minX="0.0" minY="18" maxX="0.0" maxY="0.0"/>
|
||||
<state key="normal" image="cancel_edit_default.png">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<state key="disabled" image="cancel_edit_disabled.png"/>
|
||||
<state key="highlighted" backgroundImage="color_E.png"/>
|
||||
<connections>
|
||||
<action selector="onCancelClick:" destination="29" eventType="touchUpInside" id="EVj-uP-wVf"/>
|
||||
<action selector="onEditionChangeClick:" destination="-1" eventType="touchUpInside" id="hGj-xz-K5n"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<animations/>
|
||||
</view>
|
||||
<view tag="12" contentMode="scaleToFill" id="OTt-fc-941" userLabel="contentView">
|
||||
<rect key="frame" x="0.0" y="66" width="646" height="306"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<tableView clipsSubviews="YES" tag="13" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="none" allowsSelection="NO" allowsSelectionDuringEditing="YES" allowsMultipleSelectionDuringEditing="YES" rowHeight="60" sectionHeaderHeight="22" sectionFooterHeight="22" id="CU7-Za-RwN" userLabel="messagesTableView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="646" height="222"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<gestureRecognizers/>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="29" id="hC0-KH-0e3"/>
|
||||
<outlet property="delegate" destination="29" id="sSq-5N-DaD"/>
|
||||
</connections>
|
||||
</tableView>
|
||||
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" tag="16" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="No conversation." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="pzm-tk-LH0" userLabel="emptyTableLabel">
|
||||
<rect key="frame" x="0.0" y="0.0" width="646" height="210"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view hidden="YES" tag="14" contentMode="scaleToFill" id="nTf-7h-Z4z" userLabel="composeIndicatorView">
|
||||
<rect key="frame" x="0.0" y="220" width="646" height="22"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="15" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="%@ is composing..." lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="10" id="I34-aL-yuS" userLabel="composeLabel">
|
||||
<rect key="frame" x="0.0" y="1" width="646" height="22"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<animations/>
|
||||
<accessibility key="accessibilityConfiguration" label=""/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<view tag="17" contentMode="scaleToFill" id="LA5-wD-ftj" userLabel="messageView">
|
||||
<rect key="frame" x="0.0" y="240" width="646" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" tag="18" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="color_F.png" id="kKc-DG-gwg" userLabel="backgroundColor">
|
||||
<rect key="frame" x="0.0" y="0.0" width="646" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<animations/>
|
||||
</imageView>
|
||||
<button opaque="NO" tag="19" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="gSL-jE-GYO" userLabel="pictureButton">
|
||||
<rect key="frame" x="0.0" y="2" width="63" height="63"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<accessibility key="accessibilityConfiguration" label="Send picture"/>
|
||||
<state key="normal" image="chat_attachment_default.png">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<state key="disabled" image="chat_attachment_disabled.png"/>
|
||||
<state key="highlighted" image="chat_attachment_over.png"/>
|
||||
<connections>
|
||||
<action selector="onPictureClick:" destination="-1" eventType="touchUpInside" id="Ag3-po-DGR"/>
|
||||
</connections>
|
||||
</button>
|
||||
<view tag="20" contentMode="scaleToFill" id="C02-2r-vXK" userLabel="messageField" customClass="HPGrowingTextView">
|
||||
<rect key="frame" x="122" y="14" width="402" height="40"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<accessibility key="accessibilityConfiguration" label="Message field"/>
|
||||
</view>
|
||||
<button opaque="NO" tag="21" contentMode="scaleToFill" enabled="NO" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="nV9-xZ-oSM" userLabel="sendButton">
|
||||
<rect key="frame" x="583" y="2" width="63" height="63"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<animations/>
|
||||
<accessibility key="accessibilityConfiguration" label="Send"/>
|
||||
<inset key="titleEdgeInsets" minX="0.0" minY="30" maxX="0.0" maxY="0.0"/>
|
||||
<state key="normal" image="chat_send_default.png">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<state key="disabled" image="chat_send_disabled.png"/>
|
||||
<state key="highlighted" image="chat_send_over.png"/>
|
||||
<connections>
|
||||
<action selector="onSendClick:" destination="-1" eventType="touchUpInside" id="dx4-lF-ekG"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<animations/>
|
||||
</view>
|
||||
</subviews>
|
||||
<animations/>
|
||||
</view>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<gestureRecognizers/>
|
||||
</view>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/>
|
||||
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina55"/>
|
||||
<point key="canvasLocation" x="252.5" y="-175.5"/>
|
||||
</view>
|
||||
<tableViewController autoresizesArchivedViewToFullSize="NO" id="29" userLabel="messagesTableView" customClass="ChatConversationTableView">
|
||||
<extendedEdge key="edgesForExtendedLayout"/>
|
||||
<nil key="simulatedStatusBarMetrics"/>
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@
|
|||
#include "linphone/linphonecore.h"
|
||||
|
||||
@interface ChatConversationView
|
||||
: UIViewController <HPGrowingTextViewDelegate, UICompositeViewDelegate, ImagePickerDelegate,
|
||||
ChatConversationDelegate, UISearchBarDelegate> {
|
||||
: TPMultiLayoutViewController <HPGrowingTextViewDelegate, UICompositeViewDelegate, ImagePickerDelegate,
|
||||
ChatConversationDelegate, UISearchBarDelegate> {
|
||||
LinphoneChatRoom *chatRoom;
|
||||
OrderedDictionary *imageQualities;
|
||||
BOOL scrollOnGrowingEnabled;
|
||||
|
|
|
|||
|
|
@ -77,7 +77,6 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
_messageField.font = [UIFont systemFontOfSize:18.0f];
|
||||
_messageField.contentInset = UIEdgeInsetsMake(0, -5, -2, -5);
|
||||
_messageField.internalTextView.scrollIndicatorInsets = UIEdgeInsetsMake(0, 0, 0, 10);
|
||||
|
||||
[_tableController setChatRoomDelegate:self];
|
||||
}
|
||||
|
||||
|
|
@ -136,18 +135,13 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
|
||||
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
|
||||
[super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
|
||||
// force offset recomputing
|
||||
composingVisible = !composingVisible;
|
||||
[self setComposingVisible:!composingVisible withDelay:0];
|
||||
[_backToCallButton update];
|
||||
[_tableController scrollToBottom:true];
|
||||
}
|
||||
|
||||
- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
|
||||
duration:(NSTimeInterval)duration {
|
||||
[super willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration];
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
[super didReceiveMemoryWarning];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
- (void)setChatRoom:(LinphoneChatRoom *)room {
|
||||
|
|
@ -199,6 +193,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
}
|
||||
[ContactDisplay setDisplayNameLabel:_addressLabel forAddress:addr];
|
||||
_addressLabel.accessibilityValue = _addressLabel.text;
|
||||
_composeLabel.text = [NSString stringWithFormat:NSLocalizedString(@"%@ is composing...", nil), _addressLabel.text];
|
||||
}
|
||||
|
||||
- (BOOL)sendMessage:(NSString *)message withExterlBodyUrl:(NSURL *)externalUrl withInternalURL:(NSURL *)internalUrl {
|
||||
|
|
@ -283,10 +278,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
CGRect newTableFrame = [_tableController.tableView frame];
|
||||
|
||||
if (visible) {
|
||||
_composeLabel.text =
|
||||
[NSString stringWithFormat:NSLocalizedString(@"%@ is composing...", nil), _addressLabel.text];
|
||||
// pull up the composing frame and shrink the table view
|
||||
|
||||
newTableFrame.size.height -= newComposingFrame.size.height;
|
||||
newComposingFrame.origin.y = keyboardFrame.origin.y - newComposingFrame.size.height;
|
||||
} else {
|
||||
|
|
@ -567,119 +559,120 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
- (void)keyboardWillHide:(NSNotification *)notif {
|
||||
NSTimeInterval duration = [[[notif userInfo] objectForKey:UIKeyboardAnimationDurationUserInfoKey] doubleValue];
|
||||
[UIView animateWithDuration:duration
|
||||
delay:0
|
||||
options:UIViewAnimationOptionBeginFromCurrentState
|
||||
animations:^{
|
||||
CGFloat composeIndicatorCompensation = composingVisible ? _composeIndicatorView.frame.size.height : 0.0f;
|
||||
delay:0
|
||||
options:UIViewAnimationOptionBeginFromCurrentState
|
||||
animations:^{
|
||||
CGFloat composeIndicatorCompensation = composingVisible ? _composeIndicatorView.frame.size.height : 0.0f;
|
||||
|
||||
// Show TabBar and status bar and also top bar
|
||||
[PhoneMainView.instance fullScreen:NO];
|
||||
if (UIInterfaceOrientationIsPortrait(self.interfaceOrientation)) {
|
||||
[PhoneMainView.instance showTabBar:YES];
|
||||
}
|
||||
[PhoneMainView.instance showStatusBar:YES];
|
||||
_topBar.alpha = 1.0;
|
||||
// Show TabBar and status bar and also top bar
|
||||
|
||||
// Resize chat view
|
||||
{
|
||||
CGRect chatFrame = [_chatView frame];
|
||||
chatFrame.origin.y = _topBar.frame.origin.y + _topBar.frame.size.height;
|
||||
chatFrame.size.height = [[self view] frame].size.height - chatFrame.origin.y;
|
||||
[_chatView setFrame:chatFrame];
|
||||
}
|
||||
// somehow, it breaks rotation if we put that in the block above when rotating portrait -> landscape
|
||||
// if (!UIInterfaceOrientationIsPortrait(self.interfaceOrientation)) {
|
||||
[PhoneMainView.instance showTabBar:YES];
|
||||
// }
|
||||
[PhoneMainView.instance showStatusBar:YES];
|
||||
[PhoneMainView.instance fullScreen:NO];
|
||||
_topBar.alpha = 1.0;
|
||||
|
||||
// Resize & Move table view
|
||||
{
|
||||
CGRect tableFrame = [_tableController.view frame];
|
||||
tableFrame.size.height =
|
||||
[_messageView frame].origin.y - tableFrame.origin.y - composeIndicatorCompensation;
|
||||
[_tableController.view setFrame:tableFrame];
|
||||
// Resize chat view
|
||||
{
|
||||
CGRect chatFrame = [_chatView frame];
|
||||
chatFrame.origin.y = _topBar.frame.origin.y + _topBar.frame.size.height;
|
||||
chatFrame.size.height = [[self view] frame].size.height - chatFrame.origin.y;
|
||||
[_chatView setFrame:chatFrame];
|
||||
}
|
||||
|
||||
// Scroll to bottom
|
||||
NSInteger lastSection = [_tableController.tableView numberOfSections] - 1;
|
||||
if (lastSection >= 0) {
|
||||
NSInteger lastRow = [_tableController.tableView numberOfRowsInSection:lastSection] - 1;
|
||||
if (lastRow >= 0) {
|
||||
[_tableController.tableView
|
||||
scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:lastRow inSection:lastSection]
|
||||
atScrollPosition:UITableViewScrollPositionBottom
|
||||
animated:FALSE];
|
||||
}
|
||||
}
|
||||
}
|
||||
// Resize & Move table view
|
||||
{
|
||||
CGRect tableFrame = [_tableController.view frame];
|
||||
tableFrame.size.height =
|
||||
[_messageView frame].origin.y - tableFrame.origin.y - composeIndicatorCompensation;
|
||||
[_tableController.view setFrame:tableFrame];
|
||||
|
||||
}
|
||||
completion:^(BOOL finished){
|
||||
}];
|
||||
// Scroll to bottom
|
||||
NSInteger lastSection = [_tableController.tableView numberOfSections] - 1;
|
||||
if (lastSection >= 0) {
|
||||
NSInteger lastRow = [_tableController.tableView numberOfRowsInSection:lastSection] - 1;
|
||||
if (lastRow >= 0) {
|
||||
[_tableController.tableView
|
||||
scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:lastRow inSection:lastSection]
|
||||
atScrollPosition:UITableViewScrollPositionBottom
|
||||
animated:FALSE];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
completion:^(BOOL finished){
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)keyboardWillShow:(NSNotification *)notif {
|
||||
NSTimeInterval duration = [[[notif userInfo] objectForKey:UIKeyboardAnimationDurationUserInfoKey] doubleValue];
|
||||
CGFloat composeIndicatorCompensation = composingVisible ? _composeIndicatorView.frame.size.height : 0.0f;
|
||||
|
||||
[UIView animateWithDuration:duration
|
||||
delay:0
|
||||
options:UIViewAnimationOptionBeginFromCurrentState
|
||||
animations:^{
|
||||
delay:0
|
||||
options:UIViewAnimationOptionBeginFromCurrentState
|
||||
animations:^{
|
||||
CGFloat composeIndicatorCompensation = composingVisible ? _composeIndicatorView.frame.size.height : 0.0f;
|
||||
|
||||
CGRect endFrame = [[[notif userInfo] objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue];
|
||||
CGRect endFrame = [[[notif userInfo] objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue];
|
||||
|
||||
if (([[UIDevice currentDevice].systemVersion floatValue] < 8) &&
|
||||
UIInterfaceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation)) {
|
||||
int width = endFrame.size.height;
|
||||
endFrame.size.height = endFrame.size.width;
|
||||
endFrame.size.width = width;
|
||||
}
|
||||
if (([[UIDevice currentDevice].systemVersion floatValue] < 8) &&
|
||||
UIInterfaceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation)) {
|
||||
int width = endFrame.size.height;
|
||||
endFrame.size.height = endFrame.size.width;
|
||||
endFrame.size.width = width;
|
||||
}
|
||||
|
||||
// Hide TabBar and status bar and also top bar
|
||||
[PhoneMainView.instance fullScreen:YES];
|
||||
if (UIInterfaceOrientationIsPortrait(self.interfaceOrientation)) {
|
||||
[PhoneMainView.instance showTabBar:NO];
|
||||
}
|
||||
[PhoneMainView.instance showStatusBar:NO];
|
||||
_topBar.alpha = 0.0;
|
||||
// Hide TabBar and status bar and also top bar
|
||||
if (UIInterfaceOrientationIsPortrait(self.interfaceOrientation)) {
|
||||
[PhoneMainView.instance showTabBar:NO];
|
||||
}
|
||||
[PhoneMainView.instance showStatusBar:NO];
|
||||
[PhoneMainView.instance fullScreen:YES];
|
||||
_topBar.alpha = 0.0;
|
||||
|
||||
// Resize chat view
|
||||
{
|
||||
CGRect viewFrame = [[self view] frame];
|
||||
CGRect rect = PhoneMainView.instance.view.bounds;
|
||||
CGPoint pos = {viewFrame.size.width, viewFrame.size.height};
|
||||
CGPoint gPos =
|
||||
[self.view convertPoint:pos
|
||||
toView:[UIApplication sharedApplication]
|
||||
.keyWindow.rootViewController.view]; // Bypass IOS bug on landscape mode
|
||||
float diff = (rect.size.height - gPos.y - endFrame.size.height);
|
||||
if (diff > 0)
|
||||
diff = 0;
|
||||
CGRect chatFrame = [_chatView frame];
|
||||
chatFrame.origin.y = 0;
|
||||
chatFrame.size.height = viewFrame.size.height - chatFrame.origin.y + diff;
|
||||
[_chatView setFrame:chatFrame];
|
||||
}
|
||||
// Resize chat view
|
||||
{
|
||||
CGRect viewFrame = [[self view] frame];
|
||||
CGRect rect = PhoneMainView.instance.view.bounds;
|
||||
CGPoint pos = {viewFrame.size.width, viewFrame.size.height};
|
||||
CGPoint gPos =
|
||||
[self.view convertPoint:pos
|
||||
toView:[UIApplication sharedApplication]
|
||||
.keyWindow.rootViewController.view]; // Bypass IOS bug on landscape mode
|
||||
float diff = (rect.size.height - gPos.y - endFrame.size.height);
|
||||
if (diff > 0)
|
||||
diff = 0;
|
||||
CGRect chatFrame = [_chatView frame];
|
||||
chatFrame.origin.y = 0;
|
||||
chatFrame.size.height = viewFrame.size.height - chatFrame.origin.y + diff;
|
||||
[_chatView setFrame:chatFrame];
|
||||
}
|
||||
|
||||
// Resize & Move table view
|
||||
{
|
||||
CGRect tableFrame = _tableController.view.frame;
|
||||
tableFrame.size.height =
|
||||
[_messageView frame].origin.y - tableFrame.origin.y - composeIndicatorCompensation;
|
||||
[_tableController.view setFrame:tableFrame];
|
||||
}
|
||||
// Resize & Move table view
|
||||
{
|
||||
CGRect tableFrame = _tableController.view.frame;
|
||||
tableFrame.size.height =
|
||||
[_messageView frame].origin.y - tableFrame.origin.y - composeIndicatorCompensation;
|
||||
[_tableController.view setFrame:tableFrame];
|
||||
}
|
||||
|
||||
// Scroll
|
||||
NSInteger lastSection = [_tableController.tableView numberOfSections] - 1;
|
||||
if (lastSection >= 0) {
|
||||
NSInteger lastRow = [_tableController.tableView numberOfRowsInSection:lastSection] - 1;
|
||||
if (lastRow >= 0) {
|
||||
[_tableController.tableView
|
||||
scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:lastRow inSection:lastSection]
|
||||
atScrollPosition:UITableViewScrollPositionBottom
|
||||
animated:FALSE];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
completion:^(BOOL finished){
|
||||
}];
|
||||
// Scroll
|
||||
NSInteger lastSection = [_tableController.tableView numberOfSections] - 1;
|
||||
if (lastSection >= 0) {
|
||||
NSInteger lastRow = [_tableController.tableView numberOfRowsInSection:lastSection] - 1;
|
||||
if (lastRow >= 0) {
|
||||
[_tableController.tableView
|
||||
scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:lastRow inSection:lastSection]
|
||||
atScrollPosition:UITableViewScrollPositionBottom
|
||||
animated:FALSE];
|
||||
}
|
||||
}
|
||||
}
|
||||
completion:^(BOOL finished){
|
||||
}];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -280,7 +280,7 @@ static const CGFloat CELL_IMAGE_WIDTH = 100.0f;
|
|||
|
||||
CGSize messageSize = [self ViewHeightForMessage:chat withWidth:width];
|
||||
CGSize dateSize = [self computeBoundingBox:[self ContactDateForChat:chat] size:dateViewSize font:dateFont];
|
||||
messageSize.width = MAX(MAX(messageSize.width, dateSize.width), CELL_MIN_WIDTH);
|
||||
messageSize.width = MAX(MAX(messageSize.width, dateSize.width + CELL_MESSAGE_X_MARGIN), CELL_MIN_WIDTH);
|
||||
|
||||
return messageSize;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue