0

I have a UITableView outlet on a UIViewController, the hierarchy is as is the following image:

enter image description here

I want to place another view say "bottomView" under the parent view (which includes the current tableview, 2 uibuttons and a uilabel), so that when I make the parent view to animate to right side the bottomView appears.

I just tried it out, added a UIView using IB in the hierarchy as shown below, and when I animate the topView (self.view) the problem is that the bottomView wont appear instead I see black screen on bottom. The question is how to properly add the bottomView to the hierarchy so that the existing view is on the top and on animating it would reveal the bottomView.

enter image description here

My code is as in this answer, I just assigned [self view] to topView on viewDidLoad().

[EDIT]: I am using storyboarding

Community
  • 1
  • 1
Firdous
  • 4,624
  • 13
  • 41
  • 80

2 Answers2

1

The view has been taken into the xib file but it needs to be added on other view in order to visualize it. at the time of animation, this bottomView should be added as subview on self.view after setting the appropriate frame.

iOSDevD
  • 30
  • 1
0

You can add other view on the firstView like this.

[firstView addSubView: secondView];
Vineesh TP
  • 7,755
  • 12
  • 66
  • 130