[ios] Layout bug fix.

This commit is contained in:
Ilya Grechuhin 2016-03-28 17:27:11 +03:00
parent eb637cb3ef
commit e779e18263

View file

@ -75,7 +75,10 @@ using namespace storage;
self.center = {superview.midX, superview.midY};
[UIView animateWithDuration:kDefaultAnimationDuration animations:^
{
self.size = [self systemLayoutSizeFittingSize:UILayoutFittingCompressedSize];
CGSize const newSize = [self systemLayoutSizeFittingSize:UILayoutFittingCompressedSize];
if (CGSizeEqualToSize(newSize, self.size))
return;
self.size = newSize;
self.center = {superview.midX, superview.midY};
[self layoutIfNeeded];
}];