mirror of
https://github.com/samsonjs/samhuri.net-ios.git
synced 2026-03-25 09:25:47 +00:00
adjust scroll indicator insets
This commit is contained in:
parent
477a7939ed
commit
b4a1b208bb
2 changed files with 12 additions and 4 deletions
|
|
@ -240,6 +240,9 @@
|
|||
UIEdgeInsets inset = self.textView.contentInset;
|
||||
inset.bottom = bottomInset;
|
||||
self.textView.contentInset = inset;
|
||||
inset = self.textView.scrollIndicatorInsets;
|
||||
inset.bottom = bottomInset;
|
||||
self.textView.scrollIndicatorInsets = inset;
|
||||
// TODO: put the selection in the middle somehow ... can we get the point/rect for the selection?
|
||||
[self.textView scrollRangeToVisible:self.textView.selectedRange];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -365,15 +365,20 @@ static const NSUInteger SectionPublished = 1;
|
|||
- (void)keyboardWillShow:(NSNotification *)note {
|
||||
NSValue *keyboardFrame = note.userInfo[UIKeyboardFrameEndUserInfoKey];
|
||||
CGFloat keyboardHeight = keyboardFrame.CGRectValue.size.height;
|
||||
UIEdgeInsets inset = self.tableView.contentInset;
|
||||
inset.bottom = keyboardHeight;
|
||||
self.tableView.contentInset = inset;
|
||||
[self adjustTableViewBottomInsets:keyboardHeight];
|
||||
}
|
||||
|
||||
- (void)keyboardWillHide:(NSNotification *)note {
|
||||
[self adjustTableViewBottomInsets:0];
|
||||
}
|
||||
|
||||
- (void)adjustTableViewBottomInsets:(CGFloat)bottom {
|
||||
UIEdgeInsets inset = self.tableView.contentInset;
|
||||
inset.bottom = 0;
|
||||
inset.bottom = bottom;
|
||||
self.tableView.contentInset = inset;
|
||||
inset = self.tableView.scrollIndicatorInsets;
|
||||
inset.bottom = bottom;
|
||||
self.tableView.scrollIndicatorInsets = inset;
|
||||
}
|
||||
|
||||
#pragma mark - Blog notificitons
|
||||
|
|
|
|||
Loading…
Reference in a new issue