Commit 7619364e cgx

修复UI细节

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