Skip to content

Commit

Permalink
修复文本输入框初始高度不正确的问题.
Browse files Browse the repository at this point in the history
  • Loading branch information
lixiang1994 committed Nov 4, 2021
1 parent db8c4fa commit a9d3f71
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Expand Up @@ -307,11 +307,7 @@ - (void)viewDidLoad

[self.dataSource registerCellClassesInTableView:self.tableView];

// fix TextViewContainer height anomaly
dispatch_async(dispatch_get_main_queue(), ^{
[self.tweetTextViewContainer configureWithTweet:self.dataSource.composedTweet];
});

[self.tweetTextViewContainer configureWithTweet:self.dataSource.composedTweet];
}

- (void)updateViewConstraints
Expand Down
Expand Up @@ -117,6 +117,12 @@ - (instancetype)init
return self;
}

- (void)layoutSubviews {
[super layoutSubviews];
// fix TextViewContainer height anomaly
[self _tseui_updateLineCount];
}

- (CGFloat)textViewHeight
{
return _textView.bounds.size.height;
Expand Down

0 comments on commit a9d3f71

Please sign in to comment.