Friday, 15 April 2011

swift - Moving button above tab bar (overlap) iOS -


I have a tab bar controller, which has 3 view controllers, and a button in VC that animates But there is a bit overlap tab bar

I have to animate this well, but obviously the buttons sit under the tab bar in the stacking order.

What is the best way to sit on top of this tab? I have tried to add it as a subview of tab bar controller, such as:

  initialRecordButtonX = recordButton.frame.origin.x self.tabBarController? .view.addSubview (recordButton) record button.origin.x = initialRecordButtonX  

But it seems to give me a problem with alignment, the button is not in the original button position, but on the screen Up left

Update:

  var tab view: (UIView) = self.tabBarController! .view var btnPoint: CGPoint = recordButton.center; Var btnRect: CGPoint = recordButton.convertPoint (btnPoint, toView: tabView) self.tabBarController? .view.addSubview (RecordButton) RecordButton.frame.org = BTNRact  

You might want to remove tabBarController In the coordination system of .view, recordButton.frame must be changed.

You can use:

:


No comments:

Post a Comment