0

I used a UIPageViewController to present some pages. On every swipe, I feed a UITableviewController to UIPageViewController, using tableview to present a page. Now I want to add a button at bottom of every page. I have tried in two ways: first: adding button to tableview's superview and bring it to front

 [self.tableView.superview addSubview:submitButton];
//[self.tableView.superview bringSubviewToFront:submitButton];

second: adding button to pageviewcontroller's view and bring it to front

[strongSelf.pageViewController.view addSubview:submitButton];
[strongSelf.pageViewController.view bringSubviewToFront:submitButton];

But neither is OK, nothing appeared! Thanks in advance!

Jaydeep Patel
  • 1,699
  • 17
  • 30
H.Shane
  • 11
  • 4

1 Answers1

0

Try to add the button to Table view -> Footer view.

Basheer
  • 1,207
  • 9
  • 10
  • adding a footer view maybe a little bit troublesome, is there any way more simple and clean? ps: what is wrong with addsubview to superview? – H.Shane Aug 28 '17 at 08:25