diff --git a/Classes/AboutView.m b/Classes/AboutView.m
index df637f701..0fff361dc 100644
--- a/Classes/AboutView.m
+++ b/Classes/AboutView.m
@@ -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
diff --git a/Classes/AssistantView.m b/Classes/AssistantView.m
index abc42c592..bcde50a24 100644
--- a/Classes/AssistantView.m
+++ b/Classes/AssistantView.m
@@ -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];
diff --git a/Classes/Base.lproj/AssistantView.xib b/Classes/Base.lproj/AssistantView.xib
index a43bf0813..e37733554 100644
--- a/Classes/Base.lproj/AssistantView.xib
+++ b/Classes/Base.lproj/AssistantView.xib
@@ -23,7 +23,7 @@
-
+
diff --git a/Classes/Base.lproj/CallIncomingView.xib b/Classes/Base.lproj/CallIncomingView.xib
index 690005f4a..eb6035cbc 100644
--- a/Classes/Base.lproj/CallIncomingView.xib
+++ b/Classes/Base.lproj/CallIncomingView.xib
@@ -1,6 +1,7 @@
+
@@ -22,7 +23,7 @@
-
-
+
diff --git a/Classes/Base.lproj/ChatConversationView.xib b/Classes/Base.lproj/ChatConversationView.xib
index 12181a4ff..b2f230e20 100644
--- a/Classes/Base.lproj/ChatConversationView.xib
+++ b/Classes/Base.lproj/ChatConversationView.xib
@@ -1,6 +1,7 @@
+
@@ -30,7 +31,7 @@
-
+
@@ -174,7 +175,6 @@
-
diff --git a/Classes/Base.lproj/ChatsListView.xib b/Classes/Base.lproj/ChatsListView.xib
index ce8c9c3b5..670dd6185 100644
--- a/Classes/Base.lproj/ChatsListView.xib
+++ b/Classes/Base.lproj/ChatsListView.xib
@@ -1,6 +1,7 @@
+
@@ -26,7 +27,7 @@
-
+
diff --git a/Classes/Base.lproj/ContactDetailsLabelView.xib b/Classes/Base.lproj/ContactDetailsLabelView.xib
index b38686d5b..f746a0dfc 100644
--- a/Classes/Base.lproj/ContactDetailsLabelView.xib
+++ b/Classes/Base.lproj/ContactDetailsLabelView.xib
@@ -1,6 +1,7 @@
+
@@ -19,7 +20,7 @@
-
+
diff --git a/Classes/Base.lproj/ContactDetailsView.xib b/Classes/Base.lproj/ContactDetailsView.xib
index 87cd5d5e1..9d32ab529 100644
--- a/Classes/Base.lproj/ContactDetailsView.xib
+++ b/Classes/Base.lproj/ContactDetailsView.xib
@@ -1,6 +1,7 @@
+
@@ -21,7 +22,7 @@
-
+
diff --git a/Classes/Base.lproj/ContactsListView.xib b/Classes/Base.lproj/ContactsListView.xib
index eedf33809..6aa2c888e 100644
--- a/Classes/Base.lproj/ContactsListView.xib
+++ b/Classes/Base.lproj/ContactsListView.xib
@@ -13,17 +13,11 @@
-
+
-
-
-
-
-
-
@@ -32,7 +26,7 @@
-
+
@@ -159,6 +153,12 @@
+
+
+
+
+
+
diff --git a/Classes/Base.lproj/DialerView.xib b/Classes/Base.lproj/DialerView.xib
index edf9160a3..ff29bbc85 100644
--- a/Classes/Base.lproj/DialerView.xib
+++ b/Classes/Base.lproj/DialerView.xib
@@ -1,6 +1,7 @@
+
@@ -45,7 +46,7 @@
-
+
@@ -222,7 +223,7 @@
-
+
diff --git a/Classes/Base.lproj/HistoryDetailsView.xib b/Classes/Base.lproj/HistoryDetailsView.xib
index b2843b6cd..6f52984d9 100644
--- a/Classes/Base.lproj/HistoryDetailsView.xib
+++ b/Classes/Base.lproj/HistoryDetailsView.xib
@@ -1,6 +1,7 @@
+
@@ -24,7 +25,7 @@
-
+
diff --git a/Classes/Base.lproj/HistoryListView.xib b/Classes/Base.lproj/HistoryListView.xib
index bca1d7cbd..ed6452d3f 100644
--- a/Classes/Base.lproj/HistoryListView.xib
+++ b/Classes/Base.lproj/HistoryListView.xib
@@ -1,6 +1,7 @@
+
@@ -24,7 +25,7 @@
-
+
diff --git a/Classes/Base.lproj/ImageView.xib b/Classes/Base.lproj/ImageView.xib
index cb87298f3..c37b0d498 100644
--- a/Classes/Base.lproj/ImageView.xib
+++ b/Classes/Base.lproj/ImageView.xib
@@ -1,6 +1,7 @@
+
@@ -20,7 +21,7 @@
-
+
diff --git a/Classes/Base.lproj/PhoneMainView.xib b/Classes/Base.lproj/PhoneMainView.xib
index cbd50da04..946824d75 100644
--- a/Classes/Base.lproj/PhoneMainView.xib
+++ b/Classes/Base.lproj/PhoneMainView.xib
@@ -1,6 +1,7 @@
+
@@ -37,7 +38,7 @@
-
+
diff --git a/Classes/CallIncomingView.m b/Classes/CallIncomingView.m
index 044cabf7a..ef1856444 100644
--- a/Classes/CallIncomingView.m
+++ b/Classes/CallIncomingView.m
@@ -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
diff --git a/Classes/CallOutgoingView.m b/Classes/CallOutgoingView.m
index 2849810e0..6493cd859 100644
--- a/Classes/CallOutgoingView.m
+++ b/Classes/CallOutgoingView.m
@@ -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
diff --git a/Classes/CallView.m b/Classes/CallView.m
index 6922a1937..8079c44c4 100644
--- a/Classes/CallView.m
+++ b/Classes/CallView.m
@@ -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
diff --git a/Classes/ChatConversationView.m b/Classes/ChatConversationView.m
index e88ebab4e..e4a017e8e 100644
--- a/Classes/ChatConversationView.m
+++ b/Classes/ChatConversationView.m
@@ -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
diff --git a/Classes/ChatsListView.m b/Classes/ChatsListView.m
index f0a93feaf..c8d26bc1f 100644
--- a/Classes/ChatsListView.m
+++ b/Classes/ChatsListView.m
@@ -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
diff --git a/Classes/ContactDetailsLabelView.m b/Classes/ContactDetailsLabelView.m
index 1f2d7637a..1e4d03f03 100644
--- a/Classes/ContactDetailsLabelView.m
+++ b/Classes/ContactDetailsLabelView.m
@@ -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
diff --git a/Classes/ContactDetailsView.m b/Classes/ContactDetailsView.m
index 4c7e64896..30ffc7e3b 100644
--- a/Classes/ContactDetailsView.m
+++ b/Classes/ContactDetailsView.m
@@ -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
diff --git a/Classes/ContactsListView.h b/Classes/ContactsListView.h
index 1cee8aa41..3302a7662 100644
--- a/Classes/ContactsListView.h
+++ b/Classes/ContactsListView.h
@@ -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;
diff --git a/Classes/ContactsListView.m b/Classes/ContactsListView.m
index bb52dd9b6..d7ec37a4d 100644
--- a/Classes/ContactsListView.m
+++ b/Classes/ContactsListView.m
@@ -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
diff --git a/Classes/DialerView.m b/Classes/DialerView.m
index 4be1257f0..79d52e7c6 100644
--- a/Classes/DialerView.m
+++ b/Classes/DialerView.m
@@ -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
diff --git a/Classes/HistoryDetailsView.m b/Classes/HistoryDetailsView.m
index 44cb464a0..7521868c8 100644
--- a/Classes/HistoryDetailsView.m
+++ b/Classes/HistoryDetailsView.m
@@ -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
diff --git a/Classes/HistoryListView.m b/Classes/HistoryListView.m
index 8c97217fd..291ddc188 100644
--- a/Classes/HistoryListView.m
+++ b/Classes/HistoryListView.m
@@ -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
diff --git a/Classes/ImagePickerView.m b/Classes/ImagePickerView.m
index 9f3b7aec1..501cba77e 100644
--- a/Classes/ImagePickerView.m
+++ b/Classes/ImagePickerView.m
@@ -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
diff --git a/Classes/ImageView.m b/Classes/ImageView.m
index 3e82e04ee..5a2009713 100644
--- a/Classes/ImageView.m
+++ b/Classes/ImageView.m
@@ -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
diff --git a/Classes/LinphoneUI/Base.lproj/UICompositeView.xib b/Classes/LinphoneUI/Base.lproj/UICompositeView.xib
index 890d013cc..304417215 100644
--- a/Classes/LinphoneUI/Base.lproj/UICompositeView.xib
+++ b/Classes/LinphoneUI/Base.lproj/UICompositeView.xib
@@ -1,6 +1,7 @@
+
@@ -11,7 +12,7 @@
-
+
@@ -30,7 +31,7 @@
-
+
@@ -59,7 +60,7 @@
-
+
diff --git a/Classes/LinphoneUI/UICallCell.m b/Classes/LinphoneUI/UICallCell.m
index 1721f0478..aca14dbd7 100644
--- a/Classes/LinphoneUI/UICallCell.m
+++ b/Classes/LinphoneUI/UICallCell.m
@@ -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
diff --git a/Classes/LinphoneUI/UIChatBubbleTextCell.h b/Classes/LinphoneUI/UIChatBubbleTextCell.h
index d3ca14c16..cf8532c6f 100644
--- a/Classes/LinphoneUI/UIChatBubbleTextCell.h
+++ b/Classes/LinphoneUI/UIChatBubbleTextCell.h
@@ -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;
diff --git a/Classes/LinphoneUI/UIChatBubbleTextCell.m b/Classes/LinphoneUI/UIChatBubbleTextCell.m
index 17c00b952..bc07ade9e 100644
--- a/Classes/LinphoneUI/UIChatBubbleTextCell.m
+++ b/Classes/LinphoneUI/UIChatBubbleTextCell.m
@@ -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;
}
}
diff --git a/Classes/LinphoneUI/UIChatBubbleTextCell.xib b/Classes/LinphoneUI/UIChatBubbleTextCell.xib
index ee8ddbd2c..37fadc4dd 100644
--- a/Classes/LinphoneUI/UIChatBubbleTextCell.xib
+++ b/Classes/LinphoneUI/UIChatBubbleTextCell.xib
@@ -8,7 +8,11 @@
+
+
+
+
@@ -18,15 +22,37 @@
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/Classes/LinphoneUI/UIChatCell.m b/Classes/LinphoneUI/UIChatCell.m
index b3e5e463a..7d66a60cc 100644
--- a/Classes/LinphoneUI/UIChatCell.m
+++ b/Classes/LinphoneUI/UIChatCell.m
@@ -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];
}
}
diff --git a/Classes/LinphoneUI/UICompositeView.h b/Classes/LinphoneUI/UICompositeView.h
index afabf4754..165eb2f0a 100644
--- a/Classes/LinphoneUI/UICompositeView.h
+++ b/Classes/LinphoneUI/UICompositeView.h
@@ -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;
diff --git a/Classes/LinphoneUI/UICompositeView.m b/Classes/LinphoneUI/UICompositeView.m
index 35592d406..ddb7409c6 100644
--- a/Classes/LinphoneUI/UICompositeView.m
+++ b/Classes/LinphoneUI/UICompositeView.m
@@ -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 {
diff --git a/Classes/LinphoneUI/UIHistoryCell.m b/Classes/LinphoneUI/UIHistoryCell.m
index e246c91fd..d570bea0b 100644
--- a/Classes/LinphoneUI/UIHistoryCell.m
+++ b/Classes/LinphoneUI/UIHistoryCell.m
@@ -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];
}
}
diff --git a/Classes/MainStoryboard.storyboard b/Classes/MainStoryboard.storyboard
index c7a497b8c..f55f9ff22 100644
--- a/Classes/MainStoryboard.storyboard
+++ b/Classes/MainStoryboard.storyboard
@@ -31,7 +31,7 @@
-
+
diff --git a/Classes/PhoneMainView.h b/Classes/PhoneMainView.h
index 0a8fc38dd..4a35564af 100644
--- a/Classes/PhoneMainView.h
+++ b/Classes/PhoneMainView.h
@@ -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;
diff --git a/Classes/PhoneMainView.m b/Classes/PhoneMainView.m
index 774a16ea8..04619158a 100644
--- a/Classes/PhoneMainView.m
+++ b/Classes/PhoneMainView.m
@@ -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 {
diff --git a/Classes/SettingsView.m b/Classes/SettingsView.m
index 52fce6cbc..f6d68c02b 100644
--- a/Classes/SettingsView.m
+++ b/Classes/SettingsView.m
@@ -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
diff --git a/README.md b/README.md
index 42d65430a..4e63b151f 100644
--- a/README.md
+++ b/README.md
@@ -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".
diff --git a/main.m b/main.m
index 1be0122db..9280fee88 100644
--- a/main.m
+++ b/main.m
@@ -26,8 +26,8 @@
void uncaughtExceptionHandler(NSException *exception) {
NSLog(@"Crash: %@", exception);
NSLog(@"Stack Trace: %@", [exception callStackSymbols]);
- // Internal error reporting
-}
+ // Internal error reportingstx
+};
#endif