Skip to content

Commit 6b48085

Browse files
committed
走你~
1 parent bef027e commit 6b48085

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

Coding_iOS/Controllers/TweetSendViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ - (void)viewDidLoad
8181
// 添加myTableView
8282
_myTableView = ({
8383
TPKeyboardAvoidingTableView *tableView = [[TPKeyboardAvoidingTableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
84-
tableView.backgroundColor = [UIColor clearColor];
84+
tableView.backgroundColor = [UIColor whiteColor];
8585
tableView.dataSource = self;
8686
tableView.delegate = self;
8787
tableView.separatorStyle = UITableViewCellSeparatorStyleNone;

Coding_iOS/Util/OC_Category/NSString+Common.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,12 @@ - (CGSize)getSizeWithFont:(UIFont *)font constrainedToSize:(CGSize)size{
157157
if (self.length <= 0) {
158158
return resultSize;
159159
}
160+
NSMutableParagraphStyle *style = [NSMutableParagraphStyle new];
161+
style.lineBreakMode = NSLineBreakByWordWrapping;
160162
resultSize = [self boundingRectWithSize:CGSizeMake(floor(size.width), floor(size.height))//用相对小的 width 去计算 height / 小 heigth 算 width
161163
options:(NSStringDrawingUsesFontLeading | NSStringDrawingUsesLineFragmentOrigin)
162-
attributes:@{NSFontAttributeName: font}
164+
attributes:@{NSFontAttributeName: font,
165+
NSParagraphStyleAttributeName: style}
163166
context:nil].size;
164167
resultSize = CGSizeMake(floor(resultSize.width + 1), floor(resultSize.height + 1));//上面用的小 width(height) 来计算了,这里要 +1
165168
return resultSize;

Coding_iOS/Views/Cell/TweetSendTextCell.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ - (UIView *)keyboardToolBar{
104104

105105
UIView *keyboardToolBar = [[UIView alloc] initWithFrame:CGRectMake(0, CGRectGetHeight(_footerToolBar.frame) - 40, kScreen_Width, 40)];
106106
[keyboardToolBar addLineUp:YES andDown:NO andColor:kColorDDD];
107-
keyboardToolBar.backgroundColor = kColorTableSectionBg;
107+
keyboardToolBar.backgroundColor = kColorNavBG;
108108
if (!_locationButton) {
109109
_locationButton = [self locationButtonWithStr:nil];
110110
}

0 commit comments

Comments
 (0)