SWRevealViewController icon indicating copy to clipboard operation
SWRevealViewController copied to clipboard

Resize contents of rear view controller?

Open jamfor91 opened this issue 9 years ago • 4 comments

Hi, I'm pretty new to Xcode/Swift, so I'm just wondering.

At the moment, I have my rear view controller set to a UITableViewController which has cells, which the user can press and then information is passed to the front view controller. This all works perfectly. The only issue is, the table view itself does not resize to the width of the menu, meaning content is cut off.

I cannot for the life of me figure out how to automatically resize the contents of the UITableViewController to fit the size of the SWRevealViewController. I've attached a screenshot to explain what I mean.

Any help would be hugely appreciated!

screen shot 2016-04-18 at 12 19 06 screen shot 2016-04-18 at 12 19 09

jamfor91 avatar Apr 18 '16 11:04 jamfor91

It is normal as a UITableView use the entire view of it's controller (UITableViewController). If you want to resize your tableview you have to manage it in a UIViewController subclass.

iDevelopper avatar Apr 18 '16 11:04 iDevelopper

Thanks a lot for the hint, I'll try doing it that way then!

jamfor91 avatar Apr 18 '16 13:04 jamfor91

You can also keep your table view controller and set the property rearViewRevealOverdraw to 0

iDevelopper avatar Apr 19 '16 08:04 iDevelopper

Take a look on my answer here, hope this help https://stackoverflow.com/a/46444950/2741910

lee5783 avatar Sep 27 '17 10:09 lee5783