Skip to content

Commit a80566f

Browse files
committed
项目成员 - 成员类型 页面的提示,显示 bug
1 parent 868134e commit a80566f

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

Coding_iOS/Controllers/ValueListViewController.m

+21-9
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ @interface ValueListViewController ()
1616
@property (strong, nonatomic) NSArray *dataList;
1717
@property (assign, nonatomic) NSInteger selectedIndex;
1818
@property (assign, nonatomic) ValueListType type;
19+
@property (strong, nonatomic) UIView *tipView;
1920
@end
2021

2122
@implementation ValueListViewController
@@ -129,28 +130,28 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
129130

130131
#pragma mark - Tip
131132
- (void)showMemberTypeTip{
133+
if (self.tipView) {
134+
[self dismissTipView];
135+
return;
136+
}
137+
132138
NSString *tipStr =
133139

134140
@"项目所有者:拥有对项目的所有权限。\n\
135141
项目管理员:拥有对项目的部分权限。不能删除,转让项目,不能对其他管理员进行操作。\n\
136142
普通成员:可以阅读和推送代码。\n\
137143
受限成员:不能进入与代码相关的页面。\n";
138144

139-
[self showTipStr:tipStr];
145+
self.tipView = [self showTipStr:tipStr];
140146
}
141-
- (void)showTipStr:(NSString *)tipStr{
147+
- (UIView *)showTipStr:(NSString *)tipStr{
142148
if (tipStr.length <= 0) {
143-
return;
149+
return nil;
144150
}
145151
UIView *tipV = [[UIView alloc] initWithFrame:self.view.bounds];
146152
tipV.backgroundColor = [UIColor colorWithWhite:0.2 alpha:0.9];
147153
[tipV bk_whenTapped:^{
148-
[UIView animateWithDuration:0.3 animations:^{
149-
tipV.alpha = 0.0;
150-
} completion:^(BOOL finished) {
151-
[tipV removeFromSuperview];
152-
self.myTableView.scrollEnabled = YES;
153-
}];
154+
[self dismissTipView];
154155
}];
155156
UITextView *textV = [UITextView new];
156157
textV.backgroundColor = [UIColor clearColor];
@@ -181,6 +182,17 @@ - (void)showTipStr:(NSString *)tipStr{
181182
tipV.alpha = 1.0;
182183
self.myTableView.scrollEnabled = NO;
183184
}];
185+
return tipV;
186+
}
187+
188+
- (void)dismissTipView{
189+
[UIView animateWithDuration:0.3 animations:^{
190+
self.tipView.alpha = 0.0;
191+
} completion:^(BOOL finished) {
192+
[self.tipView removeFromSuperview];
193+
self.tipView = nil;
194+
self.myTableView.scrollEnabled = YES;
195+
}];
184196
}
185197

186198
@end

0 commit comments

Comments
 (0)