Revision bab39f42
| ChatSecure/Classes/View Controllers/OTRMessagesViewController.m | ||
|---|---|---|
| 309 | 309 |
_buddyAvatarImage = nil; |
| 310 | 310 |
} |
| 311 | 311 |
|
| 312 |
- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator {
|
|
| 313 |
[super viewWillTransitionToSize:size withTransitionCoordinator:coordinator]; |
|
| 314 |
|
|
| 315 |
// After the transition is done, we need to reset the size caches and relayout |
|
| 316 |
// Do this using the technique in https://stackoverflow.com/questions/26943808/ios-how-to-run-a-function-after-device-has-rotated-swift |
|
| 317 |
[coordinator animateAlongsideTransition:nil completion:^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) {
|
|
| 318 |
[self.messageSizeCache removeAllObjects]; |
|
| 319 |
[self.collectionView.collectionViewLayout invalidateLayoutWithContext:[JSQMessagesCollectionViewFlowLayoutInvalidationContext context]]; |
|
| 320 |
}]; |
|
| 321 |
} |
|
| 322 |
|
|
| 312 | 323 |
#pragma - mark Setters & getters |
| 313 | 324 |
|
| 314 | 325 |
- (OTRAttachmentPicker *)attachmentPicker |
Also available in: Unified diff