checkbox tv

This commit is contained in:
Gautier Pelloux-Prayer 2015-09-29 16:59:10 +02:00
parent 79abe1184b
commit 08f819e332
25 changed files with 141 additions and 209 deletions

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="HistoryListView">
@ -92,7 +92,7 @@
</button>
</subviews>
</view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="17" userLabel="tableView">
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" allowsSelectionDuringEditing="YES" allowsMultipleSelectionDuringEditing="YES" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="17" userLabel="tableView">
<rect key="frame" x="0.0" y="40" width="375" height="519"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
@ -129,4 +129,9 @@
<image name="history_missed_default.png" width="32" height="32"/>
<image name="history_missed_selected.png" width="32" height="32"/>
</resources>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination" type="retina4"/>
</simulatedMetricsContainer>
</document>

View file

@ -121,11 +121,6 @@ static void chatTable_free_chatrooms(void *data) {
UIChatCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellId];
if (cell == nil) {
cell = [[UIChatCell alloc] initWithIdentifier:kCellId];
// Background View
UACellBackgroundView *selectedBackgroundView = [[UACellBackgroundView alloc] initWithFrame:CGRectZero];
cell.selectedBackgroundView = selectedBackgroundView;
[selectedBackgroundView setBackgroundColor:LINPHONE_TABLE_CELL_BACKGROUND_COLOR];
}
[cell setChatRoom:(LinphoneChatRoom *)ms_list_nth_data(data, (int)[indexPath row])];

View file

@ -88,11 +88,6 @@ static UICompositeViewDescription *compositeDescription = nil;
UITableViewCell *cell = [atableView dequeueReusableCellWithIdentifier:kCellId];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kCellId];
// Background View
UACellBackgroundView *selectedBackgroundView = [[UACellBackgroundView alloc] initWithFrame:CGRectZero];
cell.selectedBackgroundView = selectedBackgroundView;
[selectedBackgroundView setBackgroundColor:LINPHONE_TABLE_CELL_BACKGROUND_COLOR];
}
NSString *key = [[dataList allKeys] objectAtIndex:[indexPath row]];
[cell.textLabel setText:[dataList objectForKey:key]];

View file

@ -491,11 +491,6 @@ static const ContactSections_e contactSections[ContactSections_MAX] = {ContactSe
[cell.detailTextField setAutocapitalizationType:UITextAutocapitalizationTypeNone];
[cell.detailTextField setAutocorrectionType:UITextAutocorrectionTypeNo];
[cell setBackgroundColor:[UIColor whiteColor]];
// Background View
UACellBackgroundView *selectedBackgroundView = [[UACellBackgroundView alloc] initWithFrame:CGRectZero];
cell.selectedBackgroundView = selectedBackgroundView;
[selectedBackgroundView setBackgroundColor:LINPHONE_TABLE_CELL_BACKGROUND_COLOR];
}
NSMutableArray *sectionDict = [self getSectionData:[indexPath section]];

View file

@ -188,11 +188,6 @@ static void sync_address_book(ABAddressBookRef addressBook, CFDictionaryRef info
UIContactCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellId];
if (cell == nil) {
cell = [[UIContactCell alloc] initWithIdentifier:kCellId];
// Background View
UACellBackgroundView *selectedBackgroundView = [[UACellBackgroundView alloc] initWithFrame:CGRectZero];
cell.selectedBackgroundView = selectedBackgroundView;
[selectedBackgroundView setBackgroundColor:LINPHONE_TABLE_CELL_BACKGROUND_COLOR];
}
OrderedDictionary *subDic = [addressBookMap objectForKey:[addressBookMap keyAtIndex:[indexPath section]]];

View file

@ -19,7 +19,9 @@
#import <UIKit/UIKit.h>
@interface HistoryListTableView : UITableViewController {
#import "UICheckBoxTVTableViewController.h"
@interface HistoryListTableView : UICheckBoxTVTableViewController {
@private
NSMutableArray *callLogs;
}

View file

@ -24,16 +24,13 @@
#import "UACellBackgroundView.h"
#import "Utils.h"
@implementation HistoryListTableView {
NSMutableArray *selectedItems;
}
@implementation HistoryListTableView
@synthesize missedFilter;
#pragma mark - Lifecycle Functions
- (void)initHistoryTableViewController {
selectedItems = [[NSMutableArray alloc] init];
callLogs = [[NSMutableArray alloc] init];
missedFilter = false;
}
@ -111,7 +108,7 @@
}
logs = ms_list_next(logs);
}
[[self tableView] reloadData];
[super loadData];
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
@ -127,33 +124,21 @@
UIHistoryCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellId];
if (cell == nil) {
cell = [[UIHistoryCell alloc] initWithIdentifier:kCellId];
// Background View
UACellBackgroundView *selectedBackgroundView = [[UACellBackgroundView alloc] initWithFrame:CGRectZero];
cell.selectedBackgroundView = selectedBackgroundView;
[selectedBackgroundView setBackgroundColor:LINPHONE_TABLE_CELL_BACKGROUND_COLOR];
}
LinphoneCallLog *log = [[callLogs objectAtIndex:[indexPath row]] pointerValue];
id logId = [callLogs objectAtIndex:indexPath.row];
LinphoneCallLog *log = [logId pointerValue];
[cell setCallLog:log];
[super accessoryForCell:cell atPath:indexPath];
return cell;
}
#pragma mark - UITableViewDelegate Functions
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
LinphoneCallLog *callLog = [[callLogs objectAtIndex:[indexPath row]] pointerValue];
[super tableView:tableView didSelectRowAtIndexPath:indexPath];
if ([self isEditing]) {
UIHistoryCell *cell = (UIHistoryCell *)[self tableView:tableView cellForRowAtIndexPath:indexPath];
if ([selectedItems containsObject:indexPath]) {
[selectedItems removeObject:indexPath];
cell.checkBoxButton.selected = YES;
} else {
[selectedItems addObject:indexPath];
cell.checkBoxButton.selected = NO;
}
} else {
LinphoneCallLog *callLog = [[callLogs objectAtIndex:[indexPath row]] pointerValue];
if (callLog != NULL && linphone_call_log_get_call_id(callLog) != NULL) {
LinphoneAddress *addr = linphone_call_log_get_remote_address(callLog);
char *uri = linphone_address_as_string(addr);

View file

@ -89,6 +89,10 @@ static UICompositeViewDescription *compositeDescription = nil;
- (void)hideEditIfNeeded {
editButton.hidden = ([tableController tableView:tableController.tableView numberOfRowsInSection:0] == 0);
if ([editButton isSelected]) {
[editButton toggle];
[self onEditClick:nil];
}
}
- (void)changeView:(HistoryView)view {
@ -124,13 +128,11 @@ static UICompositeViewDescription *compositeDescription = nil;
}
- (IBAction)onDeleteClick:(id)event {
linphone_core_clear_call_logs([LinphoneManager getLc]);
for (id log in tableController.selectedItems) {
linphone_core_remove_call_log([LinphoneManager getLc], (LinphoneCallLog *)[log pointerValue]);
}
[tableController loadData];
[self hideEditIfNeeded];
if ([editButton isSelected]) {
[editButton toggle];
[self onEditClick:nil];
}
}
@end

View file

@ -1,14 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="UIHistoryCell">
<connections>
<outlet property="avatarImage" destination="J9B-Wl-Qgm" id="Jbc-9j-K4Q"/>
<outlet property="checkBoxButton" destination="zkS-Dk-ziV" id="dcB-Ow-bAd"/>
<outlet property="detailsButton" destination="Lfl-dI-bSt" id="afT-Qn-6iL"/>
<outlet property="displayNameLabel" destination="zG2-Kg-0jD" id="ykw-Vp-7VP"/>
<outlet property="stateImage" destination="Jpe-IK-xK1" id="mJo-7r-5jQ"/>
@ -50,13 +49,7 @@
</attributedString>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="zkS-Dk-ziV" userLabel="checkboxButton">
<rect key="frame" x="343" y="6" width="32" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<state key="normal" title="Button" image="checkbox_unchecked.png"/>
<state key="selected" image="checkbox_checked.png"/>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="Lfl-dI-bSt" userLabel="detailsButton">
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="Lfl-dI-bSt" userLabel="detailsButton" customClass="UIIconButton">
<rect key="frame" x="343" y="6" width="32" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<state key="normal" title="Button" image="list_details_default.png">
@ -75,9 +68,12 @@
</objects>
<resources>
<image name="avatar.png" width="255" height="255"/>
<image name="checkbox_checked.png" width="17" height="17"/>
<image name="checkbox_unchecked.png" width="17" height="17"/>
<image name="history_missed_default.png" width="32" height="32"/>
<image name="list_details_default.png" width="33" height="34"/>
</resources>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination" type="retina4"/>
</simulatedMetricsContainer>
</document>

View file

@ -6,12 +6,10 @@
//
//
#import "UICheckBoxTVCell.h"
#import "UIRoundedImageView.h"
#import "LinphoneManager.h"
@interface UICallPausedCell : UICheckBoxTVCell
@interface UICallPausedCell : UITableViewCell
@property(weak, nonatomic) IBOutlet UIRoundedImageView *avatarImage;
@property(weak, nonatomic) IBOutlet UILabel *nameLabel;

View file

@ -20,12 +20,11 @@
#import <UIKit/UIKit.h>
#import "UILoadingImageView.h"
#import "UICheckBoxTVCell.h"
#import "UITextViewNoDefine.h"
#import "FileTransferDelegate.h"
#import "ChatConversationTableView.h"
@interface UIChatBubblePhotoCell : UICheckBoxTVCell
@interface UIChatBubblePhotoCell : UITableViewCell
//@property(nonatomic, strong) IBOutlet UIView *innerView;
//@property(nonatomic, strong) IBOutlet UIView *bubbleView;

View file

@ -19,12 +19,11 @@
#import <UIKit/UIKit.h>
#import "UICheckBoxTVCell.h"
#import "UITextViewNoDefine.h"
#import "ChatConversationTableView.h"
#import "UIRoundedImageView.h"
@interface UIChatBubbleTextCell : UICheckBoxTVCell
@interface UIChatBubbleTextCell : UITableViewCell
@property(nonatomic, weak) IBOutlet UIImageView *backgroundColor;
@property(nonatomic, weak) IBOutlet UIRoundedImageView *avatarImage;

View file

@ -19,13 +19,12 @@
#import <UIKit/UIKit.h>
#import "UICheckBoxTVCell.h"
#import "UIRoundedImageView.h"
#import "UIIconButton.h"
#include "linphone/linphonecore.h"
@interface UIChatCell : UICheckBoxTVCell {
@interface UIChatCell : UITableViewCell {
LinphoneChatRoom *chatRoom;
}

View file

@ -1,25 +0,0 @@
/* UITransparentTVCell.h
*
* Copyright (C) 2012 Belledonne Comunications, Grenoble, France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#import <UIKit/UIKit.h>
@interface UICheckBoxTVCell : UITableViewCell
@property(weak, nonatomic) IBOutlet UIImageView *checkboxImage;
@end

View file

@ -1,39 +0,0 @@
/* UITransparentTVCell.m
*
* Copyright (C) 2012 Belledonne Comunications, Grenoble, France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#import "UICheckBoxTVCell.h"
@implementation UICheckBoxTVCell
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
// NSArray *arrayOfViews =
// [[NSBundle mainBundle] loadNibNamed:NSStringFromClass(self.class) owner:self options:nil];
// [self.contentView addSubview:[arrayOfViews objectAtIndex:0]];
}
return self;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
}
@end

View file

@ -1,32 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="UICheckBoxTVCell">
<connections>
<outlet property="checkboxImage" destination="3x9-iI-sTW" id="Z4c-Me-pzr"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="340" height="44"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="checkbox_checked.png" id="3x9-iI-sTW" userLabel="checkboxImage">
<rect key="frame" x="298" y="5" width="34" height="34"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="285" y="292"/>
</view>
</objects>
<resources>
<image name="checkbox_checked.png" width="34" height="34"/>
</resources>
</document>

View file

@ -0,0 +1,18 @@
//
// UICheckBoxTVTableViewController.h
// linphone
//
// Created by Gautier Pelloux-Prayer on 29/09/15.
//
//
#import <UIKit/UIKit.h>
@interface UICheckBoxTVTableViewController : UITableViewController
@property(nonatomic, readonly) NSMutableArray *selectedItems;
- (void)loadData;
- (void)accessoryForCell:(UITableViewCell *)cell atPath:(NSIndexPath *)indexPath;
@end

View file

@ -0,0 +1,72 @@
/* HistoryTableViewController.m
*
* Copyright (C) 2009 Belledonne Comunications, Grenoble, France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#import "UICheckBoxTVTableViewController.h"
@implementation UICheckBoxTVTableViewController
- (instancetype)init {
self = [super init];
_selectedItems = [[NSMutableArray alloc] init];
return self;
}
#pragma mark - UITableViewDelegate Functions
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
[tableView deselectRowAtIndexPath:[tableView indexPathForSelectedRow] animated:NO];
cell.accessoryType = (cell.accessoryType == UITableViewCellAccessoryCheckmark) ? UITableViewCellAccessoryNone
: UITableViewCellAccessoryCheckmark;
[self accessoryForCell:cell atPath:indexPath];
}
- (void)accessoryForCell:(UITableViewCell *)cell atPath:(NSIndexPath *)indexPath {
if ([self isEditing]) {
UIImage *image = nil;
if (cell.accessoryType == UITableViewCellAccessoryCheckmark) {
[_selectedItems addObject:indexPath];
image = [UIImage imageNamed:@"checkbox_checked.png"];
} else if (cell.accessoryType == UITableViewCellAccessoryNone) {
[_selectedItems removeObject:indexPath];
image = [UIImage imageNamed:@"checkbox_unchecked.png"];
}
UIButton *checkBoxButton = [UIButton buttonWithType:UIButtonTypeCustom];
[checkBoxButton setImage:image forState:UIControlStateNormal];
[checkBoxButton setFrame:CGRectMake(0, 0, 19, 19)];
[checkBoxButton setBackgroundColor:[UIColor clearColor]];
cell.accessoryView = checkBoxButton;
} else {
cell.accessoryView = nil;
cell.accessoryType = UITableViewCellAccessoryNone;
}
}
- (void)setEditing:(BOOL)editing animated:(BOOL)animated {
[super setEditing:editing animated:animated];
[self loadData];
}
- (void)loadData {
[_selectedItems removeAllObjects];
[self.tableView reloadData];
}
@end

View file

@ -19,10 +19,8 @@
#import <UIKit/UIKit.h>
#import <AddressBook/AddressBook.h>
#import "UICheckBoxTVCell.h"
@interface UIContactCell : UICheckBoxTVCell {
}
@interface UIContactCell : UITableViewCell
@property(nonatomic, strong) IBOutlet UILabel *nameLabel;
@property (nonatomic, strong) IBOutlet UIImageView *avatarImage;

View file

@ -18,10 +18,8 @@
*/
#import <UIKit/UIKit.h>
#import "UICheckBoxTVCell.h"
@interface UIEditableTableViewCell : UICheckBoxTVCell {
}
@interface UIEditableTableViewCell : UITableViewCell
@property (nonatomic, strong) IBOutlet UIView *verticalSep;
@property (nonatomic, strong) IBOutlet UITextField *detailTextField;

View file

@ -19,21 +19,19 @@
#import <UIKit/UIKit.h>
#import "UICheckBoxTVCell.h"
#import "UIRoundedImageView.h"
#import "UIIconButton.h"
#include "linphone/linphonecore.h"
@interface UIHistoryCell : UICheckBoxTVCell {
}
@interface UIHistoryCell : UITableViewCell
@property (nonatomic, assign) LinphoneCallLog *callLog;
@property(weak, nonatomic) IBOutlet UIRoundedImageView *avatarImage;
@property(nonatomic, strong) IBOutlet UILabel *displayNameLabel;
@property(weak, nonatomic) IBOutlet UIImageView *stateImage;
@property(weak, nonatomic) IBOutlet UIButton *detailsButton;
@property(weak, nonatomic) IBOutlet UIButton *checkBoxButton;
@property(weak, nonatomic) IBOutlet UIIconButton *detailsButton;
- (id)initWithIdentifier:(NSString*)identifier;

View file

@ -39,6 +39,7 @@
UIView *sub = ((UIView *)[arrayOfViews objectAtIndex:0]);
[self setFrame:CGRectMake(0, 0, sub.frame.size.width, sub.frame.size.height)];
[self addSubview:sub];
self.selectionStyle = UITableViewCellSelectionStyleNone;
callLog = NULL;
}
return self;
@ -109,10 +110,8 @@
[UIView setAnimationDuration:0.3];
}
if (editing) {
[_checkBoxButton setAlpha:1.0f];
[_detailsButton setAlpha:0.0f];
} else {
[_checkBoxButton setAlpha:0.0f];
[_detailsButton setAlpha:1.0f];
}
if (animated) {

View file

@ -106,11 +106,6 @@
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [super tableView:tableView cellForRowAtIndexPath:indexPath];
// Background View
UACellBackgroundView *selectedBackgroundView = [[UACellBackgroundView alloc] initWithFrame:CGRectZero];
cell.selectedBackgroundView = selectedBackgroundView;
[selectedBackgroundView setBackgroundColor:LINPHONE_TABLE_CELL_BACKGROUND_COLOR];
return cell;
}
@ -257,11 +252,6 @@
} else {
cell.detailTextLabel.textColor = LINPHONE_MAIN_COLOR;
}
// Background View
UACellBackgroundView *selectedBackgroundView = [[UACellBackgroundView alloc] initWithFrame:CGRectZero];
cell.selectedBackgroundView = selectedBackgroundView;
[selectedBackgroundView setBackgroundColor:LINPHONE_TABLE_CELL_BACKGROUND_COLOR];
return cell;
}

View file

@ -75,13 +75,7 @@ void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
#import <UIKit/UIKit.h>
#define LINPHONE_MAIN_COLOR [UIColor colorWithRed:207.0f / 255.0f green:76.0f / 255.0f blue:41.0f / 255.0f alpha:1.0f]
#define LINPHONE_SETTINGS_BG_IOS7 \
[UIColor colorWithRed:164 / 255. \
green:175 / 255. \
blue:183 / 255. \
alpha:1.0] //[UIColor colorWithWhite:0.88 alpha:1.0]
#define LINPHONE_TABLE_CELL_BACKGROUND_COLOR \
[UIColor colorWithRed:207.0f / 255.0f green:76.0f / 255.0f blue:41.0f / 255.0f alpha:1.0f]
#define LINPHONE_SETTINGS_BG_IOS7 [UIColor colorWithRed:164 / 255. green:175 / 255. blue:183 / 255. alpha:1.0]
@interface UIColor (LightAndDark)

View file

@ -89,6 +89,7 @@
6334DDFB1BBAC99400631900 /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D32B6E2E15A5C0AC0033019F /* libsqlite3.dylib */; };
6334DDFC1BBAC99B00631900 /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 152F22351B15E889008C0621 /* libxml2.dylib */; };
6334DDFD1BBAC9A200631900 /* libiconv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F0B026F21AA710AF00FF49F7 /* libiconv.dylib */; };
6334DE001BBAD5AA00631900 /* UICheckBoxTVTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6334DDFF1BBAD5AA00631900 /* UICheckBoxTVTableViewController.m */; };
633756391B67BAF400E21BAD /* SideMenuTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 633756381B67BAF400E21BAD /* SideMenuTableView.m */; };
633756451B67D2B200E21BAD /* SideMenuView.m in Sources */ = {isa = PBXBuildFile; fileRef = 633756431B67D2B100E21BAD /* SideMenuView.m */; };
633756461B67D2B200E21BAD /* SideMenuView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 633756441B67D2B100E21BAD /* SideMenuView.xib */; };
@ -105,7 +106,6 @@
63701DD61BA31DA1006A9AE3 /* UIConfirmationDialog.xib in Resources */ = {isa = PBXBuildFile; fileRef = 63701DD51BA31DA1006A9AE3 /* UIConfirmationDialog.xib */; };
63701DDF1BA32039006A9AE3 /* UIConfirmationDialog.m in Sources */ = {isa = PBXBuildFile; fileRef = 63701DDE1BA32039006A9AE3 /* UIConfirmationDialog.m */; };
637157A11B283FE200C91677 /* FileTransferDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 637157A01B283FE200C91677 /* FileTransferDelegate.m */; };
637527121BBA8C3800FDEA6F /* UICheckBoxTVCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 637527111BBA8C3800FDEA6F /* UICheckBoxTVCell.xib */; };
637527C91BBA8EF700FDEA6F /* add_field_default.png in Resources */ = {isa = PBXBuildFile; fileRef = 6375271A1BBA8EF700FDEA6F /* add_field_default.png */; };
637527CA1BBA8EF700FDEA6F /* add_field_over.png in Resources */ = {isa = PBXBuildFile; fileRef = 6375271B1BBA8EF700FDEA6F /* add_field_over.png */; };
637527CB1BBA8EF700FDEA6F /* avatar.png in Resources */ = {isa = PBXBuildFile; fileRef = 6375271C1BBA8EF700FDEA6F /* avatar.png */; };
@ -439,7 +439,6 @@
F05BAA621A5D594E00411815 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F05BAA611A5D594E00411815 /* libz.dylib */; };
F05BAA631A5D75BC00411815 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F05BAA611A5D594E00411815 /* libz.dylib */; };
F0642EF119DAC891009DB336 /* MainStoryboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F0642EF019DAC891009DB336 /* MainStoryboard.storyboard */; };
F066515517F9A02E0064280C /* UICheckBoxTVCell.m in Sources */ = {isa = PBXBuildFile; fileRef = F066515417F9A02E0064280C /* UICheckBoxTVCell.m */; };
F088488A19FF8C41007FFCF3 /* UIContactCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F088488D19FF8C41007FFCF3 /* UIContactCell.xib */; };
F08D468D1AA86849001E8CB5 /* libiconv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F0B026F21AA710AF00FF49F7 /* libiconv.dylib */; };
F08F118619C09C6B007D70C2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
@ -697,6 +696,8 @@
6313482F1B6F7B6600C6BDCB /* UIRoundBorderedButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIRoundBorderedButton.m; sourceTree = "<group>"; };
631348311B6FA53300C6BDCB /* rootca.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = rootca.pem; path = "liblinphone-sdk/apple-darwin/share/linphone/rootca.pem"; sourceTree = SOURCE_ROOT; };
63158FAC1B468E0E00969917 /* ImageOptim.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = ImageOptim.sh; path = Tools/ImageOptim.sh; sourceTree = "<group>"; };
6334DDFE1BBAD5AA00631900 /* UICheckBoxTVTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UICheckBoxTVTableViewController.h; sourceTree = "<group>"; };
6334DDFF1BBAD5AA00631900 /* UICheckBoxTVTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UICheckBoxTVTableViewController.m; sourceTree = "<group>"; };
633756371B67BAF400E21BAD /* SideMenuTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SideMenuTableView.h; sourceTree = "<group>"; };
633756381B67BAF400E21BAD /* SideMenuTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SideMenuTableView.m; sourceTree = "<group>"; };
633756421B67D2B100E21BAD /* SideMenuView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SideMenuView.h; sourceTree = "<group>"; };
@ -725,7 +726,6 @@
63701DDE1BA32039006A9AE3 /* UIConfirmationDialog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIConfirmationDialog.m; sourceTree = "<group>"; };
6371579F1B283FE200C91677 /* FileTransferDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileTransferDelegate.h; path = Utils/FileTransferDelegate.h; sourceTree = "<group>"; };
637157A01B283FE200C91677 /* FileTransferDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FileTransferDelegate.m; path = Utils/FileTransferDelegate.m; sourceTree = "<group>"; };
637527111BBA8C3800FDEA6F /* UICheckBoxTVCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = UICheckBoxTVCell.xib; sourceTree = "<group>"; };
6375271A1BBA8EF700FDEA6F /* add_field_default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = add_field_default.png; sourceTree = "<group>"; };
6375271B1BBA8EF700FDEA6F /* add_field_over.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = add_field_over.png; sourceTree = "<group>"; };
6375271C1BBA8EF700FDEA6F /* avatar.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = avatar.png; sourceTree = "<group>"; };
@ -1100,8 +1100,6 @@
F05BAA611A5D594E00411815 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
F0642EF019DAC891009DB336 /* MainStoryboard.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = MainStoryboard.storyboard; sourceTree = "<group>"; };
F0642EF719DAF32E009DB336 /* DTWeakSupport.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DTWeakSupport.h; sourceTree = "<group>"; };
F066515317F9A02E0064280C /* UICheckBoxTVCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UICheckBoxTVCell.h; sourceTree = "<group>"; };
F066515417F9A02E0064280C /* UICheckBoxTVCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UICheckBoxTVCell.m; sourceTree = "<group>"; };
F088488C19FF8C41007FFCF3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/UIContactCell.xib; sourceTree = "<group>"; };
F088488F19FF8C44007FFCF3 /* fr */ = {isa = PBXFileReference; fileEncoding = 2483028224; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/UIContactCell.strings; sourceTree = "<group>"; };
F08F118419C09C6A007D70C2 /* liblinphoneTesterTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = liblinphoneTesterTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
@ -1337,10 +1335,10 @@
22E0A81D111C44E100B04932 /* AboutView.h */,
22E0A81C111C44E100B04932 /* AboutView.m */,
636316D31A1DEBCB0009B839 /* AboutView.xib */,
D3D5126A160B3A8E00946DF8 /* AssistantSubviews.xib */,
D350F20B15A43BB100149E54 /* AssistantView.h */,
D350F20C15A43BB100149E54 /* AssistantView.m */,
D38187E015FE348A00C3EDCA /* AssistantView.xib */,
D3D5126A160B3A8E00946DF8 /* AssistantSubviews.xib */,
D3F26BEE15986B71005F9CAB /* CallIncomingView.h */,
D3F26BEF15986B71005F9CAB /* CallIncomingView.m */,
D38187DC15FE347700C3EDCA /* CallIncomingView.xib */,
@ -1461,9 +1459,6 @@
D3EA540F159853750037DC6B /* UIChatCell.h */,
D3EA5410159853750037DC6B /* UIChatCell.m */,
639CEB0B1A1DF4FA004DE38F /* UIChatCell.xib */,
F066515317F9A02E0064280C /* UICheckBoxTVCell.h */,
F066515417F9A02E0064280C /* UICheckBoxTVCell.m */,
637527111BBA8C3800FDEA6F /* UICheckBoxTVCell.xib */,
D31B4B1E159876C0002E6C72 /* UICompositeView.h */,
D31B4B1F159876C0002E6C72 /* UICompositeView.m */,
639CEB051A1DF4EB004DE38F /* UICompositeView.xib */,
@ -1511,6 +1506,8 @@
D3196D3D15A32BD8007FEEBA /* UITransferButton.m */,
340751E5150F38FC00B89C47 /* UIVideoButton.h */,
340751E6150F38FD00B89C47 /* UIVideoButton.m */,
6334DDFE1BBAD5AA00631900 /* UICheckBoxTVTableViewController.h */,
6334DDFF1BBAD5AA00631900 /* UICheckBoxTVTableViewController.m */,
);
path = LinphoneUI;
sourceTree = "<group>";
@ -2478,7 +2475,6 @@
637528171BBA8EF700FDEA6F /* footer_contacts.png in Resources */,
637528051BBA8EF700FDEA6F /* color_L.png in Resources */,
63AADBEA1B6A0FF200AA16FD /* Images.xcassets in Resources */,
637527121BBA8C3800FDEA6F /* UICheckBoxTVCell.xib in Resources */,
637528461BBA8EF700FDEA6F /* options_selected.png in Resources */,
637527F31BBA8EF700FDEA6F /* chat_start_body_default.png in Resources */,
63701DD61BA31DA1006A9AE3 /* UIConfirmationDialog.xib in Resources */,
@ -2684,7 +2680,6 @@
C90FAA7915AF54E6002091CB /* HistoryDetailsView.m in Sources */,
63FB30351A680E73008CA393 /* UIRoundedImageView.m in Sources */,
635775251B6673EC00C8B704 /* HistoryDetailsTableView.m in Sources */,
F066515517F9A02E0064280C /* UICheckBoxTVCell.m in Sources */,
D3F9A9EE15AF277E0045320F /* UACellBackgroundView.m in Sources */,
6346100F1B61409800548952 /* CallOutgoingView.m in Sources */,
D35860D615B549B500513429 /* Utils.m in Sources */,
@ -2695,6 +2690,7 @@
D3807FC515C28940005BE9BC /* DCRoundSwitchToggleLayer.m in Sources */,
D3807FE815C2894A005BE9BC /* IASKAppSettingsViewController.m in Sources */,
D3807FEA15C2894A005BE9BC /* IASKAppSettingsWebViewController.m in Sources */,
6334DE001BBAD5AA00631900 /* UICheckBoxTVTableViewController.m in Sources */,
D3807FEC15C2894A005BE9BC /* IASKSpecifierValuesViewController.m in Sources */,
D3807FEE15C2894A005BE9BC /* IASKSettingsReader.m in Sources */,
D3807FF015C2894A005BE9BC /* IASKSettingsStore.m in Sources */,