From 649e245a3a8782e31ef3b58e5fe93b65ec0bc6f7 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Mon, 7 Nov 2011 15:09:59 +0100 Subject: [PATCH] Add back-to-in-call-view button on dialer during call --- Classes/PhoneViewController.h | 2 + Classes/PhoneViewController.m | 14 +- Classes/PhoneViewController.xib | 399 +++++++++++--------------------- PhoneMainView.xib | 2 - 4 files changed, 151 insertions(+), 266 deletions(-) diff --git a/Classes/PhoneViewController.h b/Classes/PhoneViewController.h index 07df3c9b5..8d209d6ee 100644 --- a/Classes/PhoneViewController.h +++ b/Classes/PhoneViewController.h @@ -36,6 +36,7 @@ UIEraseButton* erase; UIView* incallView; + UIButton* backToCallView; UIDuration* callDuration; UIMuteButton* mute; UISpeakerButton* speaker; @@ -82,6 +83,7 @@ @property (nonatomic, retain) IBOutlet UIButton* speaker; @property (nonatomic, retain) IBOutlet UILabel* peerLabel; +@property (nonatomic, retain) IBOutlet UIButton* backToCallView; @property (nonatomic, retain) IBOutlet UIButton* one; @property (nonatomic, retain) IBOutlet UIButton* two; diff --git a/Classes/PhoneViewController.m b/Classes/PhoneViewController.m index 4073cc1a1..8ca16ba45 100644 --- a/Classes/PhoneViewController.m +++ b/Classes/PhoneViewController.m @@ -33,7 +33,7 @@ @synthesize hangup; @synthesize status; @synthesize erase; - +@synthesize backToCallView; @synthesize incallView; @synthesize callDuration; @@ -107,7 +107,15 @@ [mute initWithOnImage:[UIImage imageNamed:@"mic_muted.png"] offImage:[UIImage imageNamed:@"mic_active.png"] ]; [speaker initWithOnImage:[UIImage imageNamed:@"Speaker-32-on.png"] offImage:[UIImage imageNamed:@"Speaker-32-off.png"] ]; [erase initWithAddressField:address]; - + + [backToCallView addTarget:self action:@selector(backToCallViewPressed) forControlEvents:UIControlEventTouchUpInside]; +} + +-(void) backToCallViewPressed { + [self displayInCall: nil + FromUI:nil + forUser:nil + withDisplayName:nil]; } @@ -193,9 +201,7 @@ } else { [peerLabel setText:username?username:@""]; } - [address setHidden:true]; [incallView setHidden:false]; - [dialerView setHidden:true]; } -(void) displayCall:(LinphoneCall*) call InProgressFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName { [self displayInCall: call ViewforUser:username diff --git a/Classes/PhoneViewController.xib b/Classes/PhoneViewController.xib index 9e854ae94..385db8b02 100644 --- a/Classes/PhoneViewController.xib +++ b/Classes/PhoneViewController.xib @@ -43,133 +43,6 @@ 292 YES - - - -2147483356 - - YES - - - 292 - {320, 40} - - - NO - YES - NO - IBCocoaTouchFramework - who - - 1 - MCAwIDAAA - - - 1 - 10 - 1 - - 1 - 17 - - - Helvetica - 17 - 16 - - - - - 292 - {{98, 38}, {124, 21}} - - - NO - YES - NO - IBCocoaTouchFramework - how long - - - 1 - 10 - 1 - - - - - - 292 - {{239, 14}, {72, 37}} - - - NO - NO - IBCocoaTouchFramework - 0 - 0 - - 3 - MQA - - - 1 - MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA - - - 3 - MC41AA - - - NSImage - Speaker-32-off.png - - - Helvetica-Bold - Helvetica - 2 - 15 - - - Helvetica-Bold - 15 - 16 - - - - - 292 - {{0, 14}, {72, 37}} - - - NO - NO - IBCocoaTouchFramework - 0 - 0 - - - 1 - MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA - - - - NSImage - mic_active.png - - - - - - {320, 65} - - - - 1 - MC45MDE5NjA3OSAwLjkwMTk2MDc5IDAuOTAxOTYwNzkAA - - NO - IBCocoaTouchFramework - 292 @@ -181,23 +54,39 @@ {{254, 0}, {66, 65}} + NO IBCocoaTouchFramework 0 0 <- - + + 3 + MQA + 1 MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - + + 3 + MC41AA + NSImage clavier-01-106px.png - - + + Helvetica-Bold + Helvetica + 2 + 15 + + + Helvetica-Bold + 15 + 16 + @@ -205,6 +94,7 @@ {{5, 0}, {255, 66}} + NO NO IBCocoaTouchFramework @@ -242,6 +132,7 @@ {320, 65} + 1 MC45MDE5NjA3OSAwLjkwMTk2MDc5IDAuOTAxOTYwNzkAA @@ -254,6 +145,7 @@ {{0, 328}, {160, 66}} + NO NO IBCocoaTouchFramework @@ -274,7 +166,7 @@ clavier-01-160px.png - + @@ -282,17 +174,28 @@ {{9, 390}, {304, 21}} + NO YES NO IBCocoaTouchFramework status - + + 1 + MCAwIDAAA + 1 10 - - + + 1 + 17 + + + Helvetica + 17 + 16 + @@ -300,6 +203,7 @@ {{213, 64}, {107, 66}} + NO NO IBCocoaTouchFramework @@ -314,7 +218,7 @@ - + @@ -322,6 +226,7 @@ {{0, 130}, {107, 66}} + NO NO IBCocoaTouchFramework @@ -336,7 +241,7 @@ - + @@ -344,6 +249,7 @@ {{107, 130}, {106, 66}} + NO NO IBCocoaTouchFramework @@ -361,7 +267,7 @@ clavier-01-108px.png - + @@ -369,6 +275,7 @@ {{213, 130}, {107, 66}} + NO NO IBCocoaTouchFramework @@ -383,7 +290,7 @@ - + @@ -391,6 +298,7 @@ {{0, 196}, {107, 66}} + NO NO IBCocoaTouchFramework @@ -405,7 +313,7 @@ - + @@ -413,6 +321,7 @@ {{213, 196}, {107, 66}} + NO NO IBCocoaTouchFramework @@ -427,7 +336,7 @@ - + @@ -435,6 +344,7 @@ {{107, 64}, {106, 66}} + NO NO IBCocoaTouchFramework @@ -449,7 +359,7 @@ - + @@ -457,6 +367,7 @@ {{0, 64}, {107, 66}} + 1 MC40MDAwMDAwMSAxIDEgMAA @@ -475,7 +386,7 @@ - + @@ -483,6 +394,7 @@ {{0, 262}, {107, 66}} + NO NO IBCocoaTouchFramework @@ -497,7 +409,7 @@ - + @@ -505,6 +417,7 @@ {{107, 262}, {106, 66}} + NO NO IBCocoaTouchFramework @@ -519,7 +432,7 @@ - + @@ -527,6 +440,7 @@ {{213, 262}, {107, 66}} + NO NO IBCocoaTouchFramework @@ -541,7 +455,7 @@ - + @@ -549,6 +463,7 @@ {{107, 196}, {106, 66}} + NO NO IBCocoaTouchFramework @@ -563,7 +478,7 @@ - + @@ -571,6 +486,7 @@ {{160, 328}, {160, 66}} + NO NO IBCocoaTouchFramework @@ -589,12 +505,61 @@ - + + + + + -2147483356 + + YES + + + 292 + {160, 66} + + + + NO + NO + IBCocoaTouchFramework + 0 + 0 + 1 + Back + + + 1 + MC4xOTYwNzg0MzE0IDAuMzA5ODAzOTIxNiAwLjUyMTU2ODYyNzUAA + + + + + 2 + 2 + + + Helvetica-Bold + 18 + 16 + + + + {{160, 328}, {160, 66}} + + + + + 1 + MC45MDE5NjA3OSAwLjkwMTk2MDc5IDAuOTAxOTYwNzkAA + + NO + IBCocoaTouchFramework {{0, 20}, {320, 460}} + 1 MC45MDE5NjA3OSAwLjkwMTk2MDc5IDAuOTAxOTYwNzkAA @@ -750,38 +715,6 @@ 119 - - - peerLabel - - - - 120 - - - - callDuration - - - - 121 - - - - speaker - - - - 123 - - - - mute - - - - 125 - erase @@ -806,6 +739,14 @@ 159 + + + backToCallView + + + + 161 + delegate @@ -863,7 +804,6 @@ - @@ -876,6 +816,7 @@ + @@ -900,38 +841,11 @@ YES - - - - + inCall - - 117 - - - speaker - - - 116 - - - duration - - - 118 - - - mute - - - 115 - - - display - 39 @@ -1017,6 +931,12 @@ Address + + 160 + + + back + @@ -1033,16 +953,10 @@ 107.IBPluginDependency 114.IBPluginDependency 114.IBUserGuides - 115.IBPluginDependency - 116.CustomClassName - 116.IBPluginDependency - 117.CustomClassName - 117.IBPluginDependency - 118.CustomClassName - 118.IBPluginDependency 150.CustomClassName 150.IBPluginDependency 157.IBPluginDependency + 160.IBPluginDependency 29.CustomClassName 29.IBPluginDependency 30.CustomClassName @@ -1104,16 +1018,10 @@ 1 - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIDuration - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UISpeakerButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIMuteButton - com.apple.InterfaceBuilder.IBCocoaTouchPlugin UIEraseButton com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin UIDigitButton com.apple.InterfaceBuilder.IBCocoaTouchPlugin UIDigitButton @@ -1157,7 +1065,7 @@ - 159 + 161 @@ -1183,6 +1091,7 @@ __call address back + backToCallView callDuration dialerView eight @@ -1211,6 +1120,7 @@ UIButton UITextField UIButton + UIButton UILabel UIView UIButton @@ -1242,6 +1152,7 @@ __call address back + backToCallView callDuration dialerView eight @@ -1279,6 +1190,10 @@ back UIButton + + backToCallView + UIButton + callDuration UILabel @@ -1390,14 +1305,6 @@ ./Classes/UIDigitButton.h - - UIDuration - UILabel - - IBProjectSource - ./Classes/UIDuration.h - - UIEraseButton UIButton @@ -1414,30 +1321,6 @@ ./Classes/UIHangUpButton.h - - UIMuteButton - UIToggleButton - - IBProjectSource - ./Classes/UIMuteButton.h - - - - UISpeakerButton - UIToggleButton - - IBProjectSource - ./Classes/UISpeakerButton.h - - - - UIToggleButton - UIButton - - IBProjectSource - ./Classes/UIToggleButton.h - - 0 @@ -1460,21 +1343,17 @@ YES YES - Speaker-32-off.png clavier-01-106px.png clavier-01-108px.png clavier-01-160px.png - mic_active.png startcall-green.png stopcall-red.png YES - {32, 32} {106, 60} {108, 60} {160, 60} - {20, 20} {60, 52} {62, 54} diff --git a/PhoneMainView.xib b/PhoneMainView.xib index 27580eb6f..26cbcfb90 100644 --- a/PhoneMainView.xib +++ b/PhoneMainView.xib @@ -47,7 +47,6 @@ {320, 480} - 1 MSAxIDEAA @@ -141,7 +140,6 @@ 266 {{0, 431}, {320, 49}} - 3 MCAwAA