I'm performing flip view transition on two views, which are bounded in A Container View. Flippng them first time is 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, it shows container view.
It's working fine if I Uncheck "Use Autolayout" in my project.
But wWhat to do if I am using AutoLayout???
Here is 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
}