Added numpad on outgoing call view if early media

This commit is contained in:
Christophe Deschamps 2021-01-22 07:57:49 +01:00
parent 4bf9105c30
commit e7cc4e922f
3 changed files with 351 additions and 12 deletions

View file

@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@ -11,17 +12,33 @@
<connections>
<outlet property="addressLabel" destination="2fa-Ag-3GW" id="2Oe-UW-rPC"/>
<outlet property="avatarImage" destination="bNo-O5-DWh" id="eqo-0s-UoN"/>
<outlet property="declineButton" destination="AaM-cH-pvW" id="nET-cl-Kfb"/>
<outlet property="declineButton_earlyMedia" destination="4AS-bf-34N" id="SQm-um-bgq"/>
<outlet property="eightButton" destination="t0H-I1-ukQ" id="vOh-0j-erj"/>
<outlet property="fiveButton" destination="iU3-pL-jRO" id="1wx-4h-Gvl"/>
<outlet property="fourButton" destination="Xfq-Ej-VHd" id="aAF-q4-Thm"/>
<outlet property="hashButton" destination="yiW-6Q-8Gn" id="SvV-4h-CQq"/>
<outlet property="landscapeView" destination="Czn-ec-dh8" id="ZIk-2g-9Qk"/>
<outlet property="microButton" destination="26e-Pj-2Oh" id="jXh-0n-yg7"/>
<outlet property="nameLabel" destination="d5s-yP-8VE" id="0VY-HP-ovD"/>
<outlet property="nineButton" destination="H98-w7-FtJ" id="Y29-sY-bs7"/>
<outlet property="numpadButton" destination="1Ya-Ok-b84" id="R3l-8u-Bcl"/>
<outlet property="numpadView" destination="5UV-gd-B5P" id="bOc-Em-4g1"/>
<outlet property="oneButton" destination="YNy-y3-Vfb" id="mib-jj-IWo"/>
<outlet property="portraitView" destination="25" id="26I-da-00C"/>
<outlet property="routesBluetoothButton" destination="SH1-xD-Agw" id="ifX-Dy-Tcb"/>
<outlet property="routesButton" destination="29K-Sd-aHF" id="MVM-Mb-OWE"/>
<outlet property="routesEarpieceButton" destination="zs4-Zy-FrP" id="TOt-D3-635"/>
<outlet property="routesSpeakerButton" destination="oKz-6p-EAF" id="yIx-qF-Gd7"/>
<outlet property="routesView" destination="iyf-nk-ORJ" id="LBJ-Rm-VUX"/>
<outlet property="sevenButton" destination="yAW-CE-SCK" id="Zhm-Oo-U7v"/>
<outlet property="sixButton" destination="c3c-wj-OO9" id="Dmk-J0-8Mc"/>
<outlet property="speakerButton" destination="G7m-Av-QlR" id="UHW-L2-NDM"/>
<outlet property="starButton" destination="MdJ-SK-bIH" id="Ri3-EC-1oq"/>
<outlet property="threeButton" destination="gXh-2W-waU" id="Neg-lD-uwc"/>
<outlet property="twoButton" destination="wrx-1J-g34" id="e17-3F-hcV"/>
<outlet property="view" destination="25" id="26"/>
<outlet property="zeroButton" destination="49E-lz-Dx1" id="Car-8R-zs1"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
@ -33,7 +50,7 @@
<rect key="frame" x="0.0" y="42" width="414" height="854"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" tag="2" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="NFl-sb-0TV" userLabel="headerBar">
<button opaque="NO" tag="2" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="NFl-sb-0TV" userLabel="headerBar">
<rect key="frame" x="0.0" y="0.0" width="414" height="66"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration">
@ -140,6 +157,34 @@
<action selector="onDeclineClick:" destination="-1" eventType="touchUpInside" id="Ebl-hM-8F9"/>
</connections>
</button>
<button opaque="NO" tag="3057" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="1Ya-Ok-b84" userLabel="numpadButton" customClass="UIToggleButton">
<rect key="frame" x="0.0" y="0.0" width="94" height="63"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES"/>
<accessibility key="accessibilityConfiguration" label="Back"/>
<state key="normal" image="footer_dialer_default.png" backgroundImage="color_C.png">
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<state key="disabled" image="footer_dialer_disabled.png"/>
<state key="selected" image="dialer_alt_back.png"/>
<state key="highlighted" backgroundImage="color_A.png"/>
<connections>
<action selector="onNumpadClick:" destination="-1" eventType="touchUpInside" id="EeE-il-gTD"/>
</connections>
</button>
<button opaque="NO" tag="3011" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4AS-bf-34N" userLabel="declineButton_earlyMedia">
<rect key="frame" x="93" y="0.0" width="114" height="63"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES"/>
<accessibility key="accessibilityConfiguration" label="Decline"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<state key="normal" image="call_hangup_default.png" backgroundImage="color_D.png">
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<state key="disabled" image="call_hangup_disabled.png"/>
<state key="highlighted" backgroundImage="color_I.png"/>
<connections>
<action selector="onDeclineClick:" destination="-1" eventType="touchUpInside" id="alt-Ma-tLc"/>
</connections>
</button>
<button opaque="NO" tag="9" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="26e-Pj-2Oh" userLabel="microButton" customClass="UIMutedMicroButton">
<rect key="frame" x="207" y="0.0" width="104" height="63"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES"/>
@ -204,12 +249,141 @@
<bool key="isElement" value="YES"/>
</accessibility>
</imageView>
<view hidden="YES" tag="3024" contentMode="scaleToFill" id="5UV-gd-B5P" userLabel="numpadView">
<rect key="frame" x="0.0" y="65" width="414" height="726"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" clearsContextBeforeDrawing="NO" tag="3025" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="YNy-y3-Vfb" userLabel="1" customClass="UIDigitButton">
<rect key="frame" x="-1" y="1" width="134" height="169"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.40000001000000002" green="1" blue="1" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<accessibility key="accessibilityConfiguration" label="1"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<state key="normal" image="numpad_1_default.png">
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<state key="selected" image="numpad_1_over.png"/>
<state key="highlighted" image="numpad_1_over.png" backgroundImage="numpad_over_background.png"/>
</button>
<button opaque="NO" clearsContextBeforeDrawing="NO" tag="3026" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="wrx-1J-g34" userLabel="2" customClass="UIDigitButton">
<rect key="frame" x="138" y="1" width="134" height="169"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="2"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<state key="normal" image="numpad_2_default.png">
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<state key="highlighted" image="numpad_2_over.png" backgroundImage="numpad_over_background.png"/>
</button>
<button opaque="NO" clearsContextBeforeDrawing="NO" tag="3027" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gXh-2W-waU" userLabel="3" customClass="UIDigitButton">
<rect key="frame" x="277" y="1" width="134" height="169"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="3"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<state key="normal" image="numpad_3_default.png">
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<state key="highlighted" image="numpad_3_over.png" backgroundImage="numpad_over_background.png"/>
</button>
<button opaque="NO" clearsContextBeforeDrawing="NO" tag="3028" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Xfq-Ej-VHd" userLabel="4" customClass="UIDigitButton">
<rect key="frame" x="-1" y="186" width="134" height="166"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="4"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<state key="normal" image="numpad_4_default.png">
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<state key="highlighted" image="numpad_4_over.png" backgroundImage="numpad_over_background.png"/>
</button>
<button opaque="NO" clearsContextBeforeDrawing="NO" tag="3029" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="iU3-pL-jRO" userLabel="5" customClass="UIDigitButton">
<rect key="frame" x="138" y="186" width="134" height="166"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="5"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<state key="normal" image="numpad_5_default.png">
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<state key="highlighted" image="numpad_5_over.png" backgroundImage="numpad_over_background.png"/>
</button>
<button opaque="NO" clearsContextBeforeDrawing="NO" tag="3030" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="c3c-wj-OO9" userLabel="6" customClass="UIDigitButton">
<rect key="frame" x="277" y="186" width="134" height="166"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="6"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<state key="normal" image="numpad_6_default.png">
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<state key="highlighted" image="numpad_6_over.png" backgroundImage="numpad_over_background.png"/>
</button>
<button opaque="NO" clearsContextBeforeDrawing="NO" tag="3031" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="yAW-CE-SCK" userLabel="7" customClass="UIDigitButton">
<rect key="frame" x="-1" y="360" width="134" height="166"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="7"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<state key="normal" image="numpad_7_default.png">
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<state key="highlighted" image="numpad_7_over.png" backgroundImage="numpad_over_background.png"/>
</button>
<button opaque="NO" clearsContextBeforeDrawing="NO" tag="3032" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="t0H-I1-ukQ" userLabel="8" customClass="UIDigitButton">
<rect key="frame" x="138" y="360" width="134" height="166"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="8"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<state key="normal" image="numpad_8_default.png">
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<state key="highlighted" image="numpad_8_over.png" backgroundImage="numpad_over_background.png"/>
</button>
<button opaque="NO" clearsContextBeforeDrawing="NO" tag="3033" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="H98-w7-FtJ" userLabel="9" customClass="UIDigitButton">
<rect key="frame" x="277" y="360" width="134" height="166"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="9"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<state key="normal" image="numpad_9_default.png">
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<state key="highlighted" image="numpad_9_over.png" backgroundImage="numpad_over_background.png"/>
</button>
<button opaque="NO" clearsContextBeforeDrawing="NO" tag="3034" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="MdJ-SK-bIH" userLabel="*" customClass="UIDigitButton">
<rect key="frame" x="-1" y="534" width="134" height="183"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="Star"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<state key="normal" image="numpad_star_default.png">
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<state key="highlighted" image="numpad_star_over.png" backgroundImage="numpad_over_background.png"/>
</button>
<button opaque="NO" clearsContextBeforeDrawing="NO" tag="3035" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="49E-lz-Dx1" userLabel="0" customClass="UIDigitButton">
<rect key="frame" x="138" y="534" width="134" height="183"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="0"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<state key="normal" image="numpad_0_default.png">
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<state key="highlighted" image="numpad_0_over.png" backgroundImage="numpad_over_background.png"/>
</button>
<button opaque="NO" clearsContextBeforeDrawing="NO" tag="3036" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="yiW-6Q-8Gn" userLabel="#" customClass="UIDigitButton">
<rect key="frame" x="277" y="534" width="134" height="183"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="Hash"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<state key="normal" image="numpad_hash_default.png">
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<state key="highlighted" image="numpad_hash_over.png" backgroundImage="numpad_over_background.png"/>
</button>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</view>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</view>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<point key="canvasLocation" x="42.753623188405797" y="111.49553571428571"/>
<point key="canvasLocation" x="42.028985507246382" y="111.16071428571428"/>
</view>
<view contentMode="scaleToFill" id="YAs-im-wvR" userLabel="iphone6MetricsView">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
@ -219,7 +393,7 @@
<rect key="frame" x="0.0" y="42" width="414" height="854"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" tag="2" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="oAv-Cz-FaR" userLabel="headerBar">
<button opaque="NO" tag="2" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="oAv-Cz-FaR" userLabel="headerBar">
<rect key="frame" x="0.0" y="0.0" width="414" height="66"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration">
@ -232,14 +406,14 @@
</state>
</button>
<label opaque="NO" userInteractionEnabled="NO" tag="5" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="john.doe@sip.linphone.org" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="8" translatesAutoresizingMaskIntoConstraints="NO" id="Fj8-Pu-ShI" userLabel="addressLabel">
<rect key="frame" x="184.5" y="425.5" width="228.5" height="84.5"/>
<rect key="frame" x="185" y="426" width="228" height="84"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="18"/>
<color key="textColor" red="0.98766469955444336" green="0.27512490749359131" blue="0.029739789664745331" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" tag="4" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="John Doe" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="19" translatesAutoresizingMaskIntoConstraints="NO" id="ubQ-ZN-AhT" userLabel="nameLabel">
<rect key="frame" x="184.5" y="310" width="229.5" height="95"/>
<rect key="frame" x="185" y="310" width="229" height="95"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="33"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@ -254,7 +428,7 @@
</accessibility>
</imageView>
<view hidden="YES" tag="37" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="EaW-SR-bqv" userLabel="routesView">
<rect key="frame" x="310.5" y="593" width="104" height="198"/>
<rect key="frame" x="311" y="593" width="104" height="198"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" tag="38" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="color_F.png" translatesAutoresizingMaskIntoConstraints="NO" id="Tvo-Jg-0h8" userLabel="backgroundColor">
@ -340,7 +514,7 @@
</connections>
</button>
<button opaque="NO" tag="9" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="jLg-1u-ulZ" userLabel="microButton" customClass="UIMutedMicroButton">
<rect key="frame" x="207" y="0.0" width="103.5" height="63"/>
<rect key="frame" x="207" y="0.0" width="104" height="63"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES"/>
<accessibility key="accessibilityConfiguration" label="Accept"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
@ -352,7 +526,7 @@
<state key="highlighted" backgroundImage="color_E.png"/>
</button>
<button hidden="YES" opaque="NO" tag="54" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="61B-DK-jZ6" userLabel="routesButton" customClass="UIToggleButton">
<rect key="frame" x="310.5" y="0.0" width="104" height="63"/>
<rect key="frame" x="311" y="0.0" width="104" height="63"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES"/>
<accessibility key="accessibilityConfiguration" label="Route"/>
<inset key="titleEdgeInsets" minX="0.0" minY="38" maxX="0.0" maxY="0.0"/>
@ -364,7 +538,7 @@
<state key="highlighted" backgroundImage="color_E.png"/>
</button>
<button opaque="NO" tag="10" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5CY-aN-NLX" userLabel="speakerButton" customClass="UISpeakerButton">
<rect key="frame" x="310.5" y="0.0" width="104" height="63"/>
<rect key="frame" x="311" y="0.0" width="104" height="63"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES"/>
<accessibility key="accessibilityConfiguration" label="Accept"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
@ -390,13 +564,43 @@
<image name="avatar.png" width="414.39999389648438" height="414.39999389648438"/>
<image name="call_hangup_default.png" width="67.199996948242188" height="58.400001525878906"/>
<image name="call_hangup_disabled.png" width="67.199996948242188" height="58.400001525878906"/>
<image name="color_A.png" width="2" height="2"/>
<image name="color_C.png" width="2" height="2"/>
<image name="color_D.png" width="2" height="2"/>
<image name="color_E.png" width="2" height="2"/>
<image name="color_F.png" width="2" height="2"/>
<image name="color_I.png" width="2" height="2"/>
<image name="dialer_alt_back.png" width="42.400001525878906" height="42.400001525878906"/>
<image name="footer_dialer_default.png" width="44" height="44"/>
<image name="footer_dialer_disabled.png" width="44" height="44"/>
<image name="micro_default.png" width="47.200000762939453" height="60"/>
<image name="micro_disabled.png" width="47.200000762939453" height="60"/>
<image name="micro_selected.png" width="47.200000762939453" height="60"/>
<image name="numpad_0_default.png" width="84.800003051757812" height="79.199996948242188"/>
<image name="numpad_0_over.png" width="84.800003051757812" height="79.199996948242188"/>
<image name="numpad_1_default.png" width="84.800003051757812" height="77.599998474121094"/>
<image name="numpad_1_over.png" width="84.800003051757812" height="77.599998474121094"/>
<image name="numpad_2_default.png" width="84.800003051757812" height="79.199996948242188"/>
<image name="numpad_2_over.png" width="84.800003051757812" height="79.199996948242188"/>
<image name="numpad_3_default.png" width="84.800003051757812" height="79.199996948242188"/>
<image name="numpad_3_over.png" width="84.800003051757812" height="79.199996948242188"/>
<image name="numpad_4_default.png" width="84.800003051757812" height="77.599998474121094"/>
<image name="numpad_4_over.png" width="84.800003051757812" height="77.599998474121094"/>
<image name="numpad_5_default.png" width="84.800003051757812" height="77.599998474121094"/>
<image name="numpad_5_over.png" width="84.800003051757812" height="77.599998474121094"/>
<image name="numpad_6_default.png" width="84.800003051757812" height="79.199996948242188"/>
<image name="numpad_6_over.png" width="84.800003051757812" height="79.199996948242188"/>
<image name="numpad_7_default.png" width="84.800003051757812" height="77.599998474121094"/>
<image name="numpad_7_over.png" width="84.800003051757812" height="77.599998474121094"/>
<image name="numpad_8_default.png" width="84.800003051757812" height="79.199996948242188"/>
<image name="numpad_8_over.png" width="84.800003051757812" height="79.199996948242188"/>
<image name="numpad_9_default.png" width="84.800003051757812" height="79.199996948242188"/>
<image name="numpad_9_over.png" width="84.800003051757812" height="79.199996948242188"/>
<image name="numpad_hash_default.png" width="84.800003051757812" height="78.400001525878906"/>
<image name="numpad_hash_over.png" width="84.800003051757812" height="78.400001525878906"/>
<image name="numpad_over_background.png" width="2" height="2"/>
<image name="numpad_star_default.png" width="84.800003051757812" height="81.599998474121094"/>
<image name="numpad_star_over.png" width="84.800003051757812" height="81.599998474121094"/>
<image name="route_bluetooth_default.png" width="26.399999618530273" height="41.599998474121094"/>
<image name="route_bluetooth_disabled.png" width="26.399999618530273" height="41.599998474121094"/>
<image name="route_bluetooth_selected.png" width="26.399999618530273" height="41.599998474121094"/>
@ -412,5 +616,8 @@
<image name="speaker_default.png" width="44" height="41.599998474121094"/>
<image name="speaker_disabled.png" width="44" height="41.599998474121094"/>
<image name="speaker_selected.png" width="44" height="41.599998474121094"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>

View file

@ -23,6 +23,8 @@
#import "TPMultiLayoutViewController.h"
#include "linphone/linphonecore.h"
#import "UIRoundedImageView.h"
#import "UIDigitButton.h"
@interface CallOutgoingView : TPMultiLayoutViewController <UICompositeViewDelegate> {
}
@ -36,6 +38,23 @@
@property(weak, nonatomic) IBOutlet UIButton *routesEarpieceButton;
@property(weak, nonatomic) IBOutlet UISpeakerButton *routesSpeakerButton;
@property(weak, nonatomic) IBOutlet UIMutedMicroButton *microButton;
@property (weak, nonatomic) IBOutlet UIButton *declineButton;
@property (weak, nonatomic) IBOutlet UIToggleButton *numpadButton;
@property (strong, nonatomic) IBOutlet UIView *numpadView;
@property(nonatomic, strong) IBOutlet UIDigitButton *oneButton;
@property(nonatomic, strong) IBOutlet UIDigitButton *twoButton;
@property(nonatomic, strong) IBOutlet UIDigitButton *threeButton;
@property(nonatomic, strong) IBOutlet UIDigitButton *fourButton;
@property(nonatomic, strong) IBOutlet UIDigitButton *fiveButton;
@property(nonatomic, strong) IBOutlet UIDigitButton *sixButton;
@property(nonatomic, strong) IBOutlet UIDigitButton *sevenButton;
@property(nonatomic, strong) IBOutlet UIDigitButton *eightButton;
@property(nonatomic, strong) IBOutlet UIDigitButton *nineButton;
@property(nonatomic, strong) IBOutlet UIDigitButton *starButton;
@property(nonatomic, strong) IBOutlet UIDigitButton *zeroButton;
@property(nonatomic, strong) IBOutlet UIDigitButton *hashButton;
@property (weak, nonatomic) IBOutlet UIButton *declineButton_earlyMedia;
- (IBAction)onDeclineClick:(id)sender;

View file

@ -47,6 +47,32 @@ static UICompositeViewDescription *compositeDescription = nil;
- (void)viewDidLoad {
_routesEarpieceButton.enabled = !IPAD;
[_zeroButton setDigit:'0'];
[_zeroButton setDtmf:true];
[_oneButton setDigit:'1'];
[_oneButton setDtmf:true];
[_twoButton setDigit:'2'];
[_twoButton setDtmf:true];
[_threeButton setDigit:'3'];
[_threeButton setDtmf:true];
[_fourButton setDigit:'4'];
[_fourButton setDtmf:true];
[_fiveButton setDigit:'5'];
[_fiveButton setDtmf:true];
[_sixButton setDigit:'6'];
[_sixButton setDtmf:true];
[_sevenButton setDigit:'7'];
[_sevenButton setDtmf:true];
[_eightButton setDigit:'8'];
[_eightButton setDtmf:true];
[_nineButton setDigit:'9'];
[_nineButton setDtmf:true];
[_starButton setDigit:'*'];
[_starButton setDtmf:true];
[_hashButton setDigit:'#'];
[_hashButton setDtmf:true];
}
- (void)viewWillAppear:(BOOL)animated {
@ -56,6 +82,11 @@ static UICompositeViewDescription *compositeDescription = nil;
selector:@selector(bluetoothAvailabilityUpdateEvent:)
name:kLinphoneBluetoothAvailabilityUpdate
object:nil];
[NSNotificationCenter.defaultCenter addObserver:self
selector:@selector(callUpdateEvent:)
name:kLinphoneCallUpdate
object:nil];
LinphoneCall *call = linphone_core_get_current_call(LC);
if (!call) {
@ -73,6 +104,9 @@ static UICompositeViewDescription *compositeDescription = nil;
[_speakerButton update];
[_microButton update];
[_routesButton update];
[self hidePad:TRUE animated:FALSE];
[self callUpdate:call state:linphone_call_get_state(call) animated:true];
}
- (void)viewDidAppear:(BOOL)animated {
@ -117,6 +151,14 @@ static UICompositeViewDescription *compositeDescription = nil;
}
}
- (IBAction)onNumpadClick:(id)sender {
if ([_numpadView isHidden]) {
[self hidePad:FALSE animated:ANIMATED];
} else {
[self hidePad:TRUE animated:ANIMATED];
}
}
- (IBAction)onDeclineClick:(id)sender {
LinphoneCall *call = linphone_core_get_current_call(LC);
if (call) {
@ -124,6 +166,21 @@ static UICompositeViewDescription *compositeDescription = nil;
}
}
- (void)hidePad:(BOOL)hidden animated:(BOOL)animated {
if (hidden) {
[_numpadButton setOff];
} else {
[_numpadButton setOn];
}
if (hidden != _numpadView.hidden) {
if (animated) {
[self hideAnimation:hidden forView:_numpadView completion:nil];
} else {
[_numpadView setHidden:hidden];
}
}
}
- (void)hideRoutes:(BOOL)hidden animated:(BOOL)animated {
if (hidden) {
[_routesButton setOff];
@ -154,4 +211,60 @@ static UICompositeViewDescription *compositeDescription = nil;
});
}
- (void)callUpdateEvent:(NSNotification *)notif {
LinphoneCall *call = [[notif.userInfo objectForKey:@"call"] pointerValue];
LinphoneCallState state = [[notif.userInfo objectForKey:@"state"] intValue];
[self callUpdate:call state:state animated:TRUE];
}
- (void)callUpdate:(LinphoneCall *)call state:(LinphoneCallState)state animated:(BOOL)animated {
_declineButton_earlyMedia.hidden = linphone_call_get_state(call) != LinphoneCallStateOutgoingEarlyMedia;
_declineButton.hidden = !_declineButton_earlyMedia.hidden;
_numpadButton.hidden = _declineButton_earlyMedia.hidden;
}
#pragma mark - Animation
- (void)hideAnimation:(BOOL)hidden forView:(UIView *)target completion:(void (^)(BOOL finished))completion {
if (hidden) {
int original_y = target.frame.origin.y;
CGRect newFrame = target.frame;
newFrame.origin.y = self.view.frame.size.height;
[UIView animateWithDuration:0.5
delay:0.0
options:UIViewAnimationOptionCurveEaseIn
animations:^{
target.frame = newFrame;
}
completion:^(BOOL finished) {
CGRect originFrame = target.frame;
originFrame.origin.y = original_y;
target.hidden = YES;
target.frame = originFrame;
if (completion)
completion(finished);
}];
} else {
CGRect frame = target.frame;
int original_y = frame.origin.y;
frame.origin.y = self.view.frame.size.height;
target.frame = frame;
frame.origin.y = original_y;
target.hidden = NO;
[UIView animateWithDuration:0.5
delay:0.0
options:UIViewAnimationOptionCurveEaseOut
animations:^{
target.frame = frame;
}
completion:^(BOOL finished) {
target.frame = frame; // in case application did not finish
if (completion)
completion(finished);
}];
}
}
@end