mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
better resize
This commit is contained in:
parent
d266c4f284
commit
b64b6fc441
1 changed files with 5 additions and 9 deletions
|
|
@ -54,17 +54,9 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
|
||||
_msgBackgroundColorImage.image = _msgBottomBar.image = [UIImage imageNamed:(outgoing ? @"color_A.png" : @"color_D.png")];
|
||||
_msgDateLabel.textColor = [UIColor colorWithPatternImage:_msgBackgroundColorImage.image];
|
||||
[_msgView setFrame:CGRectMake(_msgView.frame.origin.x,
|
||||
_msgView.frame.origin.y,
|
||||
_msgView.frame.size.width,
|
||||
[UIChatBubbleTextCell ViewHeightForMessage:_msg withWidth:self.view.frame.size.width].height)];
|
||||
|
||||
_tableView.delegate = self;
|
||||
_tableView.dataSource = self;
|
||||
[_tableView setFrame:CGRectMake(_tableView.frame.origin.x,
|
||||
_msgView.frame.origin.y + _msgView.frame.size.height + 10,
|
||||
_tableView.frame.size.width,
|
||||
self.view.frame.size.height - (_msgView.frame.origin.y + _msgView.frame.size.height))];
|
||||
|
||||
_displayedList = linphone_chat_message_get_participants_by_imdn_state(_msg, LinphoneChatMessageStateDisplayed);
|
||||
_receivedList = linphone_chat_message_get_participants_by_imdn_state(_msg, LinphoneChatMessageStateDeliveredToUser);
|
||||
|
|
@ -74,7 +66,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
[_tableView reloadData];
|
||||
}
|
||||
|
||||
- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator {
|
||||
- (void)fitContent {
|
||||
BOOL outgoing = linphone_chat_message_is_outgoing(_msg);
|
||||
_msgBackgroundColorImage.image = _msgBottomBar.image = [UIImage imageNamed:(outgoing ? @"color_A.png" : @"color_D.png")];
|
||||
_msgDateLabel.textColor = [UIColor colorWithPatternImage:_msgBackgroundColorImage.image];
|
||||
|
|
@ -89,6 +81,10 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
self.view.frame.size.height - (_msgView.frame.origin.y + _msgView.frame.size.height))];
|
||||
}
|
||||
|
||||
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
|
||||
[self fitContent];
|
||||
}
|
||||
|
||||
#pragma mark - TableView
|
||||
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue