Subviews disappears while performing Flip Transition second time? -


i'm performing flip view transition on 2 views, bounded in container view. flippng them first time working fine. on second time views frame goes out of view.

like

[<uiview: 0x7fc2316aa030; frame = (-154 -529; 0 0); autoresize = rm+bm; layer = <calayer: 0x7fc2316aa1a0>>]  

after flipping again, shows container view.

it's working fine if uncheck "use autolayout" in project.

but wwhat if using autolayout???

here code:

 @ibaction func flipviews() {     if a==false     {          uiview.transitionfromview(new, toview: old, duration: 1, options: .transitionflipfromleft, completion: {(isfinished : bool)             in              print(self.view_effects.subviews)           // self.old.frame=self.view_effects.frame              })         a=true     }     else     {         uiview.transitionfromview(old, toview: new, duration: 1, options: .transitionflipfromleft, completion:{(isfinished : bool)             in             print(self.view_effects.subviews)             //self.view_effects.hidden=true              //self.new.frame=self.view_effects.frame         })         a=false     } 

when layout views, start work fine. when make transform, it's important remember, autolayout calculate views bounds , frame, based on constraints set. so, in case, added center vertical , horizontal align, width , height rotated view, autolayout mechanism knows when view is. , goes fine. here autolayout tutorial http://www.raywenderlich.com/50319/beginning-auto-layout-tutorial-in-ios-7-part-1


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -