Commit 9db30de9 cgx

修复UI细节

1 个父辈 d5678b46
......@@ -1524,12 +1524,12 @@
D078280628FE5B3800C8D612 /* View */ = {
isa = PBXGroup;
children = (
D0B836F928F1655E006E76C0 /* DynamicCommentCell.h */,
D0B836FA28F1655E006E76C0 /* DynamicCommentCell.m */,
D0078C5C28E13DC400054804 /* DynamicDetailView.h */,
D0078C5D28E13DC400054804 /* DynamicDetailView.m */,
D0078C6028E1425500054804 /* InteractView.h */,
D0078C6128E1425500054804 /* InteractView.m */,
D0078C5C28E13DC400054804 /* DynamicDetailView.h */,
D0078C5D28E13DC400054804 /* DynamicDetailView.m */,
D0B836F928F1655E006E76C0 /* DynamicCommentCell.h */,
D0B836FA28F1655E006E76C0 /* DynamicCommentCell.m */,
);
path = View;
sourceTree = "<group>";
......@@ -1555,14 +1555,14 @@
D078280928FE5C4E00C8D612 /* ComReplyList */ = {
isa = PBXGroup;
children = (
D08EE4A728F2C82D00B76FF9 /* ReplyListController.h */,
D08EE4A828F2C82D00B76FF9 /* ReplyListController.m */,
D08EE4B028F2CFD300B76FF9 /* ReplyCell.h */,
D08EE4B128F2CFD300B76FF9 /* ReplyCell.m */,
D08EE4AA28F2CB1500B76FF9 /* ReplyDetailView.h */,
D08EE4AB28F2CB1500B76FF9 /* ReplyDetailView.m */,
D08EE4AD28F2CFC300B76FF9 /* MajorCommentCell.h */,
D08EE4AE28F2CFC300B76FF9 /* MajorCommentCell.m */,
D08EE4B028F2CFD300B76FF9 /* ReplyCell.h */,
D08EE4B128F2CFD300B76FF9 /* ReplyCell.m */,
D08EE4A728F2C82D00B76FF9 /* ReplyListController.h */,
D08EE4A828F2C82D00B76FF9 /* ReplyListController.m */,
);
path = ComReplyList;
sourceTree = "<group>";
......@@ -1622,14 +1622,14 @@
D078280E28FE617500C8D612 /* Article */ = {
isa = PBXGroup;
children = (
D0FE45C928FFD2CD0020710A /* ArticleCell.h */,
D0FE45CA28FFD2CD0020710A /* ArticleCell.m */,
D0FE45C628FFCC640020710A /* ArticleModel.h */,
D0FE45C728FFCC640020710A /* ArticleModel.m */,
D0A3BB9428D9B43700F58781 /* ArticleController.h */,
D0A3BB9528D9B43700F58781 /* ArticleController.m */,
D0A1C49028C2084B000975DC /* ArticleRequestModel.h */,
D0A1C49128C2084B000975DC /* ArticleRequestModel.m */,
D0FE45C628FFCC640020710A /* ArticleModel.h */,
D0FE45C728FFCC640020710A /* ArticleModel.m */,
D0FE45C928FFD2CD0020710A /* ArticleCell.h */,
D0FE45CA28FFD2CD0020710A /* ArticleCell.m */,
);
path = Article;
sourceTree = "<group>";
......
......@@ -51,7 +51,6 @@
- (void)setModel:(ArticleModel *)model {
_model = model;
self.titleLab.text = model.title;
self.contentLab.text = model.content;
[self.coverIV yy_setImageWithURL:[NSURL URLWithString:model.cover] placeholder:[UIImage defaultPlaceholderWithSize:CGSizeMake(86, 86)]];
......@@ -60,6 +59,7 @@
[self.tagsView.subviews enumerateObjectsUsingBlock:^(__kindof UIView * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
[obj removeFromSuperview];
}];
CGFloat totalW = 0;
for (int idx = 0; idx < tagsTitleArr.count; idx++) {
NSString *tagTitle = [NSString stringWithFormat:@"#%@", tagsTitleArr[idx]];
CGFloat tagTitleW = [UILabel getWidthWithText:tagTitle font:SysFont(12)] + 16;
......@@ -68,9 +68,11 @@
tagLab.textAlignment = NSTextAlignmentCenter;
tagLab.backgroundColor = ColorFromHexA(0x62C3D5, .2);
[tagLab cornerRadius:10.5];
tagLab.frame = CGRectMake(idx * (tagTitleW + 8), 0, tagTitleW, 21);
tagLab.frame = CGRectMake(totalW + idx * 8, 0, tagTitleW, 21);
totalW += tagTitleW;
[self.tagsView addSubview:tagLab];
}
return;
}
#pragma mark - lazy
......
......@@ -84,7 +84,7 @@
}
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
return section == self.dataSource.dataArray.count - 1 ? 15 : 12;;
return section == self.dataSource.dataArray.count - 1 ? (24 + Bottom_SafeArea_Height) : 12;;
}
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
......@@ -112,8 +112,7 @@
articleTV.backgroundColor = DSClearColor;
articleTV.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
[articleTV registerClass:[ArticleCell class] forCellReuseIdentifier:NSStringFromClass([ArticleCell class])];
UIView *footView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, CGFLOAT_MIN)];
articleTV.tableFooterView = footView;
articleTV.tableFooterView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, CGFLOAT_MIN)];;
[self.view addSubview:articleTV];
self.articleView = articleTV;
......
......@@ -30,8 +30,7 @@
[self registerClass:[MajorCommentCell class] forCellReuseIdentifier:NSStringFromClass([MajorCommentCell class])];
[self registerClass:[ReplyCell class] forCellReuseIdentifier:NSStringFromClass([ReplyCell class])];
self.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
UIView *footView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, CGFLOAT_MIN)];
self.tableFooterView = footView;
self.tableFooterView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 24 + Bottom_SafeArea_Height)];;
self.dk_backgroundColorPicker = DKColorPickerWithColors(DSWhite, DarkColor, DSWhite);
}
return self;
......
......@@ -180,8 +180,7 @@
_dynamicDetailView.separatorStyle = UITableViewCellSeparatorStyleNone;
[_dynamicDetailView registerClass:[DynamicCommentCell class] forCellReuseIdentifier:NSStringFromClass([DynamicCommentCell class])];
_dynamicDetailView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
UIView *footView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, CGFLOAT_MIN)];
_dynamicDetailView.tableFooterView = footView;
_dynamicDetailView.tableFooterView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, CGFLOAT_MIN)];;
}
return _dynamicDetailView;
}
......
......@@ -116,7 +116,7 @@
}
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
return section == self.comListVM.listArr.count - 1 ? 6.5 : 12;;
return section == self.comListVM.listArr.count - 1 ? (24 + Bottom_SafeArea_Height) : 12;;
}
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
......@@ -186,7 +186,8 @@
_listView.tableHeaderView = self.headView;
_listView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
[_listView registerClass:[OfficialMessageCell class] forCellReuseIdentifier:NSStringFromClass([OfficialMessageCell class])];
_listView.tableFooterView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, CGFLOAT_MIN)];;
WS(weakSelf);
_listView.mj_header = [DSGifHeader headerWithRefreshingBlock:^{
if (weakSelf.delegate && [weakSelf.delegate respondsToSelector:@selector(getDynamicListRequest:)]) {
......
......@@ -70,6 +70,9 @@
listView.backgroundColor = DSClearColor;
listView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
[listView registerClass:[OfficialNotiCell class] forCellReuseIdentifier:NSStringFromClass([OfficialNotiCell class])];
listView.tableHeaderView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 10, 25)];
listView.tableFooterView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 10, 24 + Bottom_SafeArea_Height)];
[self.view addSubview:listView];
self.listView = listView;
WS(weakSelf);
......
......@@ -38,6 +38,8 @@
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
[self.tableView registerClass:[PraiseCell class] forCellReuseIdentifier:NSStringFromClass([PraiseCell class])];
self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 10, 24 + Bottom_SafeArea_Height)];
WS(weakSelf);
self.tableView.mj_header = [DSGifHeader headerWithRefreshingBlock:^{
[weakSelf getPraiseList:NO];
......
......@@ -34,8 +34,7 @@ static int secFooterHeight = 8;
[self registerClass:[MessageOfficialNotiCell class] forCellReuseIdentifier:NSStringFromClass([MessageOfficialNotiCell class])];
[self registerClass:[MessageComReplyCell class] forCellReuseIdentifier:NSStringFromClass([MessageComReplyCell class])];
self.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
UIView *footView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, CGFLOAT_MIN)];
self.tableFooterView = footView;
self.tableFooterView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 10, 24 + Bottom_SafeArea_Height)];
}
return self;
}
......
......@@ -91,7 +91,7 @@
}
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
return section == self.myDynVM.listArr.count - 1 ? 6.5 : 12;;
return section == self.myDynVM.listArr.count - 1 ? (24 + Bottom_SafeArea_Height) : 12;;
}
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
......@@ -138,7 +138,8 @@
_listView.showsVerticalScrollIndicator = NO;
_listView.separatorStyle = UITableViewCellSeparatorStyleNone;
_listView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
_listView.tableFooterView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, CGFLOAT_MIN)];;
WS(weakSelf);
_listView.mj_header = [DSGifHeader headerWithRefreshingBlock:^{
if (weakSelf.delegate && [weakSelf.delegate respondsToSelector:@selector(getDynamicListRequest:)]) {
......
......@@ -73,7 +73,7 @@
if (!_audioIV) {
_audioIV = [UIImageView new];
_audioIV.dk_alphaPicker = DKAlphaPickerWithAlphas(1, .5, 1);
[_audioIV cornerRadius:12];
_audioIV.contentMode = UIViewContentModeScaleAspectFit;
}
return _audioIV;
}
......
......@@ -59,7 +59,7 @@
storyListView.backgroundColor = DSClearColor;
storyListView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
[storyListView registerClass:[SleepStoryCell class] forCellReuseIdentifier:NSStringFromClass([SleepStoryCell class])];
storyListView.tableFooterView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 10, 15)];
storyListView.tableFooterView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 10, 24 + Bottom_SafeArea_Height)];
[self addSubview:storyListView];
self.storyListView = storyListView;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!