Roger
Roger

Reputation: 15813

Adding more prototype cells to iOS storyboard than fit in viewcontroller dimensions?

I'm working on an iOS project with storyboards and have run into a problem I can't readily solve.

It's a basic viewcontroller that contains a tableview with custom cells. I have 5 prototype cells varying in height between 70 - 160 pixels and that's all fine - but I now need to add in some more prototypes and my issue is that there is no screen space for them - so I can't work on the design.

I imagined there would be a way to layout the storyboard such that the prototype cells can be displayed where I want them, rather than being visually constrained inside the view controller - which is rather limiting to put it mildly, but I can't figure out how to do it and the documentation seems to avoid the issue.

This graphic hopefully clarifies - I want to add new prototypes but they don't fit in the VC frame and so I can't edit them :-(

Storyboard with Dynamic Prototype Cells

I'm sure I'm missing something obvious ... but what might it be?

Upvotes: 5

Views: 1920

Answers (3)

rdurand
rdurand

Reputation: 7410

Select a cell of the tableview in your storyboard, then scroll on your mouse/trackpad to reveal the hidden cells !

If you just select the view controller, you won't be able to scroll the tableview.

Upvotes: 4

Scott Berrevoets
Scott Berrevoets

Reputation: 16946

You can simply scroll in that table view in Interface Builder. You won't be able to see them all at once, but you can scroll up and down to make other prototypes visible.

Upvotes: 7

SangamAngre
SangamAngre

Reputation: 867

Increase the height of your tableview. Then change the value y ordinate using Size Inspector to some negative value.

Upvotes: -1

Related Questions