From 6478bde6f5b09bc9650e056bde3cc8e6a9807683 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Tue, 3 Jul 2012 17:44:43 +0200 Subject: [PATCH] Fix over History/Contacts filter buttons --- Classes/ContactsViewController.m | 17 +++++++ Classes/ContactsViewController.xib | 73 +++--------------------------- Classes/HistoryViewController.m | 12 +++++ Classes/HistoryViewController.xib | 9 ++-- 4 files changed, 41 insertions(+), 70 deletions(-) diff --git a/Classes/ContactsViewController.m b/Classes/ContactsViewController.m index e3f3df8a6..c5fa9e9b7 100644 --- a/Classes/ContactsViewController.m +++ b/Classes/ContactsViewController.m @@ -41,6 +41,15 @@ typedef enum _HistoryView { return [super initWithNibName:@"ContactsViewController" bundle:[NSBundle mainBundle]]; } +- (void)dealloc { + [tableController release]; + [tableView release]; + + [allButton release]; + [linphoneButton release]; + + [super dealloc]; +} #pragma mark - ViewController Functions @@ -53,6 +62,14 @@ typedef enum _HistoryView { - (void)viewDidLoad { [super viewDidLoad]; [self changeView: History_All]; + + // Set selected+over background: IB lack ! + [linphoneButton setImage:[UIImage imageNamed:@"contacts_linphone_selected.png"] + forState:(UIControlStateHighlighted | UIControlStateSelected)]; + + // Set selected+over background: IB lack ! + [allButton setImage:[UIImage imageNamed:@"contacts_all_selected.png"] + forState:(UIControlStateHighlighted | UIControlStateSelected)]; } diff --git a/Classes/ContactsViewController.xib b/Classes/ContactsViewController.xib index 6b6098c90..abc6f1e2e 100644 --- a/Classes/ContactsViewController.xib +++ b/Classes/ContactsViewController.xib @@ -46,7 +46,6 @@ 292 {106, 58} - _NS:9 NO @@ -61,10 +60,11 @@ 3 MC41AA - + NSImage contacts_all_selected.png + NSImage contacts_all_default.png @@ -84,7 +84,6 @@ 292 {{106, 0}, {106, 58}} - _NS:9 NO @@ -96,10 +95,11 @@ 0 NO - + NSImage contacts_linphone_selected.png + NSImage contacts_linphone_default.png @@ -112,7 +112,6 @@ 292 {{212, 0}, {108, 58}} - _NS:9 NO @@ -138,7 +137,6 @@ {320, 58} - _NS:9 @@ -155,7 +153,6 @@ 274 {{0, 58}, {320, 402}} - _NS:10 1 @@ -182,7 +179,6 @@ {320, 460} - _NS:9 @@ -370,7 +366,7 @@ com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin - + com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -383,64 +379,7 @@ 84 - - - - ContactsTableViewController - UITableViewController - - IBProjectSource - ./Classes/ContactsTableViewController.h - - - - ContactsViewController - UIViewController - - id - id - - - - onAllClick: - id - - - onLinphoneClick: - id - - - - UIButton - UIButton - ContactsTableViewController - UITableView - - - - allButton - UIButton - - - linphoneButton - UIButton - - - tableController - ContactsTableViewController - - - tableView - UITableView - - - - IBProjectSource - ./Classes/ContactsViewController.h - - - - + 0 IBCocoaTouchFramework diff --git a/Classes/HistoryViewController.m b/Classes/HistoryViewController.m index 3d49390fa..766282145 100644 --- a/Classes/HistoryViewController.m +++ b/Classes/HistoryViewController.m @@ -42,9 +42,13 @@ typedef enum _HistoryView { } - (void)dealloc { + [tableController release]; + [tableView release]; + [allButton release]; [missedButton release]; [editButton release]; + [super dealloc]; } @@ -69,6 +73,14 @@ typedef enum _HistoryView { // Set selected+over background: IB lack ! [editButton setImage:[UIImage imageNamed:@"history_ok_over.png"] forState:(UIControlStateHighlighted | UIControlStateSelected)]; + + // Set selected+over background: IB lack ! + [allButton setImage:[UIImage imageNamed:@"history_all_selected.png"] + forState:(UIControlStateHighlighted | UIControlStateSelected)]; + + // Set selected+over background: IB lack ! + [missedButton setImage:[UIImage imageNamed:@"history_missed_selected.png"] + forState:(UIControlStateHighlighted | UIControlStateSelected)]; } diff --git a/Classes/HistoryViewController.xib b/Classes/HistoryViewController.xib index 446e0a4ac..76bab3437 100644 --- a/Classes/HistoryViewController.xib +++ b/Classes/HistoryViewController.xib @@ -61,10 +61,11 @@ 3 MC41AA - + NSImage history_all_selected.png + NSImage history_all_default.png @@ -96,10 +97,11 @@ 0 NO - + NSImage history_missed_selected.png + NSImage history_missed_default.png @@ -160,6 +162,7 @@ {{0, 58}, {320, 402}} + _NS:9 1 @@ -390,7 +393,7 @@ com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin - + UIToggleButton com.apple.InterfaceBuilder.IBCocoaTouchPlugin