mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 02:58:07 +00:00
0012883: [APP iOS] After rotation, the app are frozen
This commit is contained in:
parent
fca995470f
commit
4cb651fb99
2 changed files with 16 additions and 5 deletions
|
|
@ -269,7 +269,8 @@
|
|||
UIViewController *controller = nil;
|
||||
|
||||
controller = [[UIApplication sharedApplication] keyWindow].rootViewController;
|
||||
CGRect frame = [[UIScreen mainScreen] bounds];
|
||||
//CGRect frame = [[UIScreen mainScreen] bounds];
|
||||
[[controller.view removeConstraints] done];
|
||||
UIInterfaceOrientation oldOrientation = controller.interfaceOrientation;
|
||||
|
||||
NSTimeInterval animationDuration = animated ? 0.3f : 0.0;
|
||||
|
|
@ -279,7 +280,8 @@
|
|||
[controller didRotateFromInterfaceOrientation:oldOrientation];
|
||||
[UIView animateWithDuration:animationDuration
|
||||
animations:^{
|
||||
[controller.view setFrame:frame];
|
||||
[[controller.view matchParentDimmensions] done];
|
||||
//[controller.view setFrame:frame];
|
||||
}];
|
||||
|
||||
if (firstResponder == nil) {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ extension UIView {
|
|||
|
||||
// Few constraints wrapper to abstract SnapKit functions
|
||||
|
||||
func removeConstraints() -> UIView {
|
||||
@objc func removeConstraints() -> UIView {
|
||||
snp.removeConstraints()
|
||||
return self
|
||||
}
|
||||
|
|
@ -144,7 +144,16 @@ extension UIView {
|
|||
return self
|
||||
}
|
||||
|
||||
func matchParentDimmensions() -> UIView {
|
||||
|
||||
func matchLeftBordersOf(view:UIView) -> UIView {
|
||||
snp.makeConstraints { (make) in
|
||||
make.left.equalTo(view)
|
||||
}
|
||||
return self
|
||||
}
|
||||
|
||||
|
||||
@objc func matchParentDimmensions() -> UIView {
|
||||
snp.makeConstraints { (make) in
|
||||
make.left.right.top.bottom.equalToSuperview()
|
||||
}
|
||||
|
|
@ -464,7 +473,7 @@ extension UIView {
|
|||
return self
|
||||
}
|
||||
|
||||
func done() {
|
||||
@objc func done() {
|
||||
// to avoid the unused variable warning
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue