refactoring...

This commit is contained in:
Gautier Pelloux-Prayer 2015-09-10 16:05:59 +02:00
parent 4b87055a9b
commit 7406731bff
45 changed files with 192 additions and 212 deletions

View file

@ -90,7 +90,7 @@ static UICompositeViewDescription *compositeDescription = nil;
+ (UICompositeViewDescription *)compositeViewDescription {
if (compositeDescription == nil) {
compositeDescription = [[UICompositeViewDescription alloc] init:self.class
stateBar:StatusBarView.class
statusBar:StatusBarView.class
tabBar:TabBarView.class
fullscreen:false
landscapeMode:LinphoneManager.runningOnIpad

View file

@ -65,7 +65,7 @@ static UICompositeViewDescription *compositeDescription = nil;
+ (UICompositeViewDescription *)compositeViewDescription {
if (compositeDescription == nil) {
compositeDescription = [[UICompositeViewDescription alloc] init:self.class
stateBar:StatusBarView.class
statusBar:StatusBarView.class
tabBar:nil
fullscreen:false
landscapeMode:LinphoneManager.runningOnIpad
@ -349,7 +349,6 @@ static UICompositeViewDescription *compositeDescription = nil;
static BOOL placement_done = NO; // indicates if the button placement has been done in the assistant choice view
// Change toolbar buttons following view
_backButton.enabled = (view != _welcomeView);
[self displayUsernameAsPhoneOrUsername];

View file

@ -23,7 +23,7 @@
<rect key="frame" x="0.0" y="42" width="375" height="625"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" id="Vsu-Ew-BxE" userLabel="toolBar">
<view contentMode="scaleToFill" id="Vsu-Ew-BxE" userLabel="topBar">
<rect key="frame" x="0.0" y="0.0" width="375" height="63"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
<subviews>

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
</dependencies>
<objects>
@ -22,7 +23,7 @@
<rect key="frame" x="0.0" y="42" width="375" height="625"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="Cro-ww-VIC" userLabel="headerButton">
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="Cro-ww-VIC" userLabel="headerBar">
<rect key="frame" x="0.0" y="0.0" width="375" height="50"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="27"/>

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
</dependencies>
<objects>
@ -22,7 +23,7 @@
<rect key="frame" x="0.0" y="42" width="375" height="625"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="NFl-sb-0TV" userLabel="headerButton">
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="NFl-sb-0TV" userLabel="headerBar">
<rect key="frame" x="0.0" y="0.0" width="375" height="50"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="27"/>

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
</dependencies>
<objects>
@ -66,7 +67,7 @@
</accessibility>
</view>
<view contentMode="scaleAspectFit" id="127" userLabel="preview">
<rect key="frame" x="254.00000029960563" y="354.99999967643191" width="113" height="140"/>
<rect key="frame" x="254" y="354.99999934763446" width="113" height="140"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMinY="YES" heightSizable="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
</dependencies>
<objects>
@ -30,7 +31,7 @@
<rect key="frame" x="0.0" y="42" width="375" height="559"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<view contentMode="scaleToFill" id="7" userLabel="toolsView">
<view contentMode="scaleToFill" id="7" userLabel="topBar">
<rect key="frame" x="0.0" y="0.0" width="375" height="40"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<subviews>
@ -174,7 +175,6 @@
<color key="backgroundColor" red="0.50196078430000002" green="0.50196078430000002" blue="0.50196078430000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
</dependencies>
<objects>
@ -26,7 +27,7 @@
<rect key="frame" x="0.0" y="42" width="375" height="559"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" id="7" userLabel="toolsBar">
<view contentMode="scaleToFill" id="7" userLabel="topBar">
<rect key="frame" x="0.0" y="0.0" width="375" height="42"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<subviews>

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
</dependencies>
<objects>
@ -19,7 +20,7 @@
<rect key="frame" x="0.0" y="42" width="375" height="559"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" id="6" userLabel="toolsBar">
<view contentMode="scaleToFill" id="6" userLabel="topBar">
<rect key="frame" x="0.0" y="0.0" width="375" height="42"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<subviews>

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
</dependencies>
<objects>
@ -21,7 +22,7 @@
<rect key="frame" x="0.0" y="42" width="375" height="559"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" id="4" userLabel="toolBar">
<view contentMode="scaleToFill" id="4" userLabel="topBar">
<rect key="frame" x="0.0" y="0.0" width="375" height="42"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
<subviews>

View file

@ -13,17 +13,11 @@
<outlet property="searchBar" destination="5jE-oF-d45" id="xfS-xo-2Bm"/>
<outlet property="tableController" destination="TJG-JZ-YRR" id="0lt-gC-EOm"/>
<outlet property="tableView" destination="zOo-FS-W6l" id="T4d-56-Bgi"/>
<outlet property="toolBar" destination="3" id="n95-dF-EoN"/>
<outlet property="topBar" destination="3" id="w1O-2o-b18"/>
<outlet property="view" destination="2" id="16"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewController id="TJG-JZ-YRR" userLabel="tableController" customClass="ContactsListTableView">
<connections>
<outlet property="view" destination="zOo-FS-W6l" id="cM7-Da-i7e"/>
</connections>
<point key="canvasLocation" x="510" y="206"/>
</tableViewController>
<view contentMode="scaleToFill" id="1YR-9t-hRk" userLabel="iphone6MetricsView">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
@ -32,7 +26,7 @@
<rect key="frame" x="0.0" y="42" width="375" height="559"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<view contentMode="scaleToFill" id="3" userLabel="toolBar">
<view contentMode="scaleToFill" id="3" userLabel="topBar">
<rect key="frame" x="0.0" y="0.0" width="375" height="42"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
<subviews>
@ -159,6 +153,12 @@
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina47"/>
<point key="canvasLocation" x="4.5" y="212.5"/>
</view>
<tableViewController id="TJG-JZ-YRR" userLabel="tableController" customClass="ContactsListTableView">
<connections>
<outlet property="view" destination="zOo-FS-W6l" id="cM7-Da-i7e"/>
</connections>
<point key="canvasLocation" x="510" y="206"/>
</tableViewController>
</objects>
<resources>
<image name="back.png" width="25" height="22"/>

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
</dependencies>
<objects>
@ -45,7 +46,7 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="66"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
</imageView>
<textField opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Enter SIP address or phone number" minimumFontSize="5" id="4" userLabel="addressField" customClass="UIAddressTextField">
<textField opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Enter SIP address or phone number" minimumFontSize="5" id="4" userLabel="addressField">
<rect key="frame" x="0.0" y="0.0" width="312" height="63"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
@ -222,7 +223,7 @@
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<view contentMode="scaleToFill" id="182" userLabel="toolBar">
<view contentMode="scaleToFill" id="182" userLabel="bottomBar">
<rect key="frame" x="0.0" y="493" width="375" height="66"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
<subviews>

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
</dependencies>
<objects>
@ -24,7 +25,7 @@
<rect key="frame" x="0.0" y="42" width="375" height="559"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" id="6" userLabel="navigationBar">
<view contentMode="scaleToFill" id="6" userLabel="topBar">
<rect key="frame" x="0.0" y="0.0" width="375" height="40"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" flexibleMaxY="YES"/>
<subviews>

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
</dependencies>
<objects>
@ -24,7 +25,7 @@
<rect key="frame" x="0.0" y="42" width="375" height="559"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<view contentMode="scaleToFill" id="3" userLabel="toolsBar">
<view contentMode="scaleToFill" id="3" userLabel="topBar">
<rect key="frame" x="0.0" y="0.0" width="375" height="40"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<subviews>

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
</dependencies>
<objects>
@ -20,7 +21,7 @@
<rect key="frame" x="0.0" y="42" width="375" height="559"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" id="2E4-s5-jYL" userLabel="toolsBar">
<view contentMode="scaleToFill" id="2E4-s5-jYL" userLabel="topBar">
<rect key="frame" x="0.0" y="0.0" width="375" height="42"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<subviews>

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
</dependencies>
<objects>
@ -37,7 +38,7 @@
<color key="backgroundColor" red="1" green="1" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina47"/>
</view>
<viewController nibName="UICompositeViewController" wantsFullScreenLayout="YES" id="208" userLabel="mainViewController" customClass="UICompositeView">
<viewController nibName="UICompositeView" wantsFullScreenLayout="YES" id="208" userLabel="mainViewController" customClass="UICompositeView">
<extendedEdge key="edgesForExtendedLayout"/>
<nil key="simulatedStatusBarMetrics"/>
</viewController>

View file

@ -64,7 +64,7 @@ static UICompositeViewDescription *compositeDescription = nil;
+ (UICompositeViewDescription *)compositeViewDescription {
if (compositeDescription == nil) {
compositeDescription = [[UICompositeViewDescription alloc] init:self.class
stateBar:StatusBarView.class
statusBar:StatusBarView.class
tabBar:nil
fullscreen:false
landscapeMode:LinphoneManager.runningOnIpad

View file

@ -29,7 +29,7 @@ static UICompositeViewDescription *compositeDescription = nil;
+ (UICompositeViewDescription *)compositeViewDescription {
if (compositeDescription == nil) {
compositeDescription = [[UICompositeViewDescription alloc] init:self.class
stateBar:StatusBarView.class
statusBar:StatusBarView.class
tabBar:nil
fullscreen:false
landscapeMode:LinphoneManager.runningOnIpad

View file

@ -75,7 +75,7 @@ static UICompositeViewDescription *compositeDescription = nil;
+ (UICompositeViewDescription *)compositeViewDescription {
if (compositeDescription == nil) {
compositeDescription = [[UICompositeViewDescription alloc] init:self.class
stateBar:StatusBarView.class
statusBar:StatusBarView.class
tabBar:nil
fullscreen:false
landscapeMode:false
@ -281,7 +281,7 @@ static UICompositeViewDescription *compositeDescription = nil;
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.3];
[PhoneMainView.instance showTabBar:true];
[PhoneMainView.instance showStateBar:true];
[PhoneMainView.instance showStatusBar:true];
[callTableView setAlpha:1.0];
[videoCameraSwitch setAlpha:1.0];
[UIView commitAnimations];
@ -309,7 +309,7 @@ static UICompositeViewDescription *compositeDescription = nil;
[UIView commitAnimations];
[PhoneMainView.instance showTabBar:false];
[PhoneMainView.instance showStateBar:false];
[PhoneMainView.instance showStatusBar:false];
}
}
@ -365,7 +365,7 @@ static UICompositeViewDescription *compositeDescription = nil;
[PhoneMainView.instance fullScreen:true];
[PhoneMainView.instance showTabBar:false];
[PhoneMainView.instance showStateBar:false];
[PhoneMainView.instance showStatusBar:false];
#ifdef TEST_VIDEO_VIEW_CHANGE
[NSTimer scheduledTimerWithTimeInterval:5.0

View file

@ -71,7 +71,7 @@ static UICompositeViewDescription *compositeDescription = nil;
+ (UICompositeViewDescription *)compositeViewDescription {
if (compositeDescription == nil) {
compositeDescription = [[UICompositeViewDescription alloc] init:self.class
stateBar:StatusBarView.class
statusBar:StatusBarView.class
tabBar:TabBarView.class
fullscreen:false
landscapeMode:false

View file

@ -64,7 +64,7 @@ static UICompositeViewDescription *compositeDescription = nil;
+ (UICompositeViewDescription *)compositeViewDescription {
if (compositeDescription == nil) {
compositeDescription = [[UICompositeViewDescription alloc] init:self.class
stateBar:StatusBarView.class
statusBar:StatusBarView.class
tabBar:TabBarView.class
fullscreen:false
landscapeMode:LinphoneManager.runningOnIpad

View file

@ -37,7 +37,7 @@ static UICompositeViewDescription *compositeDescription = nil;
+ (UICompositeViewDescription *)compositeViewDescription {
if (compositeDescription == nil) {
compositeDescription = [[UICompositeViewDescription alloc] init:self.class
stateBar:StatusBarView.class
statusBar:StatusBarView.class
tabBar:TabBarView.class
fullscreen:false
landscapeMode:LinphoneManager.runningOnIpad

View file

@ -208,7 +208,7 @@ static UICompositeViewDescription *compositeDescription = nil;
+ (UICompositeViewDescription *)compositeViewDescription {
if (compositeDescription == nil) {
compositeDescription = [[UICompositeViewDescription alloc] init:self.class
stateBar:StatusBarView.class
statusBar:StatusBarView.class
tabBar:TabBarView.class
fullscreen:false
landscapeMode:LinphoneManager.runningOnIpad

View file

@ -80,7 +80,7 @@ typedef enum _ContactSelectionMode {
@property(strong, nonatomic) IBOutlet ContactsListTableView *tableController;
@property(nonatomic, strong) IBOutlet UINavigationController *sysViewController;
@property(strong, nonatomic) IBOutlet UIView *toolBar;
@property(strong, nonatomic) IBOutlet UIView *topBar;
@property(nonatomic, strong) IBOutlet UIButton *allButton;
@property(nonatomic, strong) IBOutlet UIButton *linphoneButton;
@property(nonatomic, strong) IBOutlet UIButton *backButton;

View file

@ -86,7 +86,7 @@ static NSString *sNameOrEmailFilter;
@synthesize linphoneButton;
@synthesize backButton;
@synthesize addButton;
@synthesize toolBar;
@synthesize topBar;
typedef enum _HistoryView { History_All, History_Linphone, History_Search, History_MAX } HistoryView;
@ -103,7 +103,7 @@ static UICompositeViewDescription *compositeDescription = nil;
+ (UICompositeViewDescription *)compositeViewDescription {
if (compositeDescription == nil) {
compositeDescription = [[UICompositeViewDescription alloc] init:self.class
stateBar:StatusBarView.class
statusBar:StatusBarView.class
tabBar:TabBarView.class
fullscreen:false
landscapeMode:LinphoneManager.runningOnIpad
@ -124,9 +124,9 @@ static UICompositeViewDescription *compositeDescription = nil;
- (void)relayoutTableView {
CGRect subViewFrame = self.view.frame;
// let the toolBar be visible
subViewFrame.origin.y += self.toolBar.frame.size.height;
subViewFrame.size.height -= self.toolBar.frame.size.height;
// let the top bar be visible
subViewFrame.origin.y += self.topBar.frame.size.height;
subViewFrame.size.height -= self.topBar.frame.size.height;
[UIView animateWithDuration:0.2
animations:^{
self.tableView.frame = subViewFrame;
@ -143,7 +143,7 @@ static UICompositeViewDescription *compositeDescription = nil;
// [searchText setFont:[UIFont fontWithName:@"CustomFont" size:12]];
_searchBar.showsCancelButton = (_searchBar.text.length > 0);
CGRect frame = _searchBar.frame;
frame.origin.y = toolBar.frame.origin.y + toolBar.frame.size.height;
frame.origin.y = topBar.frame.origin.y + topBar.frame.size.height;
_searchBar.frame = frame;
[self update];
@ -315,7 +315,7 @@ static UICompositeViewDescription *compositeDescription = nil;
}
- (void)viewDidUnload {
[self setToolBar:nil];
[self setTopBar:nil];
[super viewDidUnload];
}
@end

View file

@ -75,7 +75,7 @@ static UICompositeViewDescription *compositeDescription = nil;
+ (UICompositeViewDescription *)compositeViewDescription {
if (compositeDescription == nil) {
compositeDescription = [[UICompositeViewDescription alloc] init:self.class
stateBar:StatusBarView.class
statusBar:StatusBarView.class
tabBar:TabBarView.class
fullscreen:false
landscapeMode:LinphoneManager.runningOnIpad

View file

@ -49,7 +49,7 @@ static UICompositeViewDescription *compositeDescription = nil;
+ (UICompositeViewDescription *)compositeViewDescription {
if (compositeDescription == nil) {
compositeDescription = [[UICompositeViewDescription alloc] init:self.class
stateBar:StatusBarView.class
statusBar:StatusBarView.class
tabBar:TabBarView.class
fullscreen:false
landscapeMode:LinphoneManager.runningOnIpad

View file

@ -45,7 +45,7 @@ static UICompositeViewDescription *compositeDescription = nil;
+ (UICompositeViewDescription *)compositeViewDescription {
if (compositeDescription == nil) {
compositeDescription = [[UICompositeViewDescription alloc] init:self.class
stateBar:StatusBarView.class
statusBar:StatusBarView.class
tabBar:TabBarView.class
fullscreen:false
landscapeMode:LinphoneManager.runningOnIpad

View file

@ -50,7 +50,7 @@ static UICompositeViewDescription *compositeDescription = nil;
+ (UICompositeViewDescription *)compositeViewDescription {
if (compositeDescription == nil) {
compositeDescription = [[UICompositeViewDescription alloc] init:self.class
stateBar:StatusBarView.class
statusBar:StatusBarView.class
tabBar:nil
fullscreen:false
landscapeMode:LinphoneManager.runningOnIpad

View file

@ -125,7 +125,7 @@ static UICompositeViewDescription *compositeDescription = nil;
+ (UICompositeViewDescription *)compositeViewDescription {
if (compositeDescription == nil) {
compositeDescription = [[UICompositeViewDescription alloc] init:self.class
stateBar:StatusBarView.class
statusBar:StatusBarView.class
tabBar:nil
fullscreen:false
landscapeMode:LinphoneManager.runningOnIpad

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<dependencies>
<deployment identifier="iOS"/>
<development version="6000" identifier="xcode"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
</dependencies>
@ -11,7 +12,7 @@
<outlet property="landscapeView" destination="20" id="25"/>
<outlet property="portraitView" destination="1" id="24"/>
<outlet property="sideMenuView" destination="26" id="37"/>
<outlet property="stateBarView" destination="14" id="18"/>
<outlet property="statusBarView" destination="14" id="jau-xd-cYL"/>
<outlet property="tabBarView" destination="16" id="19"/>
<outlet property="view" destination="1" id="3"/>
</connections>
@ -30,7 +31,7 @@
<outletCollection property="gestureRecognizers" destination="40" appends="YES" id="41"/>
</connections>
</view>
<view autoresizesSubviews="NO" tag="2" contentMode="scaleToFill" id="14" userLabel="stateBar" customClass="UITransparentView">
<view autoresizesSubviews="NO" tag="2" contentMode="scaleToFill" id="14" userLabel="statusBar" customClass="UITransparentView">
<rect key="frame" x="0.0" y="0.0" width="375" height="42"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
@ -59,7 +60,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<view autoresizesSubviews="NO" tag="2" contentMode="scaleToFill" id="22" userLabel="stateBar" customClass="UITransparentView">
<view autoresizesSubviews="NO" tag="2" contentMode="scaleToFill" id="22" userLabel="statusBar" customClass="UITransparentView">
<rect key="frame" x="0.0" y="0.0" width="667" height="26"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>

View file

@ -23,6 +23,8 @@
#import "LinphoneManager.h"
#import "FastAddressBook.h"
#import "Utils.h"
#import "PhoneMainView.h"
#import "CallTableView.h"
@implementation UICallCellData
@ -472,17 +474,9 @@
}
- (void)selfUpdate {
UITableView *parentTable = (UITableView *)self.superview;
while (parentTable != nil && ![parentTable isKindOfClass:[UITableView class]])
parentTable = (UITableView *)[parentTable superview];
if (parentTable != nil) {
NSIndexPath *index = [parentTable indexPathForCell:self];
if (index != nil) {
[parentTable reloadRowsAtIndexPaths:@[ index ] withRowAnimation:false];
}
}
UITableView *tableView = VIEW(CallView).callTableView;
NSIndexPath *index = [tableView indexPathForCell:self];
[tableView reloadRowsAtIndexPaths:@[ index ] withRowAnimation:false];
}
#pragma mark - Action Functions

View file

@ -26,8 +26,6 @@
@interface UIChatBubbleTextCell : UITransparentTVCell
@property(nonatomic, weak) IBOutlet UIView *innerView;
@property(nonatomic, weak) IBOutlet UIView *bubbleView;
@property(nonatomic, weak) IBOutlet UIImageView *backgroundColor;
@property(nonatomic, weak) IBOutlet UIRoundedImageView *avatarImage;
@property(nonatomic, weak) IBOutlet UILabel *contactDateLabel;

View file

@ -32,7 +32,8 @@
- (id)initWithIdentifier:(NSString *)identifier {
if ((self = [super initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier]) != nil) {
[[NSBundle mainBundle] loadNibNamed:@"UIChatBubbleTextCell" owner:self options:nil];
NSArray *arrayOfViews = [[NSBundle mainBundle] loadNibNamed:@"UIChatBubbleTextCell" owner:self options:nil];
[self.contentView addSubview:[arrayOfViews objectAtIndex:arrayOfViews.count - 1]];
#if 0
// shift message box, otherwise it will collide with the bubble
@ -158,23 +159,12 @@
- (void)layoutSubviews {
[super layoutSubviews];
if (message != nil) {
BOOL is_outgoing = linphone_chat_message_is_outgoing(message);
CGRect innerFrame;
innerFrame.size = [ChatConversationTableView viewSize:message width:self.frame.size.width];
innerFrame.origin.y = 0.0f;
innerFrame.origin.x = is_outgoing ? self.frame.size.width - innerFrame.size.width : 0;
_innerView.frame = innerFrame;
CGRect messageFrame = _bubbleView.frame;
messageFrame.origin.y = (_innerView.frame.size.height - messageFrame.size.height) / 2;
if (!is_outgoing) {
messageFrame.origin.y += 5;
} else {
messageFrame.origin.y -= 5;
}
_backgroundColor.image =
is_outgoing ? [UIImage imageNamed:@"chat_bubble_outgoing"] : [UIImage imageNamed:@"chat_bubble_incoming"];
_bubbleView.frame = messageFrame;
// BOOL is_outgoing = linphone_chat_message_is_outgoing(message);
CGRect newFrame;
newFrame.size = [ChatConversationTableView viewSize:message width:self.frame.size.width];
newFrame.origin.y = 0.0f;
// newFrame.origin.x = is_outgoing ? self.contentView.frame.size.width - newFrame.size.width : 0;
self.contentView.frame = self.frame = newFrame;
}
}

View file

@ -8,7 +8,11 @@
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="UIChatBubbleTextCell">
<connections>
<outlet property="avatarImage" destination="P1c-sD-eOv" id="h5P-hl-jbX"/>
<outlet property="backgroundColor" destination="q2R-Zv-e5a" id="35T-Du-1AF"/>
<outlet property="bottomBarColor" destination="mlr-pl-B6T" id="4Lk-Vn-E8h"/>
<outlet property="contactDateLabel" destination="GRe-ur-aSb" id="DQA-v4-IjX"/>
<outlet property="messageText" destination="CYa-If-oB4" id="7xm-UF-1qB"/>
<outlet property="statusImage" destination="nLy-JO-TyL" id="9uf-2G-m8d"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
@ -18,15 +22,37 @@
</connections>
</tapGestureRecognizer>
<view contentMode="scaleToFill" id="vdk-RV-QRU">
<rect key="frame" x="0.0" y="0.0" width="320" height="159"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="60"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" alpha="0.19999999999999968" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="color_A.png" id="q2R-Zv-e5a" userLabel="backgroundColor">
<rect key="frame" x="0.0" y="0.0" width="320" height="159"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="60"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" image="avatar.png" id="P1c-sD-eOv" userLabel="avatarImage" customClass="UIRoundedImageView">
<rect key="frame" x="8" y="5" width="50" height="50"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="Contact avatar">
<accessibilityTraits key="traits" none="YES" image="YES" notEnabled="YES"/>
<bool key="isElement" value="YES"/>
</accessibility>
</imageView>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" editable="NO" text="Placeholder text is another very long ipsem lum dolorem...and it continues" id="CYa-If-oB4" userLabel="messageText" customClass="UITextViewNoDefine">
<rect key="frame" x="66" y="23" width="246" height="34"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="chat_message_inprogress.png" id="nLy-JO-TyL" userLabel="statusImage">
<rect key="frame" x="305" y="0.0" width="15" height="15"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="color_A.png" id="mlr-pl-B6T" userLabel="bottomBarColor">
<rect key="frame" x="0.0" y="58" width="320" height="2"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
</imageView>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" usesAttributedText="YES" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="10" id="GRe-ur-aSb" userLabel="contactDateLabel">
<rect key="frame" x="66" y="8" width="246" height="19"/>
<rect key="frame" x="66" y="0.0" width="246" height="27"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="Contact name"/>
<attributedString key="attributedText">
@ -47,33 +73,11 @@
</attributedString>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" image="avatar.png" id="P1c-sD-eOv" userLabel="avatarImage" customClass="UIRoundedImageView">
<rect key="frame" x="8" y="5" width="50" height="50"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="Contact avatar">
<accessibilityTraits key="traits" none="YES" image="YES" notEnabled="YES"/>
<bool key="isElement" value="YES"/>
</accessibility>
</imageView>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" editable="NO" text="Placeholder text is another very long ipsem lum dolorem...and it continues" id="CYa-If-oB4" userLabel="messageText" customClass="UITextViewNoDefine">
<rect key="frame" x="66" y="30" width="246" height="121"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="chat_message_inprogress.png" id="nLy-JO-TyL" userLabel="statusImage">
<rect key="frame" x="305" y="0.0" width="15" height="15"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="color_A.png" id="mlr-pl-B6T" userLabel="bottomBarColor">
<rect key="frame" x="0.0" y="157" width="320" height="2"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="339" y="43.5"/>
<point key="canvasLocation" x="339" y="43"/>
</view>
</objects>
<resources>

View file

@ -128,17 +128,11 @@
- (IBAction)onDeleteClick:(id)event {
if (chatRoom != NULL) {
UIView *view = [self superview];
// Find TableViewCell
while (view != nil && ![view isKindOfClass:[UITableView class]])
view = [view superview];
if (view != nil) {
UITableView *tableView = (UITableView *)view;
NSIndexPath *indexPath = [tableView indexPathForCell:self];
[[tableView dataSource] tableView:tableView
commitEditingStyle:UITableViewCellEditingStyleDelete
forRowAtIndexPath:indexPath];
}
UITableView *tableView = VIEW(ChatsListView).tableController.tableView;
NSIndexPath *indexPath = [tableView indexPathForCell:self];
[[tableView dataSource] tableView:tableView
commitEditingStyle:UITableViewCellEditingStyleDelete
forRowAtIndexPath:indexPath];
}
}

View file

@ -1,4 +1,4 @@
/* UICompositeViewController.h
/* UICompositeView.h
*
* Copyright (C) 2012 Belledonne Comunications, Grenoble, France
*
@ -28,7 +28,7 @@
}
@property(strong) NSString *content;
@property(strong) NSString *stateBar;
@property(strong) NSString *statusBar;
@property(strong) NSString *tabBar;
@property(assign) BOOL fullscreen;
@property(assign) BOOL landscapeMode;
@ -38,7 +38,7 @@
- (id)copy;
- (BOOL)equal:(UICompositeViewDescription *)description;
- (id)init:(Class)content
stateBar:(Class)stateBar
statusBar:(Class)statusBar
tabBar:(Class)tabBar
fullscreen:(BOOL)fullscreen
landscapeMode:(BOOL)landscapeMode
@ -62,15 +62,15 @@
@property(strong) CATransition *viewTransition;
@property(nonatomic, strong) IBOutlet UIView *stateBarView;
@property(nonatomic, strong) IBOutlet UIView *statusBarView;
@property(nonatomic, strong) IBOutlet UIView *contentView;
@property(nonatomic, strong) IBOutlet UIView *tabBarView;
@property(strong, nonatomic) IBOutlet UIView *sideMenuView;
- (void)changeView:(UICompositeViewDescription *)description;
- (void)setFullScreen:(BOOL)enabled;
- (void)hideStateBar:(BOOL)hidden;
- (void)hideToolBar:(BOOL)hidden;
- (void)hideStatusBar:(BOOL)hidden;
- (void)hideTopBar:(BOOL)hidden;
- (void)hideSideMenu:(BOOL)hidden;
- (BOOL)currentViewSupportsLandscape;
- (UIViewController *)getCachedController:(NSString *)name;

View file

@ -1,4 +1,4 @@
/* UICompositeViewController.m
/* UICompositeView.m
*
* Copyright (C) 2012 Belledonne Comunications, Grenoble, France
*
@ -26,7 +26,7 @@
@implementation UICompositeViewDescription
@synthesize content;
@synthesize stateBar;
@synthesize statusBar;
@synthesize tabBar;
@synthesize fullscreen;
@synthesize landscapeMode;
@ -35,7 +35,7 @@
- (id)copy {
UICompositeViewDescription *copy = [UICompositeViewDescription alloc];
copy.content = self.content;
copy.stateBar = self.stateBar;
copy.statusBar = self.statusBar;
copy.tabBar = self.tabBar;
copy.fullscreen = self.fullscreen;
copy.landscapeMode = self.landscapeMode;
@ -49,13 +49,13 @@
}
- (id)init:(Class)acontent
stateBar:(Class)astateBar
statusBar:(Class)astatusBar
tabBar:(Class)atabBar
fullscreen:(BOOL)afullscreen
landscapeMode:(BOOL)alandscapeMode
portraitMode:(BOOL)aportraitMode {
self.content = NSStringFromClass(acontent);
self.stateBar = NSStringFromClass(astateBar);
self.statusBar = NSStringFromClass(astatusBar);
self.tabBar = NSStringFromClass(atabBar);
self.fullscreen = afullscreen;
self.landscapeMode = alandscapeMode;
@ -68,7 +68,7 @@
@end
@interface UICompositeView ()
@property(nonatomic, strong) UIViewController *stateBarViewController;
@property(nonatomic, strong) UIViewController *statusBarViewController;
@property(nonatomic, strong) UIViewController *tabBarViewController;
@property(nonatomic, strong) UIViewController *contentViewController;
@property(nonatomic, strong) UIViewController *sideMenuViewController;
@ -77,11 +77,11 @@
@implementation UICompositeView
@synthesize stateBarView;
@synthesize statusBarView;
@synthesize contentView;
@synthesize tabBarView;
@synthesize tabBarViewController = _tabBarViewController;
@synthesize stateBarViewController = _stateBarViewController;
@synthesize statusBarViewController = _statusBarViewController;
@synthesize contentViewController = _contentViewController;
@synthesize sideMenuViewController = _sideMenuViewController;
@ -89,7 +89,7 @@
#pragma mark - Lifecycle Functions
- (void)initUICompositeViewController {
- (void)initUICompositeView {
viewControllerCache = [[NSMutableDictionary alloc] init];
currentOrientation = (UIInterfaceOrientation)UIDeviceOrientationUnknown;
}
@ -97,7 +97,7 @@
- (id)init {
self = [super init];
if (self) {
[self initUICompositeViewController];
[self initUICompositeView];
}
return self;
}
@ -105,7 +105,7 @@
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
[self initUICompositeViewController];
[self initUICompositeView];
}
return self;
}
@ -113,7 +113,7 @@
- (id)initWithCoder:(NSCoder *)decoder {
self = [super initWithCoder:decoder];
if (self) {
[self initUICompositeViewController];
[self initUICompositeView];
}
return self;
}
@ -124,8 +124,8 @@
#pragma mark - Property Functions
- (UIViewController *)stateBarViewController {
return _stateBarViewController;
- (UIViewController *)statusBarViewController {
return _statusBarViewController;
}
- (UIViewController *)contentViewController {
@ -175,7 +175,7 @@
[super viewWillAppear:animated];
[self.contentViewController viewWillAppear:animated];
[self.tabBarViewController viewWillAppear:animated];
[self.stateBarViewController viewWillAppear:animated];
[self.statusBarViewController viewWillAppear:animated];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(orientationDidChange:)
@ -188,7 +188,7 @@
[super viewDidAppear:animated];
[self.contentViewController viewDidAppear:animated];
[self.tabBarViewController viewDidAppear:animated];
[self.stateBarViewController viewDidAppear:animated];
[self.statusBarViewController viewDidAppear:animated];
[self.sideMenuViewController viewDidAppear:animated];
}
@ -196,7 +196,7 @@
[super viewWillDisappear:animated];
[self.contentViewController viewWillDisappear:animated];
[self.tabBarViewController viewWillDisappear:animated];
[self.stateBarViewController viewWillDisappear:animated];
[self.statusBarViewController viewWillDisappear:animated];
[self.sideMenuViewController viewWillDisappear:animated];
[[UIDevice currentDevice] endGeneratingDeviceOrientationNotifications];
@ -208,7 +208,7 @@
[super viewDidDisappear:animated];
[self.contentViewController viewDidDisappear:animated];
[self.tabBarViewController viewDidDisappear:animated];
[self.stateBarViewController viewDidDisappear:animated];
[self.statusBarViewController viewDidDisappear:animated];
[self.sideMenuViewController viewDidDisappear:animated];
}
@ -220,7 +220,7 @@
[super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];
[self.contentViewController willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];
[self.tabBarViewController willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];
[self.stateBarViewController willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];
[self.statusBarViewController willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];
[self.sideMenuViewController willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];
}
@ -230,16 +230,16 @@
duration:duration]; // Will invoke TPMultiLayout
[self.contentViewController willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration];
[self.tabBarViewController willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration];
[self.stateBarViewController willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration];
[self.statusBarViewController willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration];
[self.sideMenuViewController willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration];
[self update:nil tabBar:nil stateBar:nil fullscreen:nil];
[self update:nil tabBar:nil statusBar:nil fullscreen:nil];
}
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
[super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
[self.contentViewController didRotateFromInterfaceOrientation:fromInterfaceOrientation];
[self.tabBarViewController didRotateFromInterfaceOrientation:fromInterfaceOrientation];
[self.stateBarViewController didRotateFromInterfaceOrientation:fromInterfaceOrientation];
[self.statusBarViewController didRotateFromInterfaceOrientation:fromInterfaceOrientation];
[self.sideMenuViewController didRotateFromInterfaceOrientation:fromInterfaceOrientation];
}
@ -312,7 +312,7 @@
bool remove = true;
if (exclude != nil) {
for (UICompositeViewDescription *description in exclude) {
if ([key isEqualToString:description.content] || [key isEqualToString:description.stateBar] ||
if ([key isEqualToString:description.content] || [key isEqualToString:description.statusBar] ||
[key isEqualToString:description.tabBar]) {
remove = false;
break;
@ -395,11 +395,11 @@
- (void)update:(UICompositeViewDescription *)description
tabBar:(NSNumber *)tabBar
stateBar:(NSNumber *)stateBar
statusBar:(NSNumber *)statusBar
fullscreen:(NSNumber *)fullscreen {
UIViewController *oldContentViewController = self.contentViewController;
UIViewController *oldStateBarViewController = self.stateBarViewController;
UIViewController *oldStatusBarViewController = self.statusBarViewController;
UIViewController *oldTabBarViewController = self.tabBarViewController;
// Copy view description
UICompositeViewDescription *oldViewDescription = nil;
@ -412,10 +412,10 @@
if (oldViewDescription != nil && viewTransition != nil) {
[contentView.layer removeAnimationForKey:@"transition"];
[contentView.layer addAnimation:viewTransition forKey:@"transition"];
if (oldViewDescription.stateBar != currentViewDescription.stateBar ||
[stateBarView.layer animationForKey:@"transition"] != nil) {
[stateBarView.layer removeAnimationForKey:@"transition"];
[stateBarView.layer addAnimation:viewTransition forKey:@"transition"];
if (oldViewDescription.statusBar != currentViewDescription.statusBar ||
[statusBarView.layer animationForKey:@"transition"] != nil) {
[statusBarView.layer removeAnimationForKey:@"transition"];
[statusBarView.layer addAnimation:viewTransition forKey:@"transition"];
}
if (oldViewDescription.tabBar != currentViewDescription.tabBar ||
[tabBarView.layer animationForKey:@"transition"] != nil) {
@ -425,18 +425,18 @@
}
UIViewController *newContentViewController = [self getCachedController:description.content];
UIViewController *newStateBarViewController = [self getCachedController:description.stateBar];
UIViewController *newStatusBarViewController = [self getCachedController:description.statusBar];
UIViewController *newTabBarViewController = [self getCachedController:description.tabBar];
[UICompositeView removeSubView:oldContentViewController];
if (oldTabBarViewController != nil && oldTabBarViewController != newTabBarViewController) {
[UICompositeView removeSubView:oldTabBarViewController];
}
if (oldStateBarViewController != nil && oldStateBarViewController != newStateBarViewController) {
[UICompositeView removeSubView:oldStateBarViewController];
if (oldStatusBarViewController != nil && oldStatusBarViewController != newStatusBarViewController) {
[UICompositeView removeSubView:oldStatusBarViewController];
}
self.stateBarViewController = newStateBarViewController;
self.statusBarViewController = newStatusBarViewController;
self.contentViewController = newContentViewController;
self.tabBarViewController = newTabBarViewController;
@ -449,7 +449,7 @@
if (UIInterfaceOrientationIsLandscape(correctOrientation)) {
[self.contentViewController willAnimateRotationToInterfaceOrientation:correctOrientation duration:0];
[self.tabBarViewController willAnimateRotationToInterfaceOrientation:correctOrientation duration:0];
[self.stateBarViewController willAnimateRotationToInterfaceOrientation:correctOrientation duration:0];
[self.statusBarViewController willAnimateRotationToInterfaceOrientation:correctOrientation duration:0];
[self.sideMenuViewController willAnimateRotationToInterfaceOrientation:correctOrientation duration:0];
}
} else {
@ -465,13 +465,13 @@
[self.tabBarViewController willAnimateRotationToInterfaceOrientation:correctOrientation duration:0];
[self.tabBarViewController didRotateFromInterfaceOrientation:oldOrientation];
}
if (oldStateBarViewController != newStateBarViewController) {
UIInterfaceOrientation oldOrientation = self.stateBarViewController.interfaceOrientation;
[self.stateBarViewController willRotateToInterfaceOrientation:correctOrientation duration:0];
if (oldStatusBarViewController != newStatusBarViewController) {
UIInterfaceOrientation oldOrientation = self.statusBarViewController.interfaceOrientation;
[self.statusBarViewController willRotateToInterfaceOrientation:correctOrientation duration:0];
[self.sideMenuViewController willRotateToInterfaceOrientation:correctOrientation duration:0];
[self.stateBarViewController willAnimateRotationToInterfaceOrientation:correctOrientation duration:0];
[self.statusBarViewController willAnimateRotationToInterfaceOrientation:correctOrientation duration:0];
[self.sideMenuViewController willAnimateRotationToInterfaceOrientation:correctOrientation duration:0];
[self.stateBarViewController didRotateFromInterfaceOrientation:oldOrientation];
[self.statusBarViewController didRotateFromInterfaceOrientation:oldOrientation];
[self.sideMenuViewController didRotateFromInterfaceOrientation:oldOrientation];
}
}
@ -484,7 +484,7 @@
}
tabBar = nil; // No change = No Update
stateBar = nil; // No change = No Update
statusBar = nil; // No change = No Update
if (fullscreen != nil) {
if (currentViewDescription.fullscreen != [fullscreen boolValue]) {
@ -500,7 +500,7 @@
}
// Start animation
if (tabBar != nil || stateBar != nil || fullscreen != nil) {
if (tabBar != nil || statusBar != nil || fullscreen != nil) {
[UIView beginAnimations:@"resize" context:nil];
[UIView setAnimationDuration:0.35];
[UIView setAnimationBeginsFromCurrentState:TRUE];
@ -509,14 +509,14 @@
CGRect contentFrame = contentView.frame;
CGRect viewFrame = [self.view frame];
// Resize StateBar
CGRect stateBarFrame = stateBarView.frame;
// Resize StatusBar
CGRect statusBarFrame = statusBarView.frame;
int origin = IPHONE_STATUSBAR_HEIGHT;
if (currentViewDescription.fullscreen)
origin = 0;
contentFrame.origin.y = origin + stateBarFrame.size.height;
stateBarFrame.origin.y = origin;
contentFrame.origin.y = origin + statusBarFrame.size.height;
statusBarFrame.origin.y = origin;
// Resize TabBar
CGRect tabFrame = tabBarView.frame;
@ -550,10 +550,10 @@
CGRect frame = [self.tabBarViewController.view frame];
frame.size.width = [tabBarView bounds].size.width;
[self.tabBarViewController.view setFrame:frame];
[stateBarView setFrame:stateBarFrame];
frame = [self.stateBarViewController.view frame];
frame.size.width = [stateBarView bounds].size.width;
[self.stateBarViewController.view setFrame:frame];
[statusBarView setFrame:statusBarFrame];
frame = [self.statusBarViewController.view frame];
frame.size.width = [statusBarView bounds].size.width;
[self.statusBarViewController.view setFrame:frame];
CGRect sideMenuFrame = contentFrame;
contentFrame.origin.x = (_sideMenuView.hidden ? -contentFrame.size.width : 0);
@ -562,7 +562,7 @@
_sideMenuViewController.view.frame = [_sideMenuView bounds];
// Commit animation
if (tabBar != nil || stateBar != nil || fullscreen != nil) {
if (tabBar != nil || statusBar != nil || fullscreen != nil) {
[UIView commitAnimations];
}
@ -572,8 +572,8 @@
if (oldTabBarViewController == nil || oldTabBarViewController != self.tabBarViewController) {
[UICompositeView addSubView:self.tabBarViewController view:tabBarView];
}
if (oldStateBarViewController == nil || oldStateBarViewController != self.stateBarViewController) {
[UICompositeView addSubView:self.stateBarViewController view:stateBarView];
if (oldStatusBarViewController == nil || oldStatusBarViewController != self.statusBarViewController) {
[UICompositeView addSubView:self.statusBarViewController view:statusBarView];
}
}
@ -582,19 +582,19 @@
- (void)changeView:(UICompositeViewDescription *)description {
[self view]; // Force view load
[self update:description tabBar:nil stateBar:nil fullscreen:nil];
[self update:description tabBar:nil statusBar:nil fullscreen:nil];
}
- (void)setFullScreen:(BOOL)enabled {
[self update:nil tabBar:nil stateBar:nil fullscreen:[NSNumber numberWithBool:enabled]];
[self update:nil tabBar:nil statusBar:nil fullscreen:[NSNumber numberWithBool:enabled]];
}
- (void)hideToolBar:(BOOL)hidden {
[self update:nil tabBar:[NSNumber numberWithBool:!hidden] stateBar:nil fullscreen:nil];
- (void)hideTopBar:(BOOL)hidden {
[self update:nil tabBar:[NSNumber numberWithBool:!hidden] statusBar:nil fullscreen:nil];
}
- (void)hideStateBar:(BOOL)hidden {
[self update:nil tabBar:nil stateBar:[NSNumber numberWithBool:!hidden] fullscreen:nil];
- (void)hideStatusBar:(BOOL)hidden {
[self update:nil tabBar:nil statusBar:[NSNumber numberWithBool:!hidden] fullscreen:nil];
}
- (void)hideSideMenu:(BOOL)hidden {

View file

@ -63,17 +63,11 @@
- (IBAction)onDelete:(id)event {
if (callLog != NULL) {
UIView *view = [self superview];
// Find TableViewCell
while (view != nil && ![view isKindOfClass:[UITableView class]])
view = [view superview];
if (view != nil) {
UITableView *tableView = (UITableView *)view;
NSIndexPath *indexPath = [tableView indexPathForCell:self];
[[tableView dataSource] tableView:tableView
commitEditingStyle:UITableViewCellEditingStyleDelete
forRowAtIndexPath:indexPath];
}
UITableView *tableView = VIEW(HistoryListView).tableView;
NSIndexPath *indexPath = [tableView indexPathForCell:self];
[[tableView dataSource] tableView:tableView
commitEditingStyle:UITableViewCellEditingStyleDelete
forRowAtIndexPath:indexPath];
}
}

View file

@ -31,7 +31,7 @@
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="qO2-xf-enZ" userLabel="First Responder" sceneMemberID="firstResponder"/>
<viewController storyboardIdentifier="uicompositevc" nibName="UICompositeViewController" wantsFullScreenLayout="YES" id="emC-P9-oZj" userLabel="mainViewController" customClass="UICompositeView">
<viewController storyboardIdentifier="uicompositevc" nibName="UICompositeView" wantsFullScreenLayout="YES" id="emC-P9-oZj" userLabel="mainViewController" customClass="UICompositeView">
<extendedEdge key="edgesForExtendedLayout"/>
<nil key="simulatedStatusBarMetrics"/>
</viewController>

View file

@ -85,7 +85,7 @@
- (UIViewController*)popCurrentView;
- (void)popToView:(UICompositeViewDescription *)currentView;
- (UICompositeViewDescription *)firstView;
- (void)showStateBar:(BOOL)show;
- (void)showStatusBar:(BOOL)show;
- (void)showTabBar:(BOOL)show;
- (void)fullScreen:(BOOL)enabled;
- (void)updateStatusBar:(UICompositeViewDescription*)to_view;

View file

@ -498,11 +498,11 @@ static RootViewManager *rootViewManagerInstance = nil;
}
- (void)showTabBar:(BOOL)show {
[mainViewController hideToolBar:!show];
[mainViewController hideTopBar:!show];
}
- (void)showStateBar:(BOOL)show {
[mainViewController hideStateBar:!show];
- (void)showStatusBar:(BOOL)show {
[mainViewController hideStatusBar:!show];
}
- (void)updateStatusBar:(UICompositeViewDescription *)to_view {

View file

@ -309,11 +309,6 @@
return self;
}
- (void)drawRect:(CGRect)rect {
UIImage *img = [UIImage imageNamed:@"toolsbar_background.png"];
[img drawInRect:rect];
}
@end
#pragma mark - UINavigationControllerEx Class
@ -394,7 +389,7 @@ static UICompositeViewDescription *compositeDescription = nil;
+ (UICompositeViewDescription *)compositeViewDescription {
if (compositeDescription == nil) {
compositeDescription = [[UICompositeViewDescription alloc] init:self.class
stateBar:StatusBarView.class
statusBar:StatusBarView.class
tabBar:TabBarView.class
fullscreen:false
landscapeMode:LinphoneManager.runningOnIpad

View file

@ -114,9 +114,9 @@ MainStoryboard
|
| (mainViewController)
|
UICompositeViewController : TPMultilayout
UICompositeView : TPMultilayout
|
#---> view #--> stateBar
#---> view #--> statusBar
|
#--> contentView
|
@ -125,8 +125,8 @@ MainStoryboard
When the application is started, the phoneMainView gets asked to transition to the Dialer view or the Assistant view.
PhoneMainView exposes the -changeCurrentView: method, which will setup its
Any Linphone view is actually presented in the UICompositeViewController, with or without a stateBar and tabBar.
Any Linphone view is actually presented in the UICompositeView, with or without a statusBar and tabBar.
The UICompositeViewController consists of 3 areas laid out vertically. From top to bottom: StateBar, Content and TabBar.
The UICompositeView consists of 3 areas laid out vertically. From top to bottom: StatusBar, Content and TabBar.
The TabBar is usually the UIMainBar, which is used as a navigation controller: clicking on each of the buttons will trigger
a transition to another "view".

4
main.m
View file

@ -26,8 +26,8 @@
void uncaughtExceptionHandler(NSException *exception) {
NSLog(@"Crash: %@", exception);
NSLog(@"Stack Trace: %@", [exception callStackSymbols]);
// Internal error reporting
}
// Internal error reportingstx
};
#endif