From 598259f055faa0fc7cc07293be69f0def5f6d939 Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Mon, 27 Jul 2015 10:56:09 +0200 Subject: [PATCH] outgoing call and stuff --- Classes/Base.lproj/ChatViewController.xib | 2 +- .../ContactDetailsViewController.xib | 79 ++-- Classes/Base.lproj/DialerViewController.xib | 29 +- Classes/Base.lproj/InCallViewController.xib | 6 +- .../Base.lproj/OutgoingCallViewController.xib | 126 ++++++ Classes/ChatViewController.m | 6 - Classes/ContactDetailsViewController.m | 15 +- Classes/HistoryDetailsViewController.m | 3 - Classes/HistoryViewController.m | 18 - Classes/LinphoneUI/Base.lproj/UICallBar.xib | 371 +++++------------- Classes/LinphoneUI/Base.lproj/UIChatCell.xib | 2 +- Classes/LinphoneUI/Base.lproj/UIStateBar.xib | 6 +- Classes/LinphoneUI/UIButtonShrinkable.m | 33 -- Classes/LinphoneUI/UICallButton.h | 3 +- Classes/LinphoneUI/UICallCell.m | 3 - Classes/LinphoneUI/UICamSwitch.h | 3 +- Classes/LinphoneUI/UIChatCell.m | 1 - Classes/LinphoneUI/UIConferenceHeader.m | 4 - Classes/LinphoneUI/UIHangUpButton.h | 3 +- Classes/LinphoneUI/UIIconButton.m | 1 + Classes/LinphoneUI/UILongTouchButton.h | 5 +- Classes/LinphoneUI/UIStateBar.m | 2 +- Classes/LinphoneUI/UITransferButton.h | 5 +- ...inkable.h => OutgoingCallViewController.h} | 15 +- Classes/OutgoingCallViewController.m | 42 ++ Classes/PhoneMainView.m | 77 ++-- Classes/Utils/Utils.h | 1 - Classes/Utils/Utils.m | 26 +- linphone.xcodeproj/project.pbxproj | 24 +- 29 files changed, 390 insertions(+), 521 deletions(-) create mode 100644 Classes/Base.lproj/OutgoingCallViewController.xib delete mode 100644 Classes/LinphoneUI/UIButtonShrinkable.m rename Classes/{LinphoneUI/UIButtonShrinkable.h => OutgoingCallViewController.h} (64%) create mode 100644 Classes/OutgoingCallViewController.m diff --git a/Classes/Base.lproj/ChatViewController.xib b/Classes/Base.lproj/ChatViewController.xib index f2fc1c3c4..a1b500fd2 100644 --- a/Classes/Base.lproj/ChatViewController.xib +++ b/Classes/Base.lproj/ChatViewController.xib @@ -47,7 +47,7 @@ - - + - + @@ -124,14 +106,9 @@ - - - - - - - - + + + diff --git a/Classes/Base.lproj/DialerViewController.xib b/Classes/Base.lproj/DialerViewController.xib index 5b7907216..894be6c86 100644 --- a/Classes/Base.lproj/DialerViewController.xib +++ b/Classes/Base.lproj/DialerViewController.xib @@ -232,11 +232,10 @@ - + - - + @@ -246,11 +245,10 @@ - + - - + @@ -260,11 +258,10 @@ - + - - + @@ -274,11 +271,10 @@ - + - - + @@ -288,11 +284,10 @@ - + - - + @@ -312,7 +307,9 @@ - + + + diff --git a/Classes/Base.lproj/InCallViewController.xib b/Classes/Base.lproj/InCallViewController.xib index 592155a45..0a1f91e92 100644 --- a/Classes/Base.lproj/InCallViewController.xib +++ b/Classes/Base.lproj/InCallViewController.xib @@ -40,7 +40,7 @@ - + @@ -89,8 +89,8 @@ - - + + diff --git a/Classes/Base.lproj/OutgoingCallViewController.xib b/Classes/Base.lproj/OutgoingCallViewController.xib new file mode 100644 index 000000000..95ef0d8e7 --- /dev/null +++ b/Classes/Base.lproj/OutgoingCallViewController.xib @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Classes/ChatViewController.m b/Classes/ChatViewController.m index cc296929b..9fe9ddff7 100644 --- a/Classes/ChatViewController.m +++ b/Classes/ChatViewController.m @@ -41,12 +41,6 @@ - (void)viewDidLoad { [super viewDidLoad]; - // Set selected+over background: IB lack ! - [editButton setBackgroundImage:[UIImage imageNamed:@"chat_ok_over.png"] - forState:(UIControlStateHighlighted | UIControlStateSelected)]; - - [LinphoneUtils buttonFixStates:editButton]; - [tableController.tableView setBackgroundColor:[UIColor clearColor]]; // Can't do it in Xib: issue with ios4 [tableController.tableView setBackgroundView:nil]; // Can't do it in Xib: issue with ios4 } diff --git a/Classes/ContactDetailsViewController.m b/Classes/ContactDetailsViewController.m index 9196c4b9e..311685e07 100644 --- a/Classes/ContactDetailsViewController.m +++ b/Classes/ContactDetailsViewController.m @@ -148,9 +148,8 @@ static void sync_address_book(ABAddressBookRef addressBook, CFDictionaryRef info } - (void)addCurrentContactContactField:(NSString *)address { - - LinphoneAddress *linphoneAddress = - linphone_address_new([address cStringUsingEncoding:[NSString defaultCStringEncoding]]); + LinphoneAddress *linphoneAddress = linphone_core_interpret_url( + [LinphoneManager getLc], [address cStringUsingEncoding:[NSString defaultCStringEncoding]]); NSString *username = [NSString stringWithUTF8String:linphone_address_get_username(linphoneAddress)]; if (([username rangeOfString:@"@"].length > 0) && @@ -195,16 +194,6 @@ static void sync_address_book(ABAddressBookRef addressBook, CFDictionaryRef info - (void)viewDidLoad { [super viewDidLoad]; - // Set selected+over background: IB lack ! - [editButton setBackgroundImage:[UIImage imageNamed:@"contact_ok_over.png"] - forState:(UIControlStateHighlighted | UIControlStateSelected)]; - - // Set selected+disabled background: IB lack ! - [editButton setBackgroundImage:[UIImage imageNamed:@"contact_ok_disabled.png"] - forState:(UIControlStateDisabled | UIControlStateSelected)]; - - [LinphoneUtils buttonFixStates:editButton]; - [tableController.tableView setBackgroundColor:[UIColor clearColor]]; // Can't do it in Xib: issue with ios4 [tableController.tableView setBackgroundView:nil]; // Can't do it in Xib: issue with ios4 } diff --git a/Classes/HistoryDetailsViewController.m b/Classes/HistoryDetailsViewController.m index 9917132a0..cf32d8d03 100644 --- a/Classes/HistoryDetailsViewController.m +++ b/Classes/HistoryDetailsViewController.m @@ -90,9 +90,6 @@ static UICompositeViewDescription *compositeDescription = nil; [HistoryDetailsViewController adaptSize:durationHeaderLabel field:durationLabel]; [HistoryDetailsViewController adaptSize:typeHeaderLabel field:typeLabel]; [HistoryDetailsViewController adaptSize:plainAddressHeaderLabel field:plainAddressLabel]; - [addContactButton.titleLabel setAdjustsFontSizeToFitWidth:TRUE]; // Auto shrink: IB lack! - [callButton.titleLabel setAdjustsFontSizeToFitWidth:TRUE]; // Auto shrink: IB lack! - [messageButton.titleLabel setAdjustsFontSizeToFitWidth:TRUE]; // Auto shrink: IB lack! } - (void)viewWillAppear:(BOOL)animated { diff --git a/Classes/HistoryViewController.m b/Classes/HistoryViewController.m index 67074116b..525643cfd 100644 --- a/Classes/HistoryViewController.m +++ b/Classes/HistoryViewController.m @@ -82,24 +82,6 @@ static UICompositeViewDescription *compositeDescription = nil; [super viewDidLoad]; [self changeView:History_All]; - // Set selected+over background: IB lack ! - [editButton setBackgroundImage:[UIImage imageNamed:@"history_ok_over.png"] - forState:(UIControlStateHighlighted | UIControlStateSelected)]; - - [LinphoneUtils buttonFixStates:editButton]; - - // Set selected+over background: IB lack ! - [allButton setBackgroundImage:[UIImage imageNamed:@"history_all_selected.png"] - forState:(UIControlStateHighlighted | UIControlStateSelected)]; - - [LinphoneUtils buttonFixStatesForTabs:allButton]; - - // Set selected+over background: IB lack ! - [missedButton setBackgroundImage:[UIImage imageNamed:@"history_missed_selected.png"] - forState:(UIControlStateHighlighted | UIControlStateSelected)]; - - [LinphoneUtils buttonFixStatesForTabs:missedButton]; - [tableController.tableView setBackgroundColor:[UIColor clearColor]]; // Can't do it in Xib: issue with ios4 [tableController.tableView setBackgroundView:nil]; // Can't do it in Xib: issue with ios4 } diff --git a/Classes/LinphoneUI/Base.lproj/UICallBar.xib b/Classes/LinphoneUI/Base.lproj/UICallBar.xib index 26bc0ec6e..959fcd0dc 100644 --- a/Classes/LinphoneUI/Base.lproj/UICallBar.xib +++ b/Classes/LinphoneUI/Base.lproj/UICallBar.xib @@ -14,7 +14,6 @@ - @@ -25,7 +24,6 @@ - @@ -48,11 +46,15 @@ - + @@ -305,179 +307,114 @@ - + - - - - - - - - - - - - - - - - - + + @@ -485,16 +422,12 @@ + - @@ -729,33 +662,15 @@ - - - - - - - - - - - - - - - - diff --git a/Classes/LinphoneUI/UIButtonShrinkable.m b/Classes/LinphoneUI/UIButtonShrinkable.m deleted file mode 100644 index 53a58595a..000000000 --- a/Classes/LinphoneUI/UIButtonShrinkable.m +++ /dev/null @@ -1,33 +0,0 @@ -/* UIButtonShrinkable - * - * Copyright (C) 2011 Belledonne Comunications, Grenoble, France - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#import "UIButtonShrinkable.h" - -@implementation UIButtonShrinkable : UIButton - -- (instancetype)init { - self = [super init]; - if (self) { - // automatically adjust title to fit available width - [self.titleLabel setAdjustsFontSizeToFitWidth:TRUE]; - } - return self; -} - -@end diff --git a/Classes/LinphoneUI/UICallButton.h b/Classes/LinphoneUI/UICallButton.h index 5822404d6..1e67fe164 100644 --- a/Classes/LinphoneUI/UICallButton.h +++ b/Classes/LinphoneUI/UICallButton.h @@ -19,8 +19,9 @@ #import +#import "UIIconButton.h" -@interface UICallButton : UIButton { +@interface UICallButton : UIIconButton { } @property (nonatomic, strong) IBOutlet UITextField* addressField; diff --git a/Classes/LinphoneUI/UICallCell.m b/Classes/LinphoneUI/UICallCell.m index 46aa149d2..8ab72369f 100644 --- a/Classes/LinphoneUI/UICallCell.m +++ b/Classes/LinphoneUI/UICallCell.m @@ -144,9 +144,6 @@ [self setFrame:CGRectMake(0, 0, sub.frame.size.width, sub.frame.size.height)]; [self addSubview:sub]; } - // Set selected+over background: IB lack ! - [pauseButton setImage:[UIImage imageNamed:@"call_state_pause_over.png"] - forState:(UIControlStateHighlighted | UIControlStateSelected)]; self->currentCall = FALSE; diff --git a/Classes/LinphoneUI/UICamSwitch.h b/Classes/LinphoneUI/UICamSwitch.h index 4ede4f04a..3190e909e 100644 --- a/Classes/LinphoneUI/UICamSwitch.h +++ b/Classes/LinphoneUI/UICamSwitch.h @@ -19,8 +19,9 @@ #import +#import "UIIconButton.h" -@interface UICamSwitch : UIButton +@interface UICamSwitch : UIIconButton @property (nonatomic, weak) IBOutlet UIView* preview; diff --git a/Classes/LinphoneUI/UIChatCell.m b/Classes/LinphoneUI/UIChatCell.m index 725f9e69d..916b4fa3d 100644 --- a/Classes/LinphoneUI/UIChatCell.m +++ b/Classes/LinphoneUI/UIChatCell.m @@ -41,7 +41,6 @@ [self.contentView addSubview:[arrayOfViews objectAtIndex:0]]; } - [chatContentLabel setAdjustsFontSizeToFitWidth:TRUE]; // Auto shrink: IB lack! } return self; } diff --git a/Classes/LinphoneUI/UIConferenceHeader.m b/Classes/LinphoneUI/UIConferenceHeader.m index f50d28a69..58c02c318 100644 --- a/Classes/LinphoneUI/UIConferenceHeader.m +++ b/Classes/LinphoneUI/UIConferenceHeader.m @@ -36,10 +36,6 @@ - (void)viewDidLoad { [super viewDidLoad]; - // Set selected+over background: IB lack ! - [pauseButton setImage:[UIImage imageNamed:@"call_state_pause_over.png"] - forState:(UIControlStateHighlighted | UIControlStateSelected)]; - [pauseButton setType:UIPauseButtonType_Conference call:nil]; } #pragma mark - Static size Functions diff --git a/Classes/LinphoneUI/UIHangUpButton.h b/Classes/LinphoneUI/UIHangUpButton.h index 596a81213..0be37a753 100644 --- a/Classes/LinphoneUI/UIHangUpButton.h +++ b/Classes/LinphoneUI/UIHangUpButton.h @@ -19,8 +19,9 @@ #import -@interface UIHangUpButton : UIButton { +#import "UIIconButton.h" +@interface UIHangUpButton : UIIconButton { } - (void)update; diff --git a/Classes/LinphoneUI/UIIconButton.m b/Classes/LinphoneUI/UIIconButton.m index ad5159e3a..d139b73b7 100644 --- a/Classes/LinphoneUI/UIIconButton.m +++ b/Classes/LinphoneUI/UIIconButton.m @@ -18,6 +18,7 @@ [self setBackgroundImage:[self backgroundImageForState:UIControlStateDisabled] forState:(UIControlStateDisabled | UIControlStateSelected)]; [LinphoneUtils buttonFixStates:self]; + [self.titleLabel setAdjustsFontSizeToFitWidth:TRUE]; return self; } diff --git a/Classes/LinphoneUI/UILongTouchButton.h b/Classes/LinphoneUI/UILongTouchButton.h index e7fa2efb8..eb5ddb231 100644 --- a/Classes/LinphoneUI/UILongTouchButton.h +++ b/Classes/LinphoneUI/UILongTouchButton.h @@ -24,8 +24,9 @@ -(void) onLongTouch; @end -@interface UILongTouchButton : UIButton { - +#import "UIIconButton.h" + +@interface UILongTouchButton : UIIconButton { } @end diff --git a/Classes/LinphoneUI/UIStateBar.m b/Classes/LinphoneUI/UIStateBar.m index 996887eed..f3b5e7c9d 100644 --- a/Classes/LinphoneUI/UIStateBar.m +++ b/Classes/LinphoneUI/UIStateBar.m @@ -215,7 +215,7 @@ image = [UIImage imageNamed:@"led_connected.png"]; break; } - registrationState.titleLabel.text = message; + [registrationState setTitle:message forState:UIControlStateNormal]; [registrationState setImage:image forState:UIControlStateNormal]; } diff --git a/Classes/LinphoneUI/UITransferButton.h b/Classes/LinphoneUI/UITransferButton.h index 81455efe6..9067fcf2f 100644 --- a/Classes/LinphoneUI/UITransferButton.h +++ b/Classes/LinphoneUI/UITransferButton.h @@ -19,8 +19,9 @@ #import -@interface UITransferButton : UIButton { -} +#import "UIIconButton.h" + +@interface UITransferButton : UIIconButton @property (nonatomic, strong) IBOutlet UITextField* addressField; diff --git a/Classes/LinphoneUI/UIButtonShrinkable.h b/Classes/OutgoingCallViewController.h similarity index 64% rename from Classes/LinphoneUI/UIButtonShrinkable.h rename to Classes/OutgoingCallViewController.h index 370a40b57..877600f06 100644 --- a/Classes/LinphoneUI/UIButtonShrinkable.h +++ b/Classes/OutgoingCallViewController.h @@ -1,6 +1,6 @@ -/* UIButtonShrinkable +/* OutgoingCallViewController.h * - * Copyright (C) 2011 Belledonne Comunications, Grenoble, France + * Copyright (C) 2012 Belledonne Comunications, Grenoble, France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -10,15 +10,20 @@ * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. + * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#import +#import -@interface UIButtonShrinkable : UIButton +#import "UICompositeViewController.h" +#import "TPMultiLayoutViewController.h" +#include "linphone/linphonecore.h" + +@interface OutgoingCallViewController : TPMultiLayoutViewController { +} @end diff --git a/Classes/OutgoingCallViewController.m b/Classes/OutgoingCallViewController.m new file mode 100644 index 000000000..1f5be1662 --- /dev/null +++ b/Classes/OutgoingCallViewController.m @@ -0,0 +1,42 @@ +/* OutgoingCallViewController.m + * + * Copyright (C) 2012 Belledonne Comunications, Grenoble, France + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#import "OutgoingCallViewController.h" + +@implementation OutgoingCallViewController + +#pragma mark - UICompositeViewDelegate Functions + +static UICompositeViewDescription *compositeDescription = nil; + ++ (UICompositeViewDescription *)compositeViewDescription { + if (compositeDescription == nil) { + compositeDescription = [[UICompositeViewDescription alloc] init:@"OutgoingCall" + content:@"OutgoingCallViewController" + stateBar:nil + tabBar:@"UICallBar" + fullscreen:false + landscapeMode:[LinphoneManager runningOnIpad] + portraitMode:true]; + compositeDescription.darkBackground = true; + } + return compositeDescription; +} + +@end diff --git a/Classes/PhoneMainView.m b/Classes/PhoneMainView.m index 60bd546d8..a1e1b5b2c 100644 --- a/Classes/PhoneMainView.m +++ b/Classes/PhoneMainView.m @@ -309,46 +309,49 @@ static RootViewManager *rootViewManagerInstance = nil; } switch (state) { - case LinphoneCallIncomingReceived: - case LinphoneCallIncomingEarlyMedia: { - [self displayIncomingCall:call]; - break; - } - case LinphoneCallOutgoingInit: - case LinphoneCallPausedByRemote: - case LinphoneCallConnected: - case LinphoneCallStreamsRunning: { - [self changeCurrentView:[InCallViewController compositeViewDescription]]; - break; - } - case LinphoneCallUpdatedByRemote: { - const LinphoneCallParams *current = linphone_call_get_current_params(call); - const LinphoneCallParams *remote = linphone_call_get_remote_params(call); + case LinphoneCallIncomingReceived: + case LinphoneCallIncomingEarlyMedia: { + [self displayIncomingCall:call]; + break; + } + case LinphoneCallOutgoingInit: { + [self changeCurrentView:[InCallViewController compositeViewDescription]]; + break; + } + case LinphoneCallPausedByRemote: + case LinphoneCallConnected: + case LinphoneCallStreamsRunning: { + [self changeCurrentView:[InCallViewController compositeViewDescription]]; + break; + } + case LinphoneCallUpdatedByRemote: { + const LinphoneCallParams *current = linphone_call_get_current_params(call); + const LinphoneCallParams *remote = linphone_call_get_remote_params(call); - if (linphone_call_params_video_enabled(current) && !linphone_call_params_video_enabled(remote)) { - [self changeCurrentView:[InCallViewController compositeViewDescription]]; - } - break; - } - case LinphoneCallError: { - [self displayCallError:call message:message]; - } - case LinphoneCallEnd: { - if (canHideInCallView) { - // Go to dialer view - DialerViewController *controller = DYNAMIC_CAST( - [self changeCurrentView:[DialerViewController compositeViewDescription]], DialerViewController); - if (controller != nil) { - [controller setAddress:@""]; - [controller setTransferMode:FALSE]; + if (linphone_call_params_video_enabled(current) && !linphone_call_params_video_enabled(remote)) { + [self changeCurrentView:[InCallViewController compositeViewDescription]]; } - } else { - [self changeCurrentView:[InCallViewController compositeViewDescription]]; + break; } - break; - } - default: - break; + case LinphoneCallError: { + [self displayCallError:call message:message]; + } + case LinphoneCallEnd: { + if (canHideInCallView) { + // Go to dialer view + DialerViewController *controller = DYNAMIC_CAST( + [self changeCurrentView:[DialerViewController compositeViewDescription]], DialerViewController); + if (controller != nil) { + [controller setAddress:@""]; + [controller setTransferMode:FALSE]; + } + } else { + [self changeCurrentView:[InCallViewController compositeViewDescription]]; + } + break; + } + default: + break; } [self updateApplicationBadgeNumber]; } diff --git a/Classes/Utils/Utils.h b/Classes/Utils/Utils.h index 998a818d1..ddc432872 100644 --- a/Classes/Utils/Utils.h +++ b/Classes/Utils/Utils.h @@ -43,7 +43,6 @@ void linphone_iphone_log_handler(int lev, const char *fmt, va_list args); + (BOOL)findAndResignFirstResponder:(UIView*)view; + (void)adjustFontSize:(UIView*)view mult:(float)mult; + (void)buttonFixStates:(UIButton*)button; -+ (void)buttonFixStatesForTabs:(UIButton*)button; + (void)buttonMultiViewAddAttributes:(NSMutableDictionary*)attributes button:(UIButton*)button; + (void)buttonMultiViewApplyAttributes:(NSDictionary*)attributes button:(UIButton*)button; diff --git a/Classes/Utils/Utils.m b/Classes/Utils/Utils.m index 6cdce2d5c..b8ea23ca1 100644 --- a/Classes/Utils/Utils.m +++ b/Classes/Utils/Utils.m @@ -114,37 +114,13 @@ void linphone_iphone_log_handler(int lev, const char *fmt, va_list args) { } + (void)buttonFixStates:(UIButton *)button { - // Set selected+over title: IB lack ! + // Interface builder lack fixes [button setTitle:[button titleForState:UIControlStateSelected] forState:(UIControlStateHighlighted | UIControlStateSelected)]; - - // Set selected+over titleColor: IB lack ! [button setTitleColor:[button titleColorForState:UIControlStateHighlighted] forState:(UIControlStateHighlighted | UIControlStateSelected)]; - - // Set selected+disabled title: IB lack ! [button setTitle:[button titleForState:UIControlStateSelected] forState:(UIControlStateDisabled | UIControlStateSelected)]; - - // Set selected+disabled titleColor: IB lack ! - [button setTitleColor:[button titleColorForState:UIControlStateDisabled] - forState:(UIControlStateDisabled | UIControlStateSelected)]; -} - -+ (void)buttonFixStatesForTabs:(UIButton *)button { - // Set selected+over title: IB lack ! - [button setTitle:[button titleForState:UIControlStateSelected] - forState:(UIControlStateHighlighted | UIControlStateSelected)]; - - // Set selected+over titleColor: IB lack ! - [button setTitleColor:[button titleColorForState:UIControlStateSelected] - forState:(UIControlStateHighlighted | UIControlStateSelected)]; - - // Set selected+disabled title: IB lack ! - [button setTitle:[button titleForState:UIControlStateSelected] - forState:(UIControlStateDisabled | UIControlStateSelected)]; - - // Set selected+disabled titleColor: IB lack ! [button setTitleColor:[button titleColorForState:UIControlStateDisabled] forState:(UIControlStateDisabled | UIControlStateSelected)]; } diff --git a/linphone.xcodeproj/project.pbxproj b/linphone.xcodeproj/project.pbxproj index 33b8a83b4..fdc6edc6d 100755 --- a/linphone.xcodeproj/project.pbxproj +++ b/linphone.xcodeproj/project.pbxproj @@ -111,10 +111,11 @@ 632DA24D1B43EE9400EB356A /* Utils.m in Sources */ = {isa = PBXBuildFile; fileRef = D35860D515B549B500513429 /* Utils.m */; }; 632DA24E1B43EEEF00EB356A /* Utils.m in Sources */ = {isa = PBXBuildFile; fileRef = D35860D515B549B500513429 /* Utils.m */; }; 634610061B61330300548952 /* UILabel+Boldify.m in Sources */ = {isa = PBXBuildFile; fileRef = 634610051B61330300548952 /* UILabel+Boldify.m */; }; + 6346100F1B61409800548952 /* OutgoingCallViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6346100E1B61409800548952 /* OutgoingCallViewController.m */; }; + 634610121B6140A500548952 /* OutgoingCallViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 634610101B6140A500548952 /* OutgoingCallViewController.xib */; }; 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 */; }; 639CEAFD1A1DF4D9004DE38F /* UIStateBar.xib in Resources */ = {isa = PBXBuildFile; fileRef = 639CEAFF1A1DF4D9004DE38F /* UIStateBar.xib */; }; @@ -686,13 +687,14 @@ 633E388219FFB0F400936D1C /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 634610041B61330300548952 /* UILabel+Boldify.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UILabel+Boldify.h"; sourceTree = ""; }; 634610051B61330300548952 /* UILabel+Boldify.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UILabel+Boldify.m"; sourceTree = ""; }; + 6346100D1B61409800548952 /* OutgoingCallViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OutgoingCallViewController.h; sourceTree = ""; }; + 6346100E1B61409800548952 /* OutgoingCallViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OutgoingCallViewController.m; sourceTree = ""; }; + 634610111B6140A500548952 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/OutgoingCallViewController.xib; sourceTree = ""; }; 636316D21A1DEBCB0009B839 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/AboutViewController.xib; sourceTree = ""; }; 636316D51A1DEC650009B839 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/SettingsViewController.xib; sourceTree = ""; }; 636316D81A1DECC90009B839 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/PhoneMainView.xib; sourceTree = ""; }; 636316DA1A1DEDD40009B839 /* fr */ = {isa = PBXFileReference; fileEncoding = 2483028224; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/HistoryDetailsViewController.strings; sourceTree = ""; }; 636316DB1A1DEDD80009B839 /* ru */ = {isa = PBXFileReference; fileEncoding = 2483028224; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/HistoryDetailsViewController.strings; sourceTree = ""; }; - 636316DC1A1DEECB0009B839 /* UIButtonShrinkable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIButtonShrinkable.h; sourceTree = ""; }; - 636316DD1A1DEF2F0009B839 /* UIButtonShrinkable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIButtonShrinkable.m; sourceTree = ""; }; 636BC9951B5F921B00C754CE /* UIIconButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIIconButton.h; sourceTree = ""; }; 636BC9961B5F921B00C754CE /* UIIconButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIIconButton.m; sourceTree = ""; }; 6371579F1B283FE200C91677 /* FileTransferDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileTransferDelegate.h; path = Utils/FileTransferDelegate.h; sourceTree = ""; }; @@ -1358,6 +1360,9 @@ D3EA53FC159850E80037DC6B /* LinphoneManager.m */, 2214EB7012F84668002A5394 /* LinphoneUI */, F0642EF019DAC891009DB336 /* MainStoryboard.storyboard */, + 6346100D1B61409800548952 /* OutgoingCallViewController.h */, + 6346100E1B61409800548952 /* OutgoingCallViewController.m */, + 634610101B6140A500548952 /* OutgoingCallViewController.xib */, D3F83F8C158229C500336684 /* PhoneMainView.h */, D3F83F8D15822ABD00336684 /* PhoneMainView.m */, 636316D71A1DECC90009B839 /* PhoneMainView.xib */, @@ -1394,8 +1399,6 @@ D35E7580159328EB0066B1C1 /* UIAddressTextField.m */, 22C7555E1317E59C007BC101 /* UIBluetoothButton.h */, 22C7555F1317E59C007BC101 /* UIBluetoothButton.m */, - 636316DC1A1DEECB0009B839 /* UIButtonShrinkable.h */, - 636316DD1A1DEF2F0009B839 /* UIButtonShrinkable.m */, D326483B1588950F00930C67 /* UICallBar.h */, D326483C1588950F00930C67 /* UICallBar.m */, D38187E415FE349700C3EDCA /* UICallBar.xib */, @@ -2271,6 +2274,7 @@ 63C21F451B60F9870030B86B /* chat_message_delivered.png in Resources */, 63C21F881B60F9870030B86B /* numpad_7.png in Resources */, 63C21F431B60F9870030B86B /* camera_on_all_selected.png in Resources */, + 634610121B6140A500548952 /* OutgoingCallViewController.xib in Resources */, 63C21F651B60F9870030B86B /* edit_list.png in Resources */, D38187F815FE355D00C3EDCA /* UIMainBar.xib in Resources */, 63C21F2F1B60F9870030B86B /* add_call.png in Resources */, @@ -2596,7 +2600,6 @@ D3128FE115AABC7E00A2147A /* ContactDetailsViewController.m in Sources */, D37C639515AADDAF009D0BAC /* UIContactDetailsHeader.m in Sources */, D37C639B15AADEF6009D0BAC /* ContactDetailsTableViewController.m in Sources */, - 636316DE1A1DEF2F0009B839 /* UIButtonShrinkable.m in Sources */, 63E59A3F1ADE70D900646FB3 /* InAppProductsManager.m in Sources */, D3C6526715AC1A8F0092A874 /* UIEditableTableViewCell.m in Sources */, D378906515AC373B00BD776C /* ContactDetailsLabelViewController.m in Sources */, @@ -2605,6 +2608,7 @@ 63FB30351A680E73008CA393 /* UIRoundedImageView.m in Sources */, F066515517F9A02E0064280C /* UITransparentTVCell.m in Sources */, D3F9A9EE15AF277E0045320F /* UACellBackgroundView.m in Sources */, + 6346100F1B61409800548952 /* OutgoingCallViewController.m in Sources */, D35860D615B549B500513429 /* Utils.m in Sources */, D3F7998115BD32370018C273 /* TPMultiLayoutViewController.m in Sources */, D3807FBF15C28940005BE9BC /* DCRoundSwitch.m in Sources */, @@ -2757,6 +2761,14 @@ name = InfoPlist.strings; sourceTree = ""; }; + 634610101B6140A500548952 /* OutgoingCallViewController.xib */ = { + isa = PBXVariantGroup; + children = ( + 634610111B6140A500548952 /* Base */, + ); + name = OutgoingCallViewController.xib; + sourceTree = ""; + }; 636316D31A1DEBCB0009B839 /* AboutViewController.xib */ = { isa = PBXVariantGroup; children = (