forked from mirrors/linphone-iphone
Removed IASKPSTitleValueSpecifierViewCell to align each cell of SettingView
This commit is contained in:
parent
6e846f092c
commit
84a817783d
5 changed files with 4 additions and 87 deletions
|
|
@ -27,7 +27,6 @@
|
|||
|
||||
#import "IASKSpecifierValuesViewController.h"
|
||||
#import "IASKPSTextFieldSpecifierViewCell.h"
|
||||
#import "IASKPSTitleValueSpecifierViewCell.h"
|
||||
#import "IASKSpecifier.h"
|
||||
#import "IASKTextField.h"
|
||||
#include "linphone/lpconfig.h"
|
||||
|
|
@ -247,7 +246,7 @@
|
|||
[field setTextColor:LINPHONE_MAIN_COLOR];
|
||||
}
|
||||
|
||||
if ([cell isKindOfClass:[IASKPSTitleValueSpecifierViewCell class]]) {
|
||||
if ([cell isKindOfClass:[UITableViewCell class]]) {
|
||||
cell.detailTextLabel.textColor = [UIColor grayColor];
|
||||
} else {
|
||||
cell.detailTextLabel.textColor = LINPHONE_MAIN_COLOR;
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@
|
|||
#import "IASKSettingsStoreUserDefaults.h"
|
||||
#import "IASKPSSliderSpecifierViewCell.h"
|
||||
#import "IASKPSTextFieldSpecifierViewCell.h"
|
||||
#import "IASKPSTitleValueSpecifierViewCell.h"
|
||||
#import "IASKSwitch.h"
|
||||
#import "IASKSlider.h"
|
||||
#import "IASKSpecifier.h"
|
||||
|
|
@ -491,7 +490,7 @@ CGRect IASKCGRectSwap(CGRect rect);
|
|||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
}
|
||||
else if ([identifier isEqualToString:kIASKPSMultiValueSpecifier] || [identifier isEqualToString:kIASKPSTitleValueSpecifier]) {
|
||||
cell = [[IASKPSTitleValueSpecifierViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:identifier];
|
||||
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:identifier];
|
||||
cell.accessoryType = [identifier isEqualToString:kIASKPSMultiValueSpecifier] ? UITableViewCellAccessoryDisclosureIndicator : UITableViewCellAccessoryNone;
|
||||
}
|
||||
else if ([identifier isEqualToString:kIASKPSTextFieldSpecifier]) {
|
||||
|
|
@ -501,10 +500,10 @@ CGRect IASKCGRectSwap(CGRect rect);
|
|||
else if ([identifier isEqualToString:kIASKPSSliderSpecifier]) {
|
||||
cell = [[IASKPSSliderSpecifierViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:kIASKPSSliderSpecifier];
|
||||
} else if ([identifier isEqualToString:kIASKPSChildPaneSpecifier]) {
|
||||
cell = [[IASKPSTitleValueSpecifierViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:identifier];
|
||||
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:identifier];
|
||||
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
|
||||
} else if ([identifier isEqualToString:kIASKMailComposeSpecifier]) {
|
||||
cell = [[IASKPSTitleValueSpecifierViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:identifier];
|
||||
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:identifier];
|
||||
[cell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator];
|
||||
} else {
|
||||
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
//
|
||||
// IASKPSTitleValueSpecifierViewCell.h
|
||||
// http://www.inappsettingskit.com
|
||||
//
|
||||
// Copyright (c) 2010:
|
||||
// Luc Vandal, Edovia Inc., http://www.edovia.com
|
||||
// Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com
|
||||
// All rights reserved.
|
||||
//
|
||||
// It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz,
|
||||
// as the original authors of this code. You can give credit in a blog post, a tweet or on
|
||||
// a info page of your app. Also, the original authors appreciate letting them know if you use this code.
|
||||
//
|
||||
// This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
|
||||
@interface IASKPSTitleValueSpecifierViewCell : UITableViewCell
|
||||
|
||||
@end
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
//
|
||||
// IASKPSTitleValueSpecifierViewCell.m
|
||||
// http://www.inappsettingskit.com
|
||||
//
|
||||
// Copyright (c) 2010:
|
||||
// Luc Vandal, Edovia Inc., http://www.edovia.com
|
||||
// Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com
|
||||
// All rights reserved.
|
||||
//
|
||||
// It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz,
|
||||
// as the original authors of this code. You can give credit in a blog post, a tweet or on
|
||||
// a info page of your app. Also, the original authors appreciate letting them know if you use this code.
|
||||
//
|
||||
// This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
|
||||
#import "IASKPSTitleValueSpecifierViewCell.h"
|
||||
#import "IASKSettingsReader.h"
|
||||
|
||||
|
||||
@implementation IASKPSTitleValueSpecifierViewCell
|
||||
|
||||
- (void)layoutSubviews {
|
||||
[super layoutSubviews];
|
||||
|
||||
CGSize viewSize = [self.textLabel superview].frame.size;
|
||||
|
||||
// if there's an image, make room for it
|
||||
CGFloat imageOffset = floor(self.imageView.image ? self.imageView.bounds.size.width + self.imageView.frame.origin.x : 0);
|
||||
|
||||
// set the left title label frame
|
||||
CGFloat labelWidth = [self.textLabel sizeThatFits:CGSizeZero].width;
|
||||
CGFloat minValueWidth = (self.detailTextLabel.text.length) ? kIASKMinValueWidth + kIASKSpacing : 0;
|
||||
labelWidth = MIN(labelWidth, viewSize.width - minValueWidth - kIASKPaddingLeft -kIASKPaddingRight - imageOffset);
|
||||
CGRect labelFrame = CGRectMake(kIASKPaddingLeft + imageOffset, 0, labelWidth, viewSize.height);
|
||||
if (!self.detailTextLabel.text.length) {
|
||||
labelFrame = CGRectMake(kIASKPaddingLeft + imageOffset, 0, viewSize.width - kIASKPaddingLeft - kIASKPaddingRight - imageOffset, viewSize.height);
|
||||
}
|
||||
self.textLabel.frame = labelFrame;
|
||||
|
||||
// set the right value label frame
|
||||
if (!self.textLabel.text.length) {
|
||||
viewSize = [self.detailTextLabel superview].frame.size;
|
||||
self.detailTextLabel.frame = CGRectMake(kIASKPaddingLeft + imageOffset, 0, viewSize.width - kIASKPaddingLeft - kIASKPaddingRight - imageOffset, viewSize.height);
|
||||
} else if (self.detailTextLabel.textAlignment == NSTextAlignmentLeft) {
|
||||
CGRect valueFrame = self.detailTextLabel.frame;
|
||||
valueFrame.origin.x = labelFrame.origin.x + MAX(kIASKMinLabelWidth - imageOffset, labelWidth) + kIASKSpacing;
|
||||
valueFrame.size.width = self.detailTextLabel.superview.frame.size.width - valueFrame.origin.x - kIASKPaddingRight;
|
||||
self.detailTextLabel.frame = valueFrame;
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
@ -913,7 +913,6 @@
|
|||
D3807FF615C2894A005BE9BC /* IASKSpecifier.m in Sources */ = {isa = PBXBuildFile; fileRef = D3807FDA15C2894A005BE9BC /* IASKSpecifier.m */; settings = {COMPILER_FLAGS = "-Wno-deprecated-declarations"; }; };
|
||||
D3807FF815C2894A005BE9BC /* IASKPSSliderSpecifierViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D3807FDD15C2894A005BE9BC /* IASKPSSliderSpecifierViewCell.m */; };
|
||||
D3807FFA15C2894A005BE9BC /* IASKPSTextFieldSpecifierViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D3807FDF15C2894A005BE9BC /* IASKPSTextFieldSpecifierViewCell.m */; settings = {COMPILER_FLAGS = "-Wno-deprecated-declarations"; }; };
|
||||
D3807FFC15C2894A005BE9BC /* IASKPSTitleValueSpecifierViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D3807FE115C2894A005BE9BC /* IASKPSTitleValueSpecifierViewCell.m */; };
|
||||
D3807FFE15C2894A005BE9BC /* IASKSlider.m in Sources */ = {isa = PBXBuildFile; fileRef = D3807FE315C2894A005BE9BC /* IASKSlider.m */; };
|
||||
D380800015C2894A005BE9BC /* IASKSwitch.m in Sources */ = {isa = PBXBuildFile; fileRef = D3807FE515C2894A005BE9BC /* IASKSwitch.m */; };
|
||||
D380800215C2894A005BE9BC /* IASKTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = D3807FE715C2894A005BE9BC /* IASKTextField.m */; };
|
||||
|
|
@ -2131,8 +2130,6 @@
|
|||
D3807FDD15C2894A005BE9BC /* IASKPSSliderSpecifierViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKPSSliderSpecifierViewCell.m; sourceTree = "<group>"; };
|
||||
D3807FDE15C2894A005BE9BC /* IASKPSTextFieldSpecifierViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKPSTextFieldSpecifierViewCell.h; sourceTree = "<group>"; };
|
||||
D3807FDF15C2894A005BE9BC /* IASKPSTextFieldSpecifierViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKPSTextFieldSpecifierViewCell.m; sourceTree = "<group>"; };
|
||||
D3807FE015C2894A005BE9BC /* IASKPSTitleValueSpecifierViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKPSTitleValueSpecifierViewCell.h; sourceTree = "<group>"; };
|
||||
D3807FE115C2894A005BE9BC /* IASKPSTitleValueSpecifierViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKPSTitleValueSpecifierViewCell.m; sourceTree = "<group>"; };
|
||||
D3807FE215C2894A005BE9BC /* IASKSlider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKSlider.h; sourceTree = "<group>"; };
|
||||
D3807FE315C2894A005BE9BC /* IASKSlider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKSlider.m; sourceTree = "<group>"; };
|
||||
D3807FE415C2894A005BE9BC /* IASKSwitch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKSwitch.h; sourceTree = "<group>"; };
|
||||
|
|
@ -3750,8 +3747,6 @@
|
|||
D3807FDD15C2894A005BE9BC /* IASKPSSliderSpecifierViewCell.m */,
|
||||
D3807FDE15C2894A005BE9BC /* IASKPSTextFieldSpecifierViewCell.h */,
|
||||
D3807FDF15C2894A005BE9BC /* IASKPSTextFieldSpecifierViewCell.m */,
|
||||
D3807FE015C2894A005BE9BC /* IASKPSTitleValueSpecifierViewCell.h */,
|
||||
D3807FE115C2894A005BE9BC /* IASKPSTitleValueSpecifierViewCell.m */,
|
||||
D3807FE215C2894A005BE9BC /* IASKSlider.h */,
|
||||
D3807FE315C2894A005BE9BC /* IASKSlider.m */,
|
||||
D3807FE415C2894A005BE9BC /* IASKSwitch.h */,
|
||||
|
|
@ -5092,7 +5087,6 @@
|
|||
C63F726A285A24B10066163B /* StyledDatePicker.swift in Sources */,
|
||||
C63F7237285A24B10066163B /* CallStatisticsData.swift in Sources */,
|
||||
D3807FFA15C2894A005BE9BC /* IASKPSTextFieldSpecifierViewCell.m in Sources */,
|
||||
D3807FFC15C2894A005BE9BC /* IASKPSTitleValueSpecifierViewCell.m in Sources */,
|
||||
C63F721B285A24B10066163B /* ConferenceSchedulingSummaryView.swift in Sources */,
|
||||
D3807FFE15C2894A005BE9BC /* IASKSlider.m in Sources */,
|
||||
D380800015C2894A005BE9BC /* IASKSwitch.m in Sources */,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue