state bar

This commit is contained in:
Gautier Pelloux-Prayer 2015-07-22 16:56:02 +02:00
parent 6db8ec909d
commit a09917f3d3
7 changed files with 112 additions and 314 deletions

View file

@ -39,7 +39,6 @@
<int key="NSvFlags">290</int>
<string key="NSFrameSize">{360, 40}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="481442126"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<object class="NSColor" key="IBUIBackgroundColor" id="572758541">
@ -55,7 +54,6 @@
<int key="NSvFlags">314</int>
<string key="NSFrame">{{0, 40}, {360, 537}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="548578981"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<reference key="IBUIBackgroundColor" ref="572758541"/>
@ -68,7 +66,6 @@
<int key="NSvFlags">266</int>
<string key="NSFrame">{{0, 577}, {360, 63}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<reference key="IBUIBackgroundColor" ref="572758541"/>
@ -79,10 +76,9 @@
</array>
<string key="NSFrameSize">{360, 640}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="256276698"/>
<reference key="IBUIBackgroundColor" ref="572758541"/>
<object class="IBUISimulatedSizeMetrics" key="IBUISimulatedDestinationMetrics" id="370430797">
<object class="IBUISimulatedSizeMetrics" key="IBUISimulatedDestinationMetrics" id="445885811">
<string key="IBUISimulatedSizeMetricsClass">IBUISimulatedFreeformSizeMetricsSentinel</string>
<string key="IBUIDisplayName">Freeform</string>
</object>
@ -97,7 +93,6 @@
<int key="NSvFlags">290</int>
<string key="NSFrameSize">{640, 26}</string>
<reference key="NSSuperview" ref="915565391"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="575003184"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<reference key="IBUIBackgroundColor" ref="572758541"/>
@ -110,7 +105,6 @@
<int key="NSvFlags">314</int>
<string key="NSFrame">{{0, 26}, {640, 284}}</string>
<reference key="NSSuperview" ref="915565391"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="872119935"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<reference key="IBUIBackgroundColor" ref="572758541"/>
@ -123,7 +117,6 @@
<int key="NSvFlags">266</int>
<string key="NSFrame">{{0, 310}, {640, 50}}</string>
<reference key="NSSuperview" ref="915565391"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<reference key="IBUIBackgroundColor" ref="572758541"/>
@ -134,14 +127,13 @@
</array>
<string key="NSFrameSize">{640, 360}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="1051455928"/>
<reference key="IBUIBackgroundColor" ref="572758541"/>
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
<int key="IBUIInterfaceOrientation">3</int>
<int key="interfaceOrientation">3</int>
</object>
<reference key="IBUISimulatedDestinationMetrics" ref="370430797"/>
<reference key="IBUISimulatedDestinationMetrics" ref="445885811"/>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
</array>
@ -303,117 +295,7 @@
<nil key="sourceID"/>
<int key="maxID">25</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
<object class="IBPartialClassDescription">
<string key="className">TPMultiLayoutViewController</string>
<string key="superclassName">UIViewController</string>
<dictionary class="NSMutableDictionary" key="outlets">
<string key="landscapeView">UIView</string>
<string key="portraitView">UIView</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
<object class="IBToOneOutletInfo" key="landscapeView">
<string key="name">landscapeView</string>
<string key="candidateClassName">UIView</string>
</object>
<object class="IBToOneOutletInfo" key="portraitView">
<string key="name">portraitView</string>
<string key="candidateClassName">UIView</string>
</object>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">../Classes/Utils/TPMultiLayoutViewController/TPMultiLayoutViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UICompositeViewController</string>
<string key="superclassName">TPMultiLayoutViewController</string>
<dictionary class="NSMutableDictionary" key="outlets">
<string key="contentView">UIView</string>
<string key="stateBarView">UIView</string>
<string key="tabBarView">UIView</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
<object class="IBToOneOutletInfo" key="contentView">
<string key="name">contentView</string>
<string key="candidateClassName">UIView</string>
</object>
<object class="IBToOneOutletInfo" key="stateBarView">
<string key="name">stateBarView</string>
<string key="candidateClassName">UIView</string>
</object>
<object class="IBToOneOutletInfo" key="tabBarView">
<string key="name">tabBarView</string>
<string key="candidateClassName">UIView</string>
</object>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">../Classes/LinphoneUI/UICompositeViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UITransparentView</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">../Classes/LinphoneUI/UITransparentView.h</string>
</object>
</object>
</array>
<array class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
<object class="IBPartialClassDescription">
<string key="className">UIGestureRecognizer</string>
<string key="superclassName">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIGestureRecognizer.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIResponder</string>
<string key="superclassName">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UISearchBar</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UISearchDisplayController</string>
<string key="superclassName">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIView</string>
<string key="superclassName">UIResponder</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">UIViewController</string>
<string key="superclassName">UIResponder</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">UIKit.framework/Headers/UIViewController.h</string>
</object>
</object>
</array>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes"/>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBDocument.previouslyAttemptedUpgradeToXcode5">NO</bool>

View file

@ -1,145 +1,98 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6245" systemVersion="13F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<dependencies>
<deployment defaultVersion="1536" identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6238"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="UIStateBar">
<connections>
<outlet property="callQualityImage" destination="13" id="16"/>
<outlet property="callSecurityButton" destination="27" id="29"/>
<outlet property="callSecurityImage" destination="17" id="18"/>
<outlet property="landscapeView" destination="19" id="26"/>
<outlet property="incallView" destination="0Vp-VF-wmX" id="mLI-RY-bfW"/>
<outlet property="outcallView" destination="lfO-I4-PXi" id="04e-SG-ViY"/>
<outlet property="portraitView" destination="4" id="25"/>
<outlet property="registrationStateImage" destination="5" id="14"/>
<outlet property="registrationStateLabel" destination="6" id="15"/>
<outlet property="registrationState" destination="Mhg-P6-RfU" id="xTR-Af-XBY"/>
<outlet property="view" destination="4" id="11"/>
<outlet property="voicemailCount" destination="jEB-96-YxX" id="hV2-9Z-i8b"/>
<outlet property="voicemailButton" destination="3Jg-EU-ajT" id="Yr3-N5-aTl"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="4" userLabel="Portrait View">
<rect key="frame" x="0.0" y="0.0" width="320" height="23"/>
<rect key="frame" x="0.0" y="0.0" width="360" height="40"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" tag="1" contentMode="scaleToFill" image="statebar_background.png" id="12" userLabel="background">
<rect key="frame" x="0.0" y="0.0" width="320" height="23"/>
<view contentMode="scaleToFill" id="lfO-I4-PXi" userLabel="outcallView">
<rect key="frame" x="0.0" y="0.0" width="360" height="40"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
</imageView>
<imageView userInteractionEnabled="NO" tag="2" contentMode="scaleToFill" image="led_disconnected.png" id="5" userLabel="registrationStateImage">
<rect key="frame" x="6" y="6" width="10" height="10"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="Registration state">
<bool key="isElement" value="YES"/>
</accessibility>
</imageView>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="3" contentMode="left" text="CARAMBA" lineBreakMode="tailTruncation" minimumFontSize="10" id="6" userLabel="registrationStateLabel">
<rect key="frame" x="22" y="0.0" width="222" height="20"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="Registration state"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" tag="4" contentMode="scaleToFill" id="13" userLabel="callQualityImage">
<rect key="frame" x="252" y="3" width="27" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="Call quality"/>
</imageView>
<imageView userInteractionEnabled="NO" tag="5" contentMode="scaleAspectFit" id="17" userLabel="callSecurityImage">
<rect key="frame" x="287" y="3" width="27" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="Security state"/>
</imageView>
<button opaque="NO" tag="6" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" adjustsImageWhenDisabled="NO" lineBreakMode="middleTruncation" id="27" userLabel="callSecurityButton">
<rect key="frame" x="284" y="0.0" width="33" height="23"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration">
<bool key="isElement" value="NO"/>
</accessibility>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<state key="normal">
<color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="yg7-rx-XVv" userLabel="menuButton">
<rect key="frame" x="10" y="10" width="20" height="20"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<state key="normal" title="Button" image="menu.png">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="3Jg-EU-ajT" userLabel="voicemailButton">
<rect key="frame" x="249" y="0.0" width="111" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<inset key="titleEdgeInsets" minX="6" minY="0.0" maxX="0.0" maxY="0.0"/>
<state key="normal" title="12" image="voicemail.png">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
</button>
</subviews>
</view>
<view hidden="YES" contentMode="scaleToFill" id="0Vp-VF-wmX" userLabel="incallView">
<rect key="frame" x="0.0" y="0.0" width="360" height="40"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" tag="4" contentMode="scaleToFill" image="call_quality_indicator_2.png" id="13" userLabel="callQualityImage">
<rect key="frame" x="300" y="0.0" width="27" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="Call quality"/>
</imageView>
<button opaque="NO" tag="6" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" adjustsImageWhenDisabled="NO" lineBreakMode="middleTruncation" id="27" userLabel="callSecurityButton">
<rect key="frame" x="332" y="7" width="24" height="25"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration">
<bool key="isElement" value="NO"/>
</accessibility>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<state key="normal" image="security_ok.png">
<color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<state key="highlighted">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="doSecurityClick:" destination="-1" eventType="touchUpInside" id="30"/>
</connections>
</button>
</subviews>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="Mhg-P6-RfU" userLabel="registrationState">
<rect key="frame" x="40" y="0.0" width="200" height="40"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
<inset key="titleEdgeInsets" minX="6" minY="0.0" maxX="0.0" maxY="0.0"/>
<state key="normal" title="registered" image="led_disconnected.png">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<state key="highlighted">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="doSecurityClick:" destination="-1" eventType="touchUpInside" id="30"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" tag="7" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="VOICEMAIL MSGS" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="jEB-96-YxX" userLabel="voicemailCount">
<rect key="frame" x="156" y="1" width="88" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
</view>
<view contentMode="scaleToFill" id="19" userLabel="Landscape View">
<rect key="frame" x="0.0" y="0.0" width="480" height="23"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" tag="1" contentMode="scaleToFill" image="statebar_background.png" id="22" userLabel="background">
<rect key="frame" x="0.0" y="0.0" width="480" height="23"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
</imageView>
<imageView userInteractionEnabled="NO" tag="2" contentMode="scaleToFill" image="led_disconnected.png" id="24" userLabel="registrationStateImage">
<rect key="frame" x="6" y="6" width="10" height="10"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="3" contentMode="left" text="CARAMBA" lineBreakMode="tailTruncation" minimumFontSize="10" id="23" userLabel="registrationStateLabel">
<rect key="frame" x="22" y="0.0" width="382" height="20"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" tag="4" contentMode="scaleToFill" id="21" userLabel="callQualityImage">
<rect key="frame" x="412" y="3" width="27" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
</imageView>
<imageView userInteractionEnabled="NO" tag="5" contentMode="scaleAspectFit" id="20" userLabel="callSecurityImage">
<rect key="frame" x="447" y="3" width="27" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
</imageView>
<button opaque="NO" tag="6" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" adjustsImageWhenDisabled="NO" lineBreakMode="middleTruncation" id="28" userLabel="callSecurityButton">
<rect key="frame" x="444" y="0.0" width="33" height="23"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration">
<bool key="isElement" value="NO"/>
</accessibility>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<state key="normal">
<color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<state key="highlighted">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
</button>
<label opaque="NO" userInteractionEnabled="NO" tag="7" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="VOICEMAIL MSGS" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="P9M-sM-t2B" userLabel="voicemailCount">
<rect key="frame" x="244" y="1" width="165" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<color key="backgroundColor" red="1" green="0.36862745099999999" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="98" y="448"/>
</view>
</objects>
<resources>
<image name="call_quality_indicator_2.png" width="54" height="30"/>
<image name="led_disconnected.png" width="18" height="17"/>
<image name="statebar_background.png" width="640" height="46"/>
<image name="menu.png" width="56" height="55"/>
<image name="security_ok.png" width="19" height="24"/>
<image name="voicemail.png" width="76" height="36"/>
</resources>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>

View file

@ -25,14 +25,14 @@
DTActionSheet *securitySheet;
}
@property (nonatomic, strong) IBOutlet UIImageView* registrationStateImage;
@property (nonatomic, strong) IBOutlet UILabel* registrationStateLabel;
@property(weak, nonatomic) IBOutlet UIButton *registrationState;
@property (nonatomic, strong) IBOutlet UIImageView* callQualityImage;
@property (nonatomic, strong) IBOutlet UIImageView* callSecurityImage;
@property (nonatomic, strong) IBOutlet UIButton* callSecurityButton;
@property (strong, nonatomic) IBOutlet UILabel *voicemailCount;
@property(weak, nonatomic) IBOutlet UIButton *voicemailButton;
@property(weak, nonatomic) IBOutlet UIView *incallView;
@property(weak, nonatomic) IBOutlet UIView *outcallView;
- (IBAction)doSecurityClick:(id)sender;
@end

View file

@ -28,21 +28,14 @@
int messagesUnreadCount;
}
@synthesize registrationStateImage;
@synthesize registrationStateLabel;
@synthesize registrationState;
@synthesize callQualityImage;
@synthesize callSecurityImage;
@synthesize callSecurityButton;
#pragma mark - Lifecycle Functions
- (id)init {
self = [super initWithNibName:@"UIStateBar" bundle:[NSBundle mainBundle]];
if (self != nil) {
self->callSecurityImage = nil;
self->callQualityImage = nil;
self->securitySheet = nil;
}
return self;
}
@ -91,9 +84,6 @@
name:kLinphoneCallUpdate
object:nil];
[callQualityImage setHidden:true];
[callSecurityImage setHidden:true];
// Update to default state
LinphoneProxyConfig *config = NULL;
linphone_core_get_default_proxy([LinphoneManager getLc], &config);
@ -161,17 +151,13 @@
}
- (void)updateVoicemail {
if (messagesUnreadCount > 0) {
self.voicemailCount.hidden = (linphone_core_get_calls([LinphoneManager getLc]) != NULL);
self.voicemailCount.text = [[NSString
stringWithFormat:NSLocalizedString(@"%d unread messages", @"%d"), messagesUnreadCount] uppercaseString];
} else {
self.voicemailCount.hidden = TRUE;
}
_voicemailButton.hidden = (messagesUnreadCount <= 0);
_voicemailButton.titleLabel.text = @(messagesUnreadCount).stringValue;
}
- (void)callUpdate:(NSNotification *)notif {
// show voice mail only when there is no call
[self updateUI:linphone_core_get_calls([LinphoneManager getLc]) != NULL];
[self updateVoicemail];
}
@ -214,73 +200,65 @@
}
}
registrationStateLabel.hidden = NO;
switch (state) {
case LinphoneRegistrationFailed:
registrationStateImage.hidden = NO;
image = [UIImage imageNamed:@"led_error.png"];
break;
case LinphoneRegistrationCleared:
case LinphoneRegistrationNone:
registrationStateImage.hidden = NO;
image = [UIImage imageNamed:@"led_disconnected.png"];
break;
case LinphoneRegistrationProgress:
registrationStateImage.hidden = NO;
image = [UIImage imageNamed:@"led_inprogress.png"];
break;
case LinphoneRegistrationOk:
registrationStateImage.hidden = NO;
image = [UIImage imageNamed:@"led_connected.png"];
break;
}
[registrationStateLabel setText:message];
[registrationStateImage setImage:image];
registrationState.titleLabel.text = message;
[registrationState setImage:image forState:UIControlStateNormal];
}
#pragma mark -
- (void)updateUI:(BOOL)inCall {
_outcallView.hidden = (inCall);
_incallView.hidden = !_incallView.hidden;
}
- (void)callSecurityUpdate {
BOOL pending = false;
BOOL security = true;
const MSList *list = linphone_core_get_calls([LinphoneManager getLc]);
[self updateUI:(list != NULL)];
if (list == NULL) {
if (securitySheet) {
[securitySheet dismissWithClickedButtonIndex:securitySheet.destructiveButtonIndex animated:TRUE];
}
[callSecurityImage setHidden:true];
return;
}
while (list != NULL) {
LinphoneCall *call = (LinphoneCall *)list->data;
LinphoneMediaEncryption enc = linphone_call_params_get_media_encryption(linphone_call_get_current_params(call));
if (enc == LinphoneMediaEncryptionNone)
security = false;
else if (enc == LinphoneMediaEncryptionZRTP) {
if (!linphone_call_get_authentication_token_verified(call)) {
pending = true;
}
}
list = list->next;
}
if (security) {
if (pending) {
[callSecurityImage setImage:[UIImage imageNamed:@"security_pending.png"]];
} else {
[callSecurityImage setImage:[UIImage imageNamed:@"security_ok.png"]];
}
} else {
[callSecurityImage setImage:[UIImage imageNamed:@"security_ko.png"]];
while (list != NULL) {
LinphoneCall *call = (LinphoneCall *)list->data;
LinphoneMediaEncryption enc =
linphone_call_params_get_media_encryption(linphone_call_get_current_params(call));
if (enc == LinphoneMediaEncryptionNone)
security = false;
else if (enc == LinphoneMediaEncryptionZRTP) {
if (!linphone_call_get_authentication_token_verified(call)) {
pending = true;
}
}
list = list->next;
}
NSString *imageName = security ? (pending ? @"security_pending.png" : @"security_ok.png") : @"security_ko.png";
[callSecurityButton setImage:[UIImage imageNamed:imageName] forState:UIControlStateNormal];
}
[callSecurityImage setHidden:false];
}
- (void)callQualityUpdate {
UIImage *image = nil;
LinphoneCall *call = linphone_core_get_current_call([LinphoneManager getLc]);
[self updateUI:(call != NULL)];
if (call != NULL) {
// FIXME double check call state before computing, may cause core dump
float quality = linphone_call_get_average_quality(call);
@ -293,12 +271,7 @@
} else {
image = [UIImage imageNamed:@"call_quality_indicator_3.png"];
}
}
if (image != nil) {
[callQualityImage setHidden:false];
[callQualityImage setImage:image];
} else {
[callQualityImage setHidden:true];
}
}

BIN
ResourcesV3/images/menu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View file

@ -168,14 +168,14 @@
631C4FB719D2C3A6004BFE77 /* UIDigitButtonLongVoiceMail.m in Sources */ = {isa = PBXBuildFile; fileRef = 631C4FB619D2C3A6004BFE77 /* UIDigitButtonLongVoiceMail.m */; };
632DA24D1B43EE9400EB356A /* Utils.m in Sources */ = {isa = PBXBuildFile; fileRef = D35860D515B549B500513429 /* Utils.m */; };
632DA24E1B43EEEF00EB356A /* Utils.m in Sources */ = {isa = PBXBuildFile; fileRef = D35860D515B549B500513429 /* Utils.m */; };
633968F31B5FE23000C1E3AF /* voicemail.png in Resources */ = {isa = PBXBuildFile; fileRef = 633968F21B5FE23000C1E3AF /* voicemail.png */; };
636316D11A1DEBCB0009B839 /* AboutViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 636316D31A1DEBCB0009B839 /* AboutViewController.xib */; };
636316D41A1DEC650009B839 /* SettingsViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 636316D61A1DEC650009B839 /* SettingsViewController.xib */; };
636316D91A1DECC90009B839 /* PhoneMainView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 636316D71A1DECC90009B839 /* PhoneMainView.xib */; };
636316DE1A1DEF2F0009B839 /* UIButtonShrinkable.m in Sources */ = {isa = PBXBuildFile; fileRef = 636316DD1A1DEF2F0009B839 /* UIButtonShrinkable.m */; };
636BC9971B5F921B00C754CE /* UIIconButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 636BC9961B5F921B00C754CE /* UIIconButton.m */; };
637157A11B283FE200C91677 /* FileTransferDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 637157A01B283FE200C91677 /* FileTransferDelegate.m */; };
637BC58A1B5FDA1600A2EA37 /* UICallStateBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 637BC5891B5FDA1600A2EA37 /* UICallStateBar.m */; };
637BC5AD1B5FDA2100A2EA37 /* UICallStateBar.xib in Resources */ = {isa = PBXBuildFile; fileRef = 637BC5931B5FDA2100A2EA37 /* UICallStateBar.xib */; };
637BC5B91B5FDD8C00A2EA37 /* menu.png in Resources */ = {isa = PBXBuildFile; fileRef = 637BC5B81B5FDD8C00A2EA37 /* menu.png */; };
639CEAFD1A1DF4D9004DE38F /* UIStateBar.xib in Resources */ = {isa = PBXBuildFile; fileRef = 639CEAFF1A1DF4D9004DE38F /* UIStateBar.xib */; };
639CEB001A1DF4E4004DE38F /* UIHistoryCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 639CEB021A1DF4E4004DE38F /* UIHistoryCell.xib */; };
639CEB031A1DF4EB004DE38F /* UICompositeViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 639CEB051A1DF4EB004DE38F /* UICompositeViewController.xib */; };
@ -1116,6 +1116,7 @@
631C4FB019D2A8F2004BFE77 /* UIDigitButtonLongPlus.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIDigitButtonLongPlus.m; sourceTree = "<group>"; };
631C4FB519D2C3A6004BFE77 /* UIDigitButtonLongVoiceMail.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIDigitButtonLongVoiceMail.h; sourceTree = "<group>"; };
631C4FB619D2C3A6004BFE77 /* UIDigitButtonLongVoiceMail.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIDigitButtonLongVoiceMail.m; sourceTree = "<group>"; };
633968F21B5FE23000C1E3AF /* voicemail.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = voicemail.png; sourceTree = "<group>"; };
633E388219FFB0F400936D1C /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
636316D21A1DEBCB0009B839 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/AboutViewController.xib; sourceTree = "<group>"; };
636316D51A1DEC650009B839 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/SettingsViewController.xib; sourceTree = "<group>"; };
@ -1128,9 +1129,7 @@
636BC9961B5F921B00C754CE /* UIIconButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIIconButton.m; sourceTree = "<group>"; };
6371579F1B283FE200C91677 /* FileTransferDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileTransferDelegate.h; path = Utils/FileTransferDelegate.h; sourceTree = "<group>"; };
637157A01B283FE200C91677 /* FileTransferDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FileTransferDelegate.m; path = Utils/FileTransferDelegate.m; sourceTree = "<group>"; };
637BC5881B5FDA1600A2EA37 /* UICallStateBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UICallStateBar.h; sourceTree = "<group>"; };
637BC5891B5FDA1600A2EA37 /* UICallStateBar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UICallStateBar.m; sourceTree = "<group>"; };
637BC5941B5FDA2100A2EA37 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/UICallStateBar.xib; sourceTree = "<group>"; };
637BC5B81B5FDD8C00A2EA37 /* menu.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = menu.png; sourceTree = "<group>"; };
639CEAFE1A1DF4D9004DE38F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/UIStateBar.xib; sourceTree = "<group>"; };
639CEB011A1DF4E4004DE38F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/UIHistoryCell.xib; sourceTree = "<group>"; };
639CEB041A1DF4EB004DE38F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/UICompositeViewController.xib; sourceTree = "<group>"; };
@ -2161,9 +2160,6 @@
D36C43C4158F2E5A0048BA40 /* UICallCell.h */,
D36C43C5158F2E5A0048BA40 /* UICallCell.m */,
D381881415FE3F0B00C3EDCA /* UICallCell.xib */,
637BC5881B5FDA1600A2EA37 /* UICallStateBar.h */,
637BC5891B5FDA1600A2EA37 /* UICallStateBar.m */,
637BC5931B5FDA2100A2EA37 /* UICallStateBar.xib */,
22AA8AFF13D83F6300B30535 /* UICamSwitch.h */,
22AA8B0013D83F6300B30535 /* UICamSwitch.m */,
D3EA540F159853750037DC6B /* UIChatCell.h */,
@ -2486,6 +2482,8 @@
63060B441B5FA0A60075FB75 /* footer_contacts_default.png */,
63060B451B5FA0A60075FB75 /* footer_dialer_default.png */,
63060B461B5FA0A60075FB75 /* footer_history_default.png */,
637BC5B81B5FDD8C00A2EA37 /* menu.png */,
633968F21B5FE23000C1E3AF /* voicemail.png */,
);
path = images;
sourceTree = "<group>";
@ -3621,6 +3619,7 @@
63060B511B5FA0A60075FB75 /* color_K.png in Resources */,
D3B9A3E715A58C450096EA4E /* chat_send_over.png in Resources */,
D32B6E2415A5B2020033019F /* chat_send_disabled.png in Resources */,
633968F31B5FE23000C1E3AF /* voicemail.png in Resources */,
639CEB061A1DF4F1004DE38F /* UIChatRoomCell.xib in Resources */,
D3A8BB7B15A6CC3200F96BE5 /* chat_bubble_outgoing.png in Resources */,
D3A8BB7D15A6CC3200F96BE5 /* chat_bubble_incoming.png in Resources */,
@ -3639,12 +3638,12 @@
D3128FF515AABE4E00A2147A /* contact_edit_over.png in Resources */,
D37C638E15AAD251009D0BAC /* contact_number_over.png in Resources */,
D37C639015AAD251009D0BAC /* contact_number.png in Resources */,
637BC5AD1B5FDA2100A2EA37 /* UICallStateBar.xib in Resources */,
D381881515FE3F7F00C3EDCA /* UIContactDetailsHeader.xib in Resources */,
D3C6526B15AC228A0092A874 /* contact_ok_default.png in Resources */,
D3C6526D15AC228A0092A874 /* contact_ok_over.png in Resources */,
D38187B515FE341B00C3EDCA /* ContactDetailsLabelViewController.xib in Resources */,
D38187F415FE354700C3EDCA /* UIContactDetailsFooter.xib in Resources */,
637BC5B91B5FDD8C00A2EA37 /* menu.png in Resources */,
D32D5AA715ADE5D9008593F3 /* button_alert_background_default.png in Resources */,
D32D5AA915ADE5D9008593F3 /* button_alert_background_over.png in Resources */,
C9C8254315AE204D00D493FA /* options_add_disabled.png in Resources */,
@ -4134,7 +4133,6 @@
D3C6526715AC1A8F0092A874 /* UIEditableTableViewCell.m in Sources */,
D378906515AC373B00BD776C /* ContactDetailsLabelViewController.m in Sources */,
D3E8F68615ADE05B0065A226 /* UIContactDetailsFooter.m in Sources */,
637BC58A1B5FDA1600A2EA37 /* UICallStateBar.m in Sources */,
C90FAA7915AF54E6002091CB /* HistoryDetailsViewController.m in Sources */,
63FB30351A680E73008CA393 /* UIRoundedImageView.m in Sources */,
F066515517F9A02E0064280C /* UITransparentTVCell.m in Sources */,
@ -4330,14 +4328,6 @@
name = PhoneMainView.xib;
sourceTree = "<group>";
};
637BC5931B5FDA2100A2EA37 /* UICallStateBar.xib */ = {
isa = PBXVariantGroup;
children = (
637BC5941B5FDA2100A2EA37 /* Base */,
);
name = UICallStateBar.xib;
sourceTree = "<group>";
};
639CEAFF1A1DF4D9004DE38F /* UIStateBar.xib */ = {
isa = PBXVariantGroup;
children = (