mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-23 06:08:07 +00:00
Fix invalid scroll in chat room view
This commit is contained in:
parent
c9558e8f82
commit
ddfe400b81
3 changed files with 13 additions and 14 deletions
|
|
@ -91,7 +91,11 @@
|
|||
}
|
||||
|
||||
// Scroll to unread
|
||||
[self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:index inSection:0] atScrollPosition:UITableViewScrollPositionMiddle animated:animated];
|
||||
if(index >= 0) {
|
||||
[self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:index inSection:0]
|
||||
atScrollPosition:UITableViewScrollPositionMiddle
|
||||
animated:animated];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Property Functions
|
||||
|
|
|
|||
|
|
@ -303,10 +303,14 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
|
||||
// Scroll
|
||||
int lastSection = [tableController.tableView numberOfSections] -1;
|
||||
int lastRow = [tableController.tableView numberOfRowsInSection:lastSection] - 1;
|
||||
[tableController.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:lastRow inSection:lastSection]
|
||||
atScrollPosition:UITableViewScrollPositionBottom
|
||||
animated:TRUE];
|
||||
if(lastSection >= 0) {
|
||||
int lastRow = [tableController.tableView numberOfRowsInSection:lastSection] - 1;
|
||||
if(lastRow >=0) {
|
||||
[tableController.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:lastRow inSection:lastSection]
|
||||
atScrollPosition:UITableViewScrollPositionBottom
|
||||
animated:TRUE];
|
||||
}
|
||||
}
|
||||
[UIView commitAnimations];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -637,7 +637,6 @@
|
|||
<string key="42.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="7.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="8.CustomClassName">TPKeyboardAvoidingTableView</string>
|
||||
<string key="8.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="9.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<real value="2" key="9.IBUIButtonInspectorSelectedStateConfigurationMetadataKey"/>
|
||||
|
|
@ -734,14 +733,6 @@
|
|||
<string key="minorKey">./Classes/ChatRoomViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">TPKeyboardAvoidingTableView</string>
|
||||
<string key="superclassName">UITableView</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/TPKeyboardAvoidingTableView.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIToggleButton</string>
|
||||
<string key="superclassName">UIButton</string>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue