Skip to content

Commit 1410024

Browse files
committed
bugfix & ui change
1 parent 2146a70 commit 1410024

File tree

5 files changed

+26
-16
lines changed

5 files changed

+26
-16
lines changed

Coding_iOS/Controllers/MRPRListViewController.m

+12-2
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@ - (void)viewWillAppear:(BOOL)animated{
7575
[self refresh];
7676
}
7777

78+
- (void)viewWillDisappear:(BOOL)animated{
79+
[super viewWillDisappear:animated];
80+
if (_myFliterMenu.isShowing) {
81+
[_myFliterMenu dismissMenu];
82+
}
83+
}
84+
7885
#pragma mark Fliter
7986

8087
- (void)setSelectedIndex:(NSInteger)selectedIndex{
@@ -95,13 +102,13 @@ - (void)setSelectedIndex:(NSInteger)selectedIndex{
95102
}
96103

97104
- (NSArray *)titleList{
98-
NSArray *titleList = (_isMR? @[@"全部 MR",
105+
NSArray *titleList = (_isMR? @[@"全部",
99106
@"可合并",
100107
@"不可自动合并",
101108
@"已拒绝",
102109
@"已合并",
103110
]:
104-
@[@"全部 PR",
111+
@[@"全部",
105112
@"未处理",
106113
@"已处理",
107114
]);
@@ -118,6 +125,9 @@ - (void)setupTitleBtn{
118125
}
119126

120127
NSString *titleStr = [self titleList][_selectedIndex];
128+
if ([titleStr isEqualToString:@"全部"]) {
129+
titleStr = [titleStr stringByAppendingString:_isMR? @" MR": @"PR"];
130+
}
121131
CGFloat titleWidth = [titleStr getWidthWithFont:_titleBtn.titleLabel.font constrainedToSize:CGSizeMake(kScreen_Width, 30)];
122132
CGFloat imageWidth = 12;
123133
CGFloat btnWidth = titleWidth +imageWidth;

Coding_iOS/Views/Cell/CommitListCell.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
3939
[_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
4040
make.left.equalTo(_imgView.mas_right).offset(12);
4141
make.right.equalTo(self.contentView);
42-
make.top.equalTo(self.contentView).offset(15);
42+
make.top.equalTo(self.contentView).offset(10);
4343
make.height.mas_equalTo(30);
4444
}];
4545
}

Coding_iOS/Views/Cell/MRPRListCell.m

+5-5
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
3131
_timeIcon = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"time_clock_icon"]];
3232
_commentIcon = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"topic_comment_icon"]];
3333
_arrowIcon = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mrpr_icon_arrow"]];
34-
_fromL = [UILabel labelWithSystemFontSize:12 textColorHexString:@"0x0x4E90BF"];
35-
[_fromL doBorderWidth:0.5 color:[UIColor colorWithHexString:@"0x4E90BF"] cornerRadius:2.0];
36-
_toL = [UILabel labelWithSystemFontSize:12 textColorHexString:@"0x0x4E90BF"];
37-
[_toL doBorderWidth:0.5 color:[UIColor colorWithHexString:@"0x4E90BF"] cornerRadius:2.0];
34+
_fromL = [UILabel labelWithSystemFontSize:12 textColorHexString:@"0x76808E"];
35+
[_fromL doBorderWidth:0.5 color:[UIColor colorWithHexString:@"0x76808E"] cornerRadius:2.0];
36+
_toL = [UILabel labelWithSystemFontSize:12 textColorHexString:@"0x76808E"];
37+
[_toL doBorderWidth:0.5 color:[UIColor colorWithHexString:@"0x76808E"] cornerRadius:2.0];
3838

3939
for (UIView *tempV in @[_statusIcon, _titleL, _numL, _authorL, _timeL, _commentCountL, _timeIcon, _commentIcon, _arrowIcon, _fromL, _toL]) {
4040
[self.contentView addSubview:tempV];
@@ -50,7 +50,7 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
5050
make.right.equalTo(self.contentView).offset(-kPaddingLeftWidth);
5151
}];
5252
[_fromL mas_makeConstraints:^(MASConstraintMaker *make) {
53-
make.top.equalTo(_titleL.mas_bottom).offset(10);
53+
make.top.equalTo(_titleL.mas_bottom).offset(5);
5454
make.height.mas_equalTo(20);
5555
make.left.equalTo(_titleL);
5656
}];

Coding_iOS/Views/Cell/MRPRTopCell.m

+4-4
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
6363

6464
if (!_fromL) {
6565
_fromL = [UILabel new];
66-
[_fromL doBorderWidth:0.5 color:[UIColor colorWithHexString:@"0x4E90BF"] cornerRadius:2.0];
66+
[_fromL doBorderWidth:0.5 color:[UIColor colorWithHexString:@"0x76808E"] cornerRadius:2.0];
6767
_fromL.font = kMRPRTopCell_FontFromTo;
68-
_fromL.textColor = [UIColor colorWithHexString:@"0x4E90BF"];
68+
_fromL.textColor = [UIColor colorWithHexString:@"0x76808E"];
6969
[self.contentView addSubview:_fromL];
7070
}
7171
if (!_arrowIcon) {
@@ -75,9 +75,9 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
7575
}
7676
if (!_toL) {
7777
_toL = [UILabel new];
78-
[_toL doBorderWidth:0.5 color:[UIColor colorWithHexString:@"0x4E90BF"] cornerRadius:2.0];
78+
[_toL doBorderWidth:0.5 color:[UIColor colorWithHexString:@"0x76808E"] cornerRadius:2.0];
7979
_toL.font = kMRPRTopCell_FontFromTo;
80-
_toL.textColor = [UIColor colorWithHexString:@"0x4E90BF"];
80+
_toL.textColor = [UIColor colorWithHexString:@"0x76808E"];
8181
[self.contentView addSubview:_toL];
8282
}
8383

Coding_iOS/Views/Cell/PRMRSearchCell.m

+4-4
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
111111

112112
if (!_fromL) {
113113
_fromL = [UILabel new];
114-
[_fromL doBorderWidth:0.5 color:[UIColor colorWithHexString:@"0x4E90BF"] cornerRadius:2.0];
114+
[_fromL doBorderWidth:0.5 color:[UIColor colorWithHexString:@"0x76808E"] cornerRadius:2.0];
115115
_fromL.font = [UIFont systemFontOfSize:12];
116-
_fromL.textColor = [UIColor colorWithHexString:@"0x4E90BF"];
116+
_fromL.textColor = [UIColor colorWithHexString:@"0x76808E"];
117117
[self.contentView addSubview:_fromL];
118118
}
119119

@@ -125,9 +125,9 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
125125

126126
if (!_toL) {
127127
_toL = [UILabel new];
128-
[_toL doBorderWidth:0.5 color:[UIColor colorWithHexString:@"0x4E90BF"] cornerRadius:2.0];
128+
[_toL doBorderWidth:0.5 color:[UIColor colorWithHexString:@"0x76808E"] cornerRadius:2.0];
129129
_toL.font = [UIFont systemFontOfSize:12];
130-
_toL.textColor = [UIColor colorWithHexString:@"0x4E90BF"];
130+
_toL.textColor = [UIColor colorWithHexString:@"0x76808E"];
131131
[self.contentView addSubview:_toL];
132132
}
133133

0 commit comments

Comments
 (0)