Skip to content

Commit e48d5aa

Browse files
committed
UI优化
1 parent c8d193d commit e48d5aa

9 files changed

+59
-63
lines changed

Coding_iOS/Coding_iOS-Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
</dict>
3737
</array>
3838
<key>CFBundleVersion</key>
39-
<string>3.3.2015101515430</string>
39+
<string>3.3.20151019190000</string>
4040
<key>LSApplicationQueriesSchemes</key>
4141
<array>
4242
<string>wechat</string>

Coding_iOS/Controllers/ProjectSetting/ProjectAdvancedSettingViewController.m

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -46,25 +46,27 @@ -(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)
4646

4747
-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
4848
{
49-
if (indexPath.section == 1 && indexPath.row == 0) {
50-
cell.separatorInset = UIEdgeInsetsMake(0.f, cell.bounds.size.width, 0.f, 0.f);
51-
return;
52-
}
53-
54-
// Remove seperator inset
55-
if ([cell respondsToSelector:@selector(setSeparatorInset:)]) {
56-
[cell setSeparatorInset:UIEdgeInsetsZero];
57-
}
58-
59-
// Prevent the cell from inheriting the Table View's margin settings
60-
if ([cell respondsToSelector:@selector(setPreservesSuperviewLayoutMargins:)]) {
61-
[cell setPreservesSuperviewLayoutMargins:NO];
62-
}
63-
64-
// Explictly set your cell's layout margins
65-
if ([cell respondsToSelector:@selector(setLayoutMargins:)]) {
66-
[cell setLayoutMargins:UIEdgeInsetsZero];
67-
}
49+
[tableView addLineforPlainCell:cell forRowAtIndexPath:indexPath withLeftSpace:kPaddingLeftWidth];
50+
51+
// if (indexPath.section == 1 && indexPath.row == 0) {
52+
// cell.separatorInset = UIEdgeInsetsMake(0.f, cell.bounds.size.width, 0.f, 0.f);
53+
// return;
54+
// }
55+
//
56+
// // Remove seperator inset
57+
// if ([cell respondsToSelector:@selector(setSeparatorInset:)]) {
58+
// [cell setSeparatorInset:UIEdgeInsetsZero];
59+
// }
60+
//
61+
// // Prevent the cell from inheriting the Table View's margin settings
62+
// if ([cell respondsToSelector:@selector(setPreservesSuperviewLayoutMargins:)]) {
63+
// [cell setPreservesSuperviewLayoutMargins:NO];
64+
// }
65+
//
66+
// // Explictly set your cell's layout margins
67+
// if ([cell respondsToSelector:@selector(setLayoutMargins:)]) {
68+
// [cell setLayoutMargins:UIEdgeInsetsZero];
69+
// }
6870
}
6971

7072
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{

Coding_iOS/Controllers/ProjectSetting/ProjectSetting.storyboard

Lines changed: 22 additions & 22 deletions
Large diffs are not rendered by default.

Coding_iOS/Controllers/ProjectSetting/ProjectSettingViewController.m

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -162,21 +162,7 @@ -(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)
162162

163163
-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
164164
{
165-
if (indexPath.row == 0) {
166-
cell.separatorInset = UIEdgeInsetsMake(0.f, 13, 0.f, 0.f);
167-
}else{
168-
cell.separatorInset = UIEdgeInsetsMake(0.f, cell.bounds.size.width, 0.f, 0.f);
169-
}
170-
171-
// Prevent the cell from inheriting the Table View's margin settings
172-
if ([cell respondsToSelector:@selector(setPreservesSuperviewLayoutMargins:)]) {
173-
[cell setPreservesSuperviewLayoutMargins:NO];
174-
}
175-
176-
// Explictly set your cell's layout margins
177-
if ([cell respondsToSelector:@selector(setLayoutMargins:)]) {
178-
[cell setLayoutMargins:UIEdgeInsetsZero];
179-
}
165+
[tableView addLineforPlainCell:cell forRowAtIndexPath:indexPath withLeftSpace:13];
180166
}
181167

182168
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{

Coding_iOS/Controllers/ProjectSetting/ProjectTransferSettingViewController.m

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ @interface ProjectTransferSettingViewController ()<UITextFieldDelegate>
2828
@implementation ProjectTransferSettingViewController
2929
- (void)viewDidLoad {
3030
[super viewDidLoad];
31-
self.title = @"转让项目";
31+
self.title = @"项目转让";
3232

3333
for (NSLayoutConstraint *cons in self.lines) {
3434
cons.constant = 0.5;
@@ -55,8 +55,10 @@ -(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)
5555
return [UIView new];
5656
}
5757

58-
//-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
59-
//{
58+
-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
59+
{
60+
[tableView addLineforPlainCell:cell forRowAtIndexPath:indexPath withLeftSpace:kPaddingLeftWidth];
61+
6062
// if (indexPath.section == 1 && indexPath.row == 0) {
6163
// cell.separatorInset = UIEdgeInsetsMake(0.f, cell.bounds.size.width, 0.f, 0.f);
6264
// return;
@@ -76,7 +78,7 @@ -(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)
7678
// if ([cell respondsToSelector:@selector(setLayoutMargins:)]) {
7779
// [cell setLayoutMargins:UIEdgeInsetsZero];
7880
// }
79-
//}
81+
}
8082

8183
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
8284
[tableView deselectRowAtIndexPath:indexPath animated:YES];

Coding_iOS/Controllers/TipsViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ - (void)sendRequest{
115115
[weakSelf.myTableView reloadData];
116116
weakSelf.myTableView.showsInfiniteScrolling = weakSelf.myCodingTips.canLoadMore;
117117
}
118-
[weakSelf.view configBlankPage:EaseBlankPageTypeView hasData:(weakSelf.myCodingTips.list.count > 0) hasError:(error != nil) reloadButtonBlock:^(id sender) {
118+
[weakSelf.view configBlankPage:EaseBlankPageTypeViewTips hasData:(weakSelf.myCodingTips.list.count > 0) hasError:(error != nil) reloadButtonBlock:^(id sender) {
119119
[weakSelf refresh];
120120
}];
121121
}];

Coding_iOS/Util/OC_Category/UIView+Common.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ typedef NS_ENUM(NSInteger, EaseBlankPageType)
3131
EaseBlankPageTypeOthersWatchedTopic,
3232
EaseBlankPageTypeOthersJoinedTopic,
3333
EaseBlankPageTypeFileTypeCannotSupport,
34+
EaseBlankPageTypeViewTips,
3435
};
3536

3637
typedef NS_ENUM(NSInteger, BadgePositionType) {

Coding_iOS/Util/OC_Category/UIView+Common.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,11 @@ - (void)configWithType:(EaseBlankPageType)blankPageType hasData:(BOOL)hasData ha
631631
tipStr = @"不支持这种类型的文件\n试试右上角的按钮,用其他应用打开吧";
632632
}
633633
break;
634+
case EaseBlankPageTypeViewTips:{
635+
imageName = @"blankpage_image_Sleep";
636+
tipStr = @"这里没有未读的消息";
637+
}
638+
break;
634639
default://其它页面(这里没有提到的页面,都属于其它)
635640
{
636641
imageName = @"blankpage_image_Sleep";

Coding_iOS/Views/Cell/TweetCell.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
137137
self.locaitonBtn = [UIButton buttonWithType:UIButtonTypeCustom];
138138
self.locaitonBtn.titleLabel.lineBreakMode = NSLineBreakByTruncatingTail;
139139
self.locaitonBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
140-
self.locaitonBtn.frame = CGRectMake(kTweetCell_PadingLeft, 0, 100, 15);
140+
self.locaitonBtn.frame = CGRectMake(kTweetCell_PadingLeft, 0, kScreen_Width - kTweetCell_PadingLeft - kPaddingLeftWidth, 15);
141141
self.locaitonBtn.titleLabel.adjustsFontSizeToFitWidth = NO;
142142
self.locaitonBtn.titleLabel.font = [UIFont boldSystemFontOfSize:12];
143143
[self.locaitonBtn setTitleColor:[UIColor colorWithHexString:@"0x3bbd79"] forState:UIControlStateNormal];

0 commit comments

Comments
 (0)