diff --git a/Classes/BuschJaegerCallView.xib b/Classes/BuschJaegerCallView.xib
index 632afe97f..4d4f52e97 100644
--- a/Classes/BuschJaegerCallView.xib
+++ b/Classes/BuschJaegerCallView.xib
@@ -41,6 +41,7 @@
-2147483374
{320, 480}
+
_NS:196
-
+
+
+
+ BuschJaegerCallView
+ UIViewController
+
+ UISwipeGestureRecognizer
+ id
+ id
+
+
+
+ doCameraSwipe:
+ UISwipeGestureRecognizer
+
+
+ onSnapshotClick:
+ id
+
+
+ takeCall:
+ id
+
+
+
+ UISwipeGestureRecognizer
+ UISwipeGestureRecognizer
+ UILabel
+ UIHangUpButton
+ UIHangUpButton
+ UIView
+ UIDigitButton
+ UIToggleButton
+ UIDigitButton
+ UIButton
+ UIButton
+ UIView
+
+
+
+ cameraLeftSwipeGestureRecognizer
+ UISwipeGestureRecognizer
+
+
+ cameraRightSwipeGestureRecognizer
+ UISwipeGestureRecognizer
+
+
+ contactLabel
+ UILabel
+
+
+ declineButton
+ UIHangUpButton
+
+
+ endOrRejectCallButton
+ UIHangUpButton
+
+
+ incomingView
+ UIView
+
+
+ lightsButton
+ UIDigitButton
+
+
+ microButton
+ UIToggleButton
+
+
+ openDoorButton
+ UIDigitButton
+
+
+ snapshotButton
+ UIButton
+
+
+ takeCallButton
+ UIButton
+
+
+ videoView
+ UIView
+
+
+
+ IBProjectSource
+ ./Classes/BuschJaegerCallView.h
+
+
+
+ UIDigitButton
+ UILongTouchButton
+
+ addressField
+ UITextField
+
+
+ addressField
+
+ addressField
+ UITextField
+
+
+
+ IBProjectSource
+ ./Classes/UIDigitButton.h
+
+
+
+ UIHangUpButton
+ UIButton
+
+ IBProjectSource
+ ./Classes/UIHangUpButton.h
+
+
+
+ UILongTouchButton
+ UIButton
+
+ IBProjectSource
+ ./Classes/UILongTouchButton.h
+
+
+
+ UIMicroButton
+ UIToggleButton
+
+ IBProjectSource
+ ./Classes/UIMicroButton.h
+
+
+
+ UIToggleButton
+ UIButton
+
+ IBProjectSource
+ ./Classes/UIToggleButton.h
+
+
+
+
0
IBCocoaTouchFramework
diff --git a/Classes/BuschJaegerConfiguration.m b/Classes/BuschJaegerConfiguration.m
index 56bb97463..4a83e409d 100644
--- a/Classes/BuschJaegerConfiguration.m
+++ b/Classes/BuschJaegerConfiguration.m
@@ -422,9 +422,9 @@ static NSString *const CONFIGURATION_HOME_AP_KEY = @"CONFIGURATION_HOME_AP_KEY";
});
}
}
- [[NSUserDefaults standardUserDefaults] synchronize];
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"ipgateway_preference"];
[[NSUserDefaults standardUserDefaults] setObject:[[NSURL URLWithString:urlString] host] forKey:@"ipgateway_preference"];
+ [[NSUserDefaults standardUserDefaults] synchronize];
} else {
dispatch_async(dispatch_get_main_queue(), ^{
[delegate buschJaegerConfigurationError:[NSString stringWithFormat:@"Request not succeed (Status code:%d)", urlResponse.statusCode]];
diff --git a/Classes/BuschJaegerHistoryDetailsView.h b/Classes/BuschJaegerHistoryDetailsView.h
index 553e97090..8aa5c8c01 100644
--- a/Classes/BuschJaegerHistoryDetailsView.h
+++ b/Classes/BuschJaegerHistoryDetailsView.h
@@ -34,6 +34,7 @@
@property (nonatomic, retain) IBOutlet UILabel *stationLabel;
@property (nonatomic, retain) IBOutlet UILabel *dateLabel;
+@property (nonatomic, retain) IBOutlet UITableView *tableView;
@property (nonatomic, retain) IBOutlet UIView *fullscreenView;
@property (nonatomic, retain) IBOutlet UIButton *saveButton;
@property (nonatomic, retain) IBOutlet UIRemoteImageView *imageView;
diff --git a/Classes/BuschJaegerHistoryDetailsView.m b/Classes/BuschJaegerHistoryDetailsView.m
index d9c4889a1..b09808ee2 100644
--- a/Classes/BuschJaegerHistoryDetailsView.m
+++ b/Classes/BuschJaegerHistoryDetailsView.m
@@ -30,6 +30,7 @@
@synthesize backButton;
@synthesize stationLabel;
@synthesize dateLabel;
+@synthesize tableView;
@synthesize imageView;
@synthesize saveButton;
@synthesize fullscreenView;
@@ -73,6 +74,7 @@
- (void)dealloc {
[tableController release];
+ [tableView release];
[history release];
[backButton release];
[stationLabel release];
@@ -116,6 +118,10 @@
[detailsTapGestureRecognizer setNumberOfTapsRequired:1];
[detailsTapGestureRecognizer setNumberOfTouchesRequired:1];
[imageView addGestureRecognizer:detailsTapGestureRecognizer];
+
+ if([LinphoneManager runningOnIpad]) {
+ [tableView setRowHeight:[tableView rowHeight]*2.5];
+ }
}
- (void)viewWillAppear:(BOOL)animated {
@@ -172,7 +178,9 @@
#pragma mark - Action Functions
- (IBAction)onBackClick:(id)sender {
- [[BuschJaegerMainView instance].navigationController popViewControllerAnimated:FALSE];
+ if([BuschJaegerMainView instance].navigationController.topViewController == self) {
+ [[BuschJaegerMainView instance].navigationController popViewControllerAnimated:FALSE];
+ }
}
- (IBAction)onDeleteClick:(id)sender {
@@ -212,9 +220,9 @@
return [history.images count];
}
-- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+- (UITableViewCell *)tableView:(UITableView *)atableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *kCellId = @"UIHistoryCell";
- UIHistoryDetailsCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellId];
+ UIHistoryDetailsCell *cell = [atableView dequeueReusableCellWithIdentifier:kCellId];
if (cell == nil) {
cell = [[[UIHistoryDetailsCell alloc] initWithIdentifier:kCellId] autorelease];
@@ -233,8 +241,8 @@
#pragma mark - UITableViewDelegate Functions
-- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
- [tableView deselectRowAtIndexPath:indexPath animated:NO];
+- (void)tableView:(UITableView *)atableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+ [atableView deselectRowAtIndexPath:indexPath animated:NO];
currentIndex = [indexPath row];
[fullscreenView setHidden:FALSE];
[imageView setImage:nil];
@@ -244,8 +252,10 @@
#pragma mark - BuschJaegerConfigurationDelegate Functions
- (void)buschJaegerConfigurationSuccess {
- [[BuschJaegerMainView instance].historyView reload];
- [[BuschJaegerMainView instance].navigationController popViewControllerAnimated:FALSE];
+ if([BuschJaegerMainView instance].navigationController.topViewController == self) {
+ [[BuschJaegerMainView instance].historyView reload];
+ [[BuschJaegerMainView instance].navigationController popViewControllerAnimated:FALSE];
+ }
}
- (void)buschJaegerConfigurationError:(NSString *)error {
diff --git a/Classes/BuschJaegerHistoryDetailsView.xib b/Classes/BuschJaegerHistoryDetailsView.xib
index 784965879..623536579 100644
--- a/Classes/BuschJaegerHistoryDetailsView.xib
+++ b/Classes/BuschJaegerHistoryDetailsView.xib
@@ -2,13 +2,13 @@
1536
- 12C60
- 2844
- 1187.34
- 625.00
+ 11G63
+ 2840
+ 1138.51
+ 569.00
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- 1930
+ 1926
IBProxyObject
@@ -44,12 +44,9 @@
274
{{0, 34}, {320, 368}}
+
_NS:10
-
- 3
- MQA
-
NO
YES
NO
@@ -57,7 +54,7 @@
YES
0
YES
- 110
+ 220
22
22
@@ -66,6 +63,7 @@
292
{{5, 5}, {152, 21}}
+
_NS:9
NO
@@ -74,7 +72,10 @@
NO
IBCocoaTouchFramework
Station 1
-
+
+ 3
+ MQA
+
0
10
@@ -93,6 +94,7 @@
289
{{168, 5}, {112, 21}}
+
_NS:9
NO
@@ -120,6 +122,7 @@
289
{{286, 0}, {34, 34}}
+
_NS:9
NO
@@ -158,6 +161,7 @@
274
{280, 40}
+
_NS:9
NO
@@ -186,6 +190,7 @@
274
{280, 40}
+
_NS:9
3
@@ -204,6 +209,7 @@
{{20, 410}, {280, 40}}
+
_NS:9
@@ -218,6 +224,7 @@
274
{320, 460}
+
_NS:9
@@ -234,6 +241,7 @@
265
{{266, 406}, {34, 34}}
+
_NS:9
NO
@@ -256,6 +264,7 @@
{320, 460}
+
_NS:9
@@ -270,6 +279,7 @@
{{0, 20}, {320, 460}}
+
@@ -343,6 +353,14 @@
39
+
+
+ tableView
+
+
+
+ 42
+
view
@@ -525,9 +543,116 @@
- 41
+ 42
+
+
+
+
+ BuschJaegerHistoryDetailsView
+ UIViewController
+
+ UISwipeGestureRecognizer
+ id
+ id
+ id
+ id
+
+
+
+ doDetailsSwipe:
+ UISwipeGestureRecognizer
+
+
+ hideImage:
+ id
+
+
+ onBackClick:
+ id
+
+
+ onDeleteClick:
+ id
+
+
+ saveImage:
+ id
+
+
+
+ UIView
+ UILabel
+ UISwipeGestureRecognizer
+ UISwipeGestureRecognizer
+ UITapGestureRecognizer
+ UIView
+ UIRemoteImageView
+ UIButton
+ UILabel
+ UITableViewController
+ UITableView
+
+
+
+ backButton
+ UIView
+
+
+ dateLabel
+ UILabel
+
+
+ detailsLeftSwipeGestureRecognizer
+ UISwipeGestureRecognizer
+
+
+ detailsRightSwipeGestureRecognizer
+ UISwipeGestureRecognizer
+
+
+ detailsTapGestureRecognizer
+ UITapGestureRecognizer
+
+
+ fullscreenView
+ UIView
+
+
+ imageView
+ UIRemoteImageView
+
+
+ saveButton
+ UIButton
+
+
+ stationLabel
+ UILabel
+
+
+ tableController
+ UITableViewController
+
+
+ tableView
+ UITableView
+
+
+
+ IBProjectSource
+ ./Classes/BuschJaegerHistoryDetailsView.h
+
+
+
+ UIRemoteImageView
+ UIImageView
+
+ IBProjectSource
+ ./Classes/UIRemoteImageView.h
+
+
+
-
0
IBCocoaTouchFramework
@@ -540,6 +665,6 @@
{34, 35}
{26, 26}
- 1930
+ 1926
diff --git a/Classes/BuschJaegerHistoryTableViewController.m b/Classes/BuschJaegerHistoryTableViewController.m
index c9c31618b..5f168d070 100644
--- a/Classes/BuschJaegerHistoryTableViewController.m
+++ b/Classes/BuschJaegerHistoryTableViewController.m
@@ -90,7 +90,11 @@
}
- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath {
- return UITableViewCellEditingStyleDelete;
+ // Detemine if it's in editing mode
+ if (self.editing) {
+ return UITableViewCellEditingStyleDelete;
+ }
+ return UITableViewCellEditingStyleNone;
}
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
diff --git a/Classes/BuschJaegerHistoryView.h b/Classes/BuschJaegerHistoryView.h
index e243e3cba..4f1c759ed 100644
--- a/Classes/BuschJaegerHistoryView.h
+++ b/Classes/BuschJaegerHistoryView.h
@@ -21,15 +21,13 @@
#import "BuschJaegerHistoryTableViewController.h"
#import "BuschJaegerConfiguration.h"
-@interface BuschJaegerHistoryView : UIViewController {
+@interface BuschJaegerHistoryView : UIViewController {
}
-@property (nonatomic, retain) IBOutlet UIView *backButton;
@property (nonatomic, retain) IBOutlet UIView *waitView;
@property (nonatomic, retain) IBOutlet BuschJaegerHistoryTableViewController *tableController;
-
-- (IBAction)onBackClick:(id)sender;
+@property (nonatomic, retain) IBOutlet UISwipeGestureRecognizer *backRightSwipeGestureRecognizer;
- (void)reload;
diff --git a/Classes/BuschJaegerHistoryView.m b/Classes/BuschJaegerHistoryView.m
index 3d0903fc2..3f1381a9b 100644
--- a/Classes/BuschJaegerHistoryView.m
+++ b/Classes/BuschJaegerHistoryView.m
@@ -24,17 +24,16 @@
@implementation BuschJaegerHistoryView
-@synthesize backButton;
@synthesize waitView;
@synthesize tableController;
-
+@synthesize backRightSwipeGestureRecognizer;
#pragma mark - Lifecycle Functions
- (void)dealloc {
- [backButton release];
[waitView release];
[tableController release];
+ [backRightSwipeGestureRecognizer release];
[super dealloc];
}
@@ -49,12 +48,12 @@
[waitView setHidden:TRUE];
- /* init gradients */
- {
- UIColor* col1 = BUSCHJAEGER_NORMAL_COLOR;
- UIColor* col2 = BUSCHJAEGER_NORMAL_COLOR2;
-
- [BuschJaegerUtils createGradientForView:backButton withTopColor:col1 bottomColor:col2 cornerRadius:BUSCHJAEGER_DEFAULT_CORNER_RADIUS];
+ // Swipe back for iphone devices
+ if(![LinphoneManager runningOnIpad]) {
+ backRightSwipeGestureRecognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(doBackSwipe:)];
+ [backRightSwipeGestureRecognizer setDirection:UISwipeGestureRecognizerDirectionRight];
+ [backRightSwipeGestureRecognizer setDelegate:self];
+ [self.view addGestureRecognizer:backRightSwipeGestureRecognizer];
}
}
@@ -74,14 +73,20 @@
}
}
-#pragma mark - Action Functions
-- (IBAction)onBackClick:(id)sender {
- [[BuschJaegerMainView instance].navigationController popViewControllerAnimated:FALSE];
+#pragma mark - Actions Functions
+
+- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
+ return YES;
}
+- (IBAction)doBackSwipe:(UISwipeGestureRecognizer *)sender {
+ if([BuschJaegerMainView instance].navigationController.topViewController == self) {
+ [[BuschJaegerMainView instance].navigationController popViewControllerAnimated:FALSE];
+ }
+}
-#pragma mark -
+#pragma mark -
- (void)reload {
[self view]; // Force view load
@@ -103,7 +108,7 @@
#pragma mark - BuschJaegerConfigurationDelegate Functions
- (void)buschJaegerConfigurationSuccess {
- [[BuschJaegerMainView instance] updateIconBadge:nil];
+ [[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
[waitView setHidden:TRUE];
[self update];
}
diff --git a/Classes/BuschJaegerHistoryView.xib b/Classes/BuschJaegerHistoryView.xib
index 719fe2316..de6331a90 100644
--- a/Classes/BuschJaegerHistoryView.xib
+++ b/Classes/BuschJaegerHistoryView.xib
@@ -2,19 +2,17 @@
1536
- 12C60
- 2844
- 1187.34
- 625.00
+ 11G63
+ 2840
+ 1138.51
+ 569.00
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- 1930
+ 1926
IBProxyObject
IBUIActivityIndicatorView
- IBUIButton
- IBUILabel
IBUITableView
IBUITableViewController
IBUIView
@@ -39,94 +37,25 @@
274
-
-
- 269
-
-
-
- 274
- {280, 40}
-
-
- _NS:9
- NO
- YES
- 7
- NO
- IBCocoaTouchFramework
- Back
-
- 3
- MQA
-
-
- 0
- 10
- 1
-
- 1
- 24
-
-
- Helvetica
- 24
- 16
-
-
-
-
- 274
- {280, 40}
-
- _NS:9
-
- 3
- MCAwAA
-
- NO
- IBCocoaTouchFramework
- 0
- 0
-
-
-
- 3
- MC41AA
-
-
- 2
- 15
-
-
- Helvetica-Bold
- 15
- 16
-
-
-
- {{20, 410}, {280, 40}}
-
-
- _NS:9
-
- IBCocoaTouchFramework
-
274
- {334, 392}
+ {320, 460}
+
_NS:9
-
+
+ 3
+ MQA
+
YES
IBCocoaTouchFramework
YES
2
0
YES
- 44
+ 60
22
22
@@ -139,7 +68,8 @@
301
{{142, 211}, {37, 37}}
-
+
+
_NS:9
NO
IBCocoaTouchFramework
@@ -150,6 +80,7 @@
{320, 460}
+
_NS:9
@@ -161,6 +92,7 @@
{{0, 20}, {320, 460}}
+
1
@@ -189,14 +121,6 @@
3
-
-
- backButton
-
-
-
- 18
-
tableController
@@ -213,15 +137,6 @@
24
-
-
- onBackClick:
-
-
- 7
-
- 10
-
dataSource
@@ -267,7 +182,6 @@
1
-
@@ -284,26 +198,6 @@
-
- 7
-
-
-
-
-
-
- Back Button View
-
-
- 9
-
-
-
-
- 8
-
-
-
12
@@ -343,10 +237,6 @@
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
-
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
@@ -354,15 +244,71 @@
25
-
+
+
+
+ BuschJaegerHistoryTableViewController
+ UITableViewController
+
+ waitView
+ UIView
+
+
+ waitView
+
+ waitView
+ UIView
+
+
+
+ IBProjectSource
+ ./Classes/BuschJaegerHistoryTableViewController.h
+
+
+
+ BuschJaegerHistoryView
+ UIViewController
+
+ doBackSwipe:
+ UISwipeGestureRecognizer
+
+
+ doBackSwipe:
+
+ doBackSwipe:
+ UISwipeGestureRecognizer
+
+
+
+ UISwipeGestureRecognizer
+ BuschJaegerHistoryTableViewController
+ UIView
+
+
+
+ backRightSwipeGestureRecognizer
+ UISwipeGestureRecognizer
+
+
+ tableController
+ BuschJaegerHistoryTableViewController
+
+
+ waitView
+ UIView
+
+
+
+ IBProjectSource
+ ./Classes/BuschJaegerHistoryView.h
+
+
+
+
0
IBCocoaTouchFramework
-
- com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS
-
-
YES
3
- 1930
+ 1926
diff --git a/Classes/BuschJaegerMainView.h b/Classes/BuschJaegerMainView.h
index e16ed2408..becf91f61 100644
--- a/Classes/BuschJaegerMainView.h
+++ b/Classes/BuschJaegerMainView.h
@@ -45,8 +45,6 @@
@property (nonatomic, retain) IBOutlet BuschJaegerHistoryView *historyView;
@property (nonatomic, retain) IBOutlet BuschJaegerHistoryDetailsView *historyDetailsView;
-- (void)updateIconBadge:(id)info;
-
+ (BuschJaegerMainView*) instance;
@end
diff --git a/Classes/BuschJaegerMainView.m b/Classes/BuschJaegerMainView.m
index 11af398cb..557ece5da 100644
--- a/Classes/BuschJaegerMainView.m
+++ b/Classes/BuschJaegerMainView.m
@@ -183,7 +183,14 @@ static BuschJaegerMainView* mainViewInstance=nil;
selector:@selector(textReceivedEvent:)
name:kLinphoneTextReceived
object:nil];
- // set observer
+
+ // Set observer
+ [[NSNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(dtmfReceivedEvent:)
+ name:kLinphoneDtmfReceived
+ object:nil];
+
+ // Set observer
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(networkUpdateEvent:)
name:kLinphoneNetworkUpdate
@@ -202,6 +209,16 @@ static BuschJaegerMainView* mainViewInstance=nil;
[[NSNotificationCenter defaultCenter] removeObserver:self
name:kLinphoneTextReceived
object:nil];
+
+ // Remove observer
+ [[NSNotificationCenter defaultCenter] removeObserver:self
+ name:kLinphoneDtmfReceived
+ object:nil];
+
+ // Remove observer
+ [[NSNotificationCenter defaultCenter] removeObserver:self
+ name:kLinphoneNetworkUpdate
+ object:nil];
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
@@ -238,6 +255,9 @@ static BuschJaegerMainView* mainViewInstance=nil;
[self callUpdate:call state:state animated:TRUE];
}
+- (void)dtmfReceivedEvent: (NSNotification*) notif {
+ [self displayDtmf:notif];
+}
- (void)textReceivedEvent: (NSNotification*) notif {
[self displayMessage:notif];
@@ -323,6 +343,19 @@ static BuschJaegerMainView* mainViewInstance=nil;
AudioServicesPlaySystemSound([LinphoneManager instance].sounds.call);
}
}
+- (void)displayDtmf:(id)message {
+ if (![[UIDevice currentDevice] respondsToSelector:@selector(isMultitaskingSupported)]
+ || [UIApplication sharedApplication].applicationState == UIApplicationStateActive) {
+ UIAlertView* error = [[UIAlertView alloc] initWithTitle:@"Welcome"
+ message: [NSString stringWithFormat:@"%@", [LinphoneManager instance].configuration.levelPushButton.name]
+ delegate:nil
+ cancelButtonTitle:NSLocalizedString(@"Continue",nil)
+ otherButtonTitles:nil,nil];
+ [error show];
+ [error release];
+ AudioServicesPlayAlertSound([LinphoneManager instance].sounds.level);
+ }
+}
- (void)displayMessage:(id)message {
if (![[UIDevice currentDevice] respondsToSelector:@selector(isMultitaskingSupported)]
diff --git a/Classes/BuschJaegerManualSettingsView.m b/Classes/BuschJaegerManualSettingsView.m
index 8203a4e77..3c779d926 100644
--- a/Classes/BuschJaegerManualSettingsView.m
+++ b/Classes/BuschJaegerManualSettingsView.m
@@ -106,13 +106,17 @@
- (IBAction)onValidClick:(id)sender {
if([[addressField text] length] && [[usernameField text] length] && [[passwordField text] length]) {
- [[BuschJaegerMainView instance].navigationController popViewControllerAnimated:FALSE];
- [[BuschJaegerMainView instance].settingsView reloadConfiguration];
+ if([BuschJaegerMainView instance].navigationController.topViewController == self) {
+ [[BuschJaegerMainView instance].navigationController popViewControllerAnimated:FALSE];
+ [[BuschJaegerMainView instance].settingsView reloadConfiguration];
+ }
}
}
- (IBAction)onBackClick:(id)sender {
- [[BuschJaegerMainView instance].navigationController popViewControllerAnimated:FALSE];
+ if([BuschJaegerMainView instance].navigationController.topViewController == self) {
+ [[BuschJaegerMainView instance].navigationController popViewControllerAnimated:FALSE];
+ }
}
diff --git a/Classes/BuschJaegerSettingsView.m b/Classes/BuschJaegerSettingsView.m
index b5ef4c297..5c6cb8445 100644
--- a/Classes/BuschJaegerSettingsView.m
+++ b/Classes/BuschJaegerSettingsView.m
@@ -21,6 +21,23 @@
#import "BuschJaegerUtils.h"
#import "BuschJaegerMainView.h"
+@interface ZBarReaderViewControllerEx : ZBarReaderViewController {
+
+}
+@end
+
+@implementation ZBarReaderViewControllerEx
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+ return interfaceOrientation == UIInterfaceOrientationPortrait;
+}
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskPortrait;
+}
+
+@end
+
@implementation BuschJaegerSettingsView
@synthesize scanButton;
@@ -32,8 +49,8 @@
#pragma mark - Lifecycle Functions
- (void)initBuschJaegerSettingsView {
- scanController = [[ZBarReaderViewController alloc] init];
- scanController.supportedOrientationsMask = ZBarOrientationMaskAll;
+ scanController = [[ZBarReaderViewControllerEx alloc] init];
+ scanController.supportedOrientationsMask = ZBarOrientationMask(UIInterfaceOrientationPortrait);
[scanController setReaderDelegate:self];
}
@@ -121,7 +138,9 @@
}
- (IBAction)onBackClick:(id)sender {
- [[BuschJaegerMainView instance].navigationController popViewControllerAnimated:FALSE];
+ if([BuschJaegerMainView instance].navigationController.topViewController == self) {
+ [[BuschJaegerMainView instance].navigationController popViewControllerAnimated:FALSE];
+ }
}
@@ -162,13 +181,17 @@
}
}
if(handled) {
- [[BuschJaegerMainView instance].navigationController popViewControllerAnimated:FALSE];
+ if([BuschJaegerMainView instance].navigationController.topViewController == self) {
+ [[BuschJaegerMainView instance].navigationController popViewControllerAnimated:FALSE];
+ }
}
}
}
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker {
- [[BuschJaegerMainView instance].navigationController popViewControllerAnimated:FALSE];
+ if([BuschJaegerMainView instance].navigationController.topViewController == scanController) {
+ [[BuschJaegerMainView instance].navigationController popViewControllerAnimated:FALSE];
+ }
}
#pragma mark - BuschJaegerConfigurationDelegate Functions
diff --git a/Classes/BuschJaegerUtils.m b/Classes/BuschJaegerUtils.m
index d3607392a..cc762340d 100644
--- a/Classes/BuschJaegerUtils.m
+++ b/Classes/BuschJaegerUtils.m
@@ -68,8 +68,10 @@
+ (void)resizeGradientLayer:(CALayer*)layer {
if(layer.name != nil && [layer.name compare:@"BuschJaegerLayer" options:0] == NSOrderedSame) {
- if(layer.superlayer != nil) {
+ if(layer.delegate == nil) {
[layer setFrame:layer.superlayer.bounds];
+ } else if([layer.delegate isKindOfClass:[UIView class]]) {
+ [layer setFrame:((UIView *)layer.delegate).bounds];
}
}
if([layer respondsToSelector:@selector(sublayers)]) {
@@ -81,9 +83,6 @@
+ (void)resizeGradient:(UIView*)view {
[BuschJaegerUtils resizeGradientLayer:view.layer];
- for(UIView *subView in view.subviews) {
- [BuschJaegerUtils resizeGradient:subView];
- }
}
@end
diff --git a/Classes/BuschJaegerWelcomeView.h b/Classes/BuschJaegerWelcomeView.h
index a8ab86c2f..9b492d52b 100644
--- a/Classes/BuschJaegerWelcomeView.h
+++ b/Classes/BuschJaegerWelcomeView.h
@@ -21,17 +21,17 @@
#import "BuschJaegerStationTableViewController.h"
#import "BuschJaegerHistoryTableViewController.h"
-@interface BuschJaegerWelcomeView : UIViewController {
+@interface BuschJaegerWelcomeView : UIViewController {
}
@property (nonatomic, retain) IBOutlet UIButton* settingsButton;
-@property (nonatomic, retain) IBOutlet UIButton* historyButton;
@property (nonatomic, retain) IBOutlet BuschJaegerStationTableViewController *stationTableController;
@property (nonatomic, retain) IBOutlet UIView *waitView;
@property (nonatomic, retain) IBOutlet BuschJaegerHistoryTableViewController *historyTableController;
+@property (nonatomic, retain) IBOutlet UISwipeGestureRecognizer *historyLeftSwipeGestureRecognizer;
+
- (IBAction)settingsClick:(id)sender;
-- (IBAction)historyClick:(id)sender;
- (void)reloadHistory;
diff --git a/Classes/BuschJaegerWelcomeView.m b/Classes/BuschJaegerWelcomeView.m
index 97d5eee9b..742ddd06f 100644
--- a/Classes/BuschJaegerWelcomeView.m
+++ b/Classes/BuschJaegerWelcomeView.m
@@ -23,19 +23,18 @@
@implementation BuschJaegerWelcomeView
@synthesize settingsButton;
-@synthesize historyButton;
@synthesize stationTableController;
@synthesize historyTableController;
@synthesize waitView;
+@synthesize historyLeftSwipeGestureRecognizer;
#pragma mark - Lifecycle Functions
- (void)dealloc {
[settingsButton release];
- [historyButton release];
[stationTableController release];
[historyTableController release];
-
+ [historyLeftSwipeGestureRecognizer release];
// Remove all observer
[[NSNotificationCenter defaultCenter] removeObserver:self];
@@ -48,15 +47,19 @@
- (void)viewDidLoad {
[super viewDidLoad];
-
+
+ // Swipe history gesture for iphone devices
+ if(![LinphoneManager runningOnIpad]) {
+ historyLeftSwipeGestureRecognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(doHistorySwipe:)];
+ [historyLeftSwipeGestureRecognizer setDirection:UISwipeGestureRecognizerDirectionLeft];
+ [historyLeftSwipeGestureRecognizer setDelegate:self];
+ [self.view addGestureRecognizer:historyLeftSwipeGestureRecognizer];
+ }
+
[historyTableController.view setBackgroundColor:[UIColor clearColor]];
[stationTableController.view setBackgroundColor:[UIColor clearColor]];
[waitView setHidden:TRUE];
-
- if([LinphoneManager runningOnIpad]) {
- [historyButton setHidden:TRUE];
- }
}
- (void)viewWillAppear:(BOOL)animated {
@@ -71,8 +74,8 @@
selector:@selector(applicationWillEnterForeground:)
name:UIApplicationWillEnterForegroundNotification
object:nil];
- [self performSelector:@selector(reloadHistory) withObject:self afterDelay:1.0];
- [self reloadHistory];
+ // Wait a bit for the gateway update
+ [self performSelector:@selector(reloadHistory) withObject:self afterDelay:2.0];
}
- (void)viewWillDisappear:(BOOL)animated{
@@ -120,7 +123,6 @@
NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"ID" ascending:YES];
NSArray *sortDescriptors = [NSArray arrayWithObjects:sortDescriptor, nil];
[stationTableController setStations:[configuration.outdoorStations sortedArrayUsingDescriptors:sortDescriptors]];
- [historyButton setEnabled: configuration.network.localAddress != nil];
}
@@ -148,15 +150,23 @@
[[BuschJaegerMainView instance].navigationController pushViewController:[BuschJaegerMainView instance].settingsView animated:FALSE];
}
-- (IBAction)historyClick:(id)sender {
+
+#pragma mark - Actions Functions
+
+- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
+ return YES;
+}
+
+- (IBAction)doHistorySwipe:(UISwipeGestureRecognizer *)sender {
[[BuschJaegerMainView instance].historyView reload];
[[BuschJaegerMainView instance].navigationController pushViewController:[BuschJaegerMainView instance].historyView animated:FALSE];
}
+
#pragma mark - BuschJaegerConfigurationDelegate Functions
- (void)buschJaegerConfigurationSuccess {
- [[BuschJaegerMainView instance] updateIconBadge:nil];
+ [[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
[waitView setHidden:TRUE];
[self update];
}
diff --git a/Classes/BuschJaegerWelcomeView.xib b/Classes/BuschJaegerWelcomeView.xib
index f1961ca33..ccaf53e6e 100644
--- a/Classes/BuschJaegerWelcomeView.xib
+++ b/Classes/BuschJaegerWelcomeView.xib
@@ -2,17 +2,18 @@
1536
- 12C60
- 2844
- 1187.34
- 625.00
+ 11G63
+ 2840
+ 1138.51
+ 569.00
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- 1930
+ 1926
IBProxyObject
IBUIButton
+ IBUIImageView
IBUILabel
IBUITableView
IBUITableViewController
@@ -95,7 +96,7 @@
1
MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA
-
+
3
MC41AA
@@ -103,44 +104,16 @@
NSImage
bj_settings.png
-
+
2
15
-
+
Helvetica-Bold
15
16
-
-
- 292
- {{10, 10}, {64, 64}}
-
-
- _NS:9
- NO
- IBCocoaTouchFramework
- 0
- 0
- 10
- 10
- 10
- 10
-
-
- 1
- MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA
-
-
-
- NSImage
- bj_history.png
-
-
-
-
274
@@ -158,10 +131,24 @@
22
22
+
+
+ 292
+ {{30, 25}, {27, 36}}
+
+
+ _NS:9
+ NO
+ IBCocoaTouchFramework
+
+ NSImage
+ bj_station.png
+
+
{{0, 20}, {320, 460}}
-
+
1
MC4xMTc2NDcwNTg4IDAuMTY0NzA1ODgyNCAwLjIxOTYwNzg0MzEAA
@@ -197,14 +184,6 @@
6
-
-
- historyButton
-
-
-
- 20
-
stationTableController
@@ -246,15 +225,6 @@
13
-
-
- historyClick:
-
-
- 7
-
- 19
-
@@ -270,8 +240,8 @@
-
+
@@ -309,10 +279,9 @@
- 17
-
+ 22
+
- Button - History
@@ -322,7 +291,7 @@
UIResponder
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
@@ -333,21 +302,17 @@
- 21
+ 22
0
IBCocoaTouchFramework
-
- com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS
-
-
YES
3
- {55, 43}
{55, 57}
+ {27, 36}
- 1930
+ 1926
diff --git a/Classes/BuschJaegerWelcomeView~ipad.xib b/Classes/BuschJaegerWelcomeView~ipad.xib
index fa45d972f..9bbfa8822 100644
--- a/Classes/BuschJaegerWelcomeView~ipad.xib
+++ b/Classes/BuschJaegerWelcomeView~ipad.xib
@@ -2,17 +2,18 @@
1536
- 12C60
- 2844
- 1187.34
- 625.00
+ 11G63
+ 2840
+ 1138.51
+ 569.00
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- 1930
+ 1926
IBProxyObject
IBUIButton
+ IBUIImageView
IBUILabel
IBUITableView
IBUITableViewController
@@ -38,6 +39,21 @@
274
+
+
+ 293
+ {{271, 28}, {27, 36}}
+
+
+
+ _NS:9
+ NO
+ IBCocoaTouchFramework
+
+ NSImage
+ bj_station.png
+
+
293
@@ -97,7 +113,7 @@
1
MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA
-
+
3
MC41AA
@@ -105,51 +121,23 @@
NSImage
bj_settings.png
-
+
2
15
-
+
Helvetica-Bold
15
16
-
-
- 292
- {{10, 10}, {64, 64}}
-
-
-
- _NS:9
- NO
- IBCocoaTouchFramework
- 0
- 0
- 10
- 10
- 10
- 10
-
-
- 1
- MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA
-
-
-
- NSImage
- bj_history.png
-
-
-
-
275
{{384, 85}, {384, 939}}
+
_NS:9
YES
@@ -168,7 +156,7 @@
{{0, 85}, {384, 939}}
-
+
_NS:9
YES
@@ -177,7 +165,7 @@
2
0
YES
- 44
+ 60
22
22
@@ -185,7 +173,7 @@
{{0, 20}, {768, 1024}}
-
+
1
MC4xMTc2NDcwNTg4IDAuMTY0NzA1ODgyNCAwLjIxOTYwNzg0MzEAA
@@ -251,14 +239,6 @@
6
-
-
- historyButton
-
-
-
- 20
-
stationTableController
@@ -308,15 +288,6 @@
13
-
-
- historyClick:
-
-
- 7
-
- 19
-
dataSource
@@ -356,9 +327,9 @@
-
+
@@ -396,12 +367,6 @@
-
- 17
-
-
- Button - History
-
22
@@ -414,6 +379,11 @@
+
+ 34
+
+
+
@@ -422,10 +392,10 @@
UIResponder
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- com.apple.InterfaceBuilder.IBCocoaTouchPlugin
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
BuschJaegerHistoryTableViewController
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
+ com.apple.InterfaceBuilder.IBCocoaTouchPlugin
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
@@ -436,7 +406,7 @@
- 33
+ 34
@@ -470,31 +440,28 @@
BuschJaegerWelcomeView
UIViewController
-
- id
- id
-
-
-
- historyClick:
- id
-
-
+
+ settingsClick:
+ id
+
+
+ settingsClick:
+
settingsClick:
id
-
+
- UIButton
+ UISwipeGestureRecognizer
BuschJaegerHistoryTableViewController
UIButton
BuschJaegerStationTableViewController
UIView
-
- historyButton
- UIButton
+
+ historyLeftSwipeGestureRecognizer
+ UISwipeGestureRecognizer
historyTableController
@@ -522,16 +489,12 @@
0
IBCocoaTouchFramework
-
- com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS
-
-
YES
3
- {55, 43}
{55, 57}
+ {27, 36}
- 1930
+ 1926
diff --git a/Classes/LinphoneManager.h b/Classes/LinphoneManager.h
index 3d29a36ba..eb197f6ae 100644
--- a/Classes/LinphoneManager.h
+++ b/Classes/LinphoneManager.h
@@ -38,6 +38,7 @@ extern const char *const LINPHONERC_APPLICATION_KEY;
extern NSString *const kLinphoneCoreUpdate;
extern NSString *const kLinphoneDisplayStatusUpdate;
extern NSString *const kLinphoneTextReceived;
+extern NSString *const kLinphoneDtmfReceived;
extern NSString *const kLinphoneCallUpdate;
extern NSString *const kLinphoneRegistrationUpdate;
extern NSString *const kLinphoneMainViewChange;
diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m
index 082934eb8..e33e9a800 100644
--- a/Classes/LinphoneManager.m
+++ b/Classes/LinphoneManager.m
@@ -50,6 +50,7 @@ const char *const LINPHONERC_APPLICATION_KEY = "app";
NSString *const kLinphoneCoreUpdate = @"LinphoneCoreUpdate";
NSString *const kLinphoneDisplayStatusUpdate = @"LinphoneDisplayStatusUpdate";
NSString *const kLinphoneTextReceived = @"LinphoneTextReceived";
+NSString *const kLinphoneDtmfReceived = @"LinphoneDtmfReceived";
NSString *const kLinphoneCallUpdate = @"LinphoneCallUpdate";
NSString *const kLinphoneRegistrationUpdate = @"LinphoneRegistrationUpdate";
/* MODIFICATION: Add buschjaeger configuration event */
@@ -575,6 +576,15 @@ static void linphone_iphone_registration_state(LinphoneCore *lc, LinphoneProxyCo
#pragma mark - Text Received Functions
+- (void)onDtmfReceived:(LinphoneCore *)lc call:(LinphoneCall *)call dtmf:(int)dtmf {
+ // Post event
+ NSDictionary* dict = [NSDictionary dictionaryWithObjectsAndKeys:
+ [NSValue valueWithPointer:call], @"call",
+ [NSNumber numberWithInt:dtmf], @"dtmf",
+ nil];
+ [[NSNotificationCenter defaultCenter] postNotificationName:kLinphoneDtmfReceived object:self userInfo:dict];
+}
+
- (void)onMessageReceived:(LinphoneCore *)lc room:(LinphoneChatRoom *)room message:(LinphoneChatMessage*)msg {
char *fromStr = linphone_address_as_string_uri_only(linphone_chat_message_get_from(msg));
@@ -641,6 +651,10 @@ static void linphone_iphone_message_received(LinphoneCore *lc, LinphoneChatRoom
[(LinphoneManager*)linphone_core_get_user_data(lc) onMessageReceived:lc room:room message:message];
}
+static void linphone_iphone_dtmf_received(LinphoneCore *lc, LinphoneCall *call, int dtmf) {
+ [(LinphoneManager*)linphone_core_get_user_data(lc) onDtmfReceived:lc call:call dtmf:dtmf];
+}
+
#pragma mark - Network Functions
@@ -796,7 +810,7 @@ static LinphoneCoreVTable linphonec_vtable = {
.display_url=NULL,
.text_received=NULL,
.message_received=linphone_iphone_message_received,
- .dtmf_received=NULL,
+ .dtmf_received=linphone_iphone_dtmf_received,
.transfer_state_changed=linphone_iphone_transfer_state_changed
};
diff --git a/Classes/LinphoneUI/UIHistoryCell.m b/Classes/LinphoneUI/UIHistoryCell.m
index 554df5931..e2ae41d25 100644
--- a/Classes/LinphoneUI/UIHistoryCell.m
+++ b/Classes/LinphoneUI/UIHistoryCell.m
@@ -37,14 +37,15 @@
options:nil];
if ([arrayOfViews count] >= 1) {
- [self addSubview:[[arrayOfViews objectAtIndex:0] retain]];
+ UIView *view = [[arrayOfViews objectAtIndex:0] retain];
+ [view setFrame:[self bounds]];
+ [self addSubview:view];
}
+ NSLocale *local = [NSLocale currentLocale];
+ NSString *strFormatter = [[NSDateFormatter dateFormatFromTemplate:@"yyyyMMMMdd\nkms" options:0 locale:local] retain];
dateFormatter = [[NSDateFormatter alloc] init];
- [dateFormatter setTimeStyle:NSDateFormatterMediumStyle];
- [dateFormatter setDateStyle:NSDateFormatterMediumStyle];
- NSLocale *locale = [NSLocale currentLocale];
- [dateFormatter setLocale:locale];
+ [dateFormatter setDateFormat:strFormatter];
}
return self;
}
@@ -81,6 +82,12 @@
OutdoorStation *station = [[set allObjects] objectAtIndex:0];
stationName = station.name;
}
+ if(history.incoming) {
+ stationName = [NSString stringWithFormat:@"%@ \U00002199\U0000FE0E", stationName];
+ } else {
+ stationName = [NSString stringWithFormat:@"%@ \U00002197\U0000FE0E", stationName];
+ }
+
// Station
[stationLabel setText:stationName];
@@ -96,6 +103,10 @@
}
}
+-(void) layoutSubviews {
+ [super layoutSubviews];
+}
+
#pragma mark - Action Functions
diff --git a/Classes/LinphoneUI/UIHistoryCell.xib b/Classes/LinphoneUI/UIHistoryCell.xib
index 74c59cb8a..a10593a5f 100644
--- a/Classes/LinphoneUI/UIHistoryCell.xib
+++ b/Classes/LinphoneUI/UIHistoryCell.xib
@@ -2,13 +2,13 @@
1536
- 12C60
- 2844
- 1187.34
- 625.00
+ 11G63
+ 2840
+ 1138.51
+ 569.00
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- 1930
+ 1926
IBProxyObject
@@ -40,7 +40,7 @@
292
- {{5, 5}, {32, 32}}
+ {{5, 5}, {50, 50}}
@@ -51,7 +51,7 @@
292
- {{45, 10}, {120, 21}}
+ {{59, 20}, {130, 21}}
@@ -71,18 +71,18 @@
10
1
- 17
+ 18
Helvetica
- 17
+ 18
16
289
- {{173, 10}, {103, 21}}
+ {{183, 11}, {93, 42}}
@@ -97,6 +97,8 @@
0
10
+ 2
+ 1
1
11
@@ -106,14 +108,19 @@
11
16
+ 93
289
- {{276, 0}, {44, 44}}
+ {{276, 9}, {44, 44}}
_NS:9
+
+ 3
+ MCAwAA
+
NO
IBCocoaTouchFramework
0
@@ -142,15 +149,12 @@
- {320, 42}
+ {320, 60}
_NS:9
-
- 3
- MCAwAA
-
+
IBCocoaTouchFramework
@@ -271,6 +275,17 @@
UIHistoryCell
UITableViewCell
+
+ onDeleteClick:
+ id
+
+
+ onDeleteClick:
+
+ onDeleteClick:
+ id
+
+
UILabel
UIRemoteImageView
@@ -307,16 +322,12 @@
0
IBCocoaTouchFramework
-
- com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS
-
-
YES
3
trash.png
{26, 26}
- 1930
+ 1926
diff --git a/Classes/LinphoneUI/UIHistoryDetailsCell.m b/Classes/LinphoneUI/UIHistoryDetailsCell.m
index b34814600..40237dfce 100644
--- a/Classes/LinphoneUI/UIHistoryDetailsCell.m
+++ b/Classes/LinphoneUI/UIHistoryDetailsCell.m
@@ -34,7 +34,9 @@
options:nil];
if ([arrayOfViews count] >= 1) {
- [self addSubview:[[arrayOfViews objectAtIndex:0] retain]];
+ UIView *view = [[arrayOfViews objectAtIndex:0] retain];
+ [view setFrame:[self bounds]];
+ [self addSubview:view];
}
}
return self;
diff --git a/Classes/LinphoneUI/UIHistoryDetailsCell.xib b/Classes/LinphoneUI/UIHistoryDetailsCell.xib
index ea5137f0f..df00ea869 100644
--- a/Classes/LinphoneUI/UIHistoryDetailsCell.xib
+++ b/Classes/LinphoneUI/UIHistoryDetailsCell.xib
@@ -1,14 +1,14 @@
- 1296
- 11E53
- 2549
- 1138.47
+ 1536
+ 11G63
+ 2840
+ 1138.51
569.00
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- 1498
+ 1926
IBProxyObject
@@ -37,8 +37,8 @@
- 298
- {{5, 5}, {310, 100}}
+ 274
+ {{5, 5}, {310, 210}}
_NS:9
@@ -47,15 +47,11 @@
IBCocoaTouchFramework
- {320, 110}
+ {320, 220}
_NS:9
-
- 3
- MCAwAA
-
IBCocoaTouchFramework
@@ -155,10 +151,10 @@
IBCocoaTouchFramework
com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS
-
+
YES
3
- 1498
+ 1926
diff --git a/Classes/LinphoneUI/UIStationCell.m b/Classes/LinphoneUI/UIStationCell.m
index fc3a49c93..20e250315 100644
--- a/Classes/LinphoneUI/UIStationCell.m
+++ b/Classes/LinphoneUI/UIStationCell.m
@@ -38,7 +38,9 @@
options:nil];
if ([arrayOfViews count] >= 1) {
- [self addSubview:[[arrayOfViews objectAtIndex:0] retain]];
+ UIView *view = [[arrayOfViews objectAtIndex:0] retain];
+ [view setFrame:[self bounds]];
+ [self addSubview:view];
}
CALayer *layer = cellBackgroundView.layer;
@@ -46,8 +48,6 @@
CAGradientLayer *overlayButtonShineLayer;
- [cellBackgroundView makeRoundWithCorner:(UIRectCornerBottomLeft|UIRectCornerBottomRight) radius:7.0];
-
overlayButtonShineLayer = [CAGradientLayer layer];
overlayButtonShineLayer.name = @"BuschJaegerLayer";
overlayButtonShineLayer.frame = layer.bounds;
@@ -70,12 +70,13 @@
[layer addSublayer:overlayButtonShineLayer];
UIView * shadow = [[UIView alloc] initWithFrame:cellBackgroundView.frame];
+ shadow.autoresizingMask = cellBackgroundView.autoresizingMask;
shadow.userInteractionEnabled = NO; // Modify this if needed
shadow.layer.shadowColor = [[UIColor blackColor] CGColor];
shadow.layer.shadowOffset = CGSizeMake(2, 2);
shadow.layer.shadowRadius = 5.0f;
shadow.layer.masksToBounds = NO;
-// shadow.layer.name = @"BuschJaegerLayer";
+ shadow.layer.name = @"BuschJaegerLayer";
shadow.clipsToBounds = NO;
shadow.layer.shadowOpacity = 0.9f;
[cellBackgroundView.superview insertSubview:shadow belowSubview:cellBackgroundView];
@@ -96,6 +97,7 @@
- (void)layoutSubviews {
[super layoutSubviews];
[BuschJaegerUtils resizeGradient:self];
+ [cellBackgroundView makeRoundWithCorner:(UIRectCornerBottomLeft|UIRectCornerBottomRight) radius:7.0];
}
#pragma mark - Property Functions
diff --git a/Classes/LinphoneUI/UIStationCell.xib b/Classes/LinphoneUI/UIStationCell.xib
index 46737a204..c455943a3 100644
--- a/Classes/LinphoneUI/UIStationCell.xib
+++ b/Classes/LinphoneUI/UIStationCell.xib
@@ -2,13 +2,13 @@
1536
- 12C60
- 2844
- 1187.34
- 625.00
+ 11G63
+ 2840
+ 1138.51
+ 569.00
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
- 1930
+ 1926
IBProxyObject
@@ -34,16 +34,17 @@
- 290
+ 274
274
{{10, 0}, {300, 90}}
+
_NS:9
-
+
3
MCAwAA
@@ -51,9 +52,11 @@
- 301
+ 293
{{147, 44}, {27, 36}}
+
+
_NS:9
NO
IBCocoaTouchFramework
@@ -67,6 +70,7 @@
290
{{20, 5}, {280, 36}}
+
_NS:9
NO
@@ -98,8 +102,10 @@
{320, 100}
+
_NS:9
+
IBCocoaTouchFramework
@@ -194,7 +200,37 @@
13
-
+
+
+
+ UIStationCell
+ UITableViewCell
+
+ UIView
+ UIImageView
+ UILabel
+
+
+
+ cellBackgroundView
+ UIView
+
+
+ stationImage
+ UIImageView
+
+
+ stationLabel
+ UILabel
+
+
+
+ IBProjectSource
+ ./Classes/UIStationCell.h
+
+
+
+
0
IBCocoaTouchFramework
YES
@@ -203,6 +239,6 @@
bj_station.png
{27, 36}
- 1930
+ 1926
diff --git a/Classes/UIView+RoundUIView.m b/Classes/UIView+RoundUIView.m
index 109a4bde0..a6653da10 100644
--- a/Classes/UIView+RoundUIView.m
+++ b/Classes/UIView+RoundUIView.m
@@ -12,8 +12,7 @@
@implementation UIView (RoundUIView)
-- (void)makeRoundWithCorner:(UIRectCorner)rectCorner radius:(float)radius
-{
+- (void)makeRoundWithCorner:(UIRectCorner)rectCorner radius:(float)radius {
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:self.bounds
byRoundingCorners:rectCorner
cornerRadii:CGSizeMake(radius, radius)];