1

The question may be similar with

Designing inside a scrollview in xcode 4.2 with storyboards

but none of the answer there makes sense at all.

Okay I created a new controller and I added a scrollView.

The very first thing I noticed is there is NOWHERE to specify the content size of the scrollView.

enter image description here

Not in attributes inspector, not in size inspector.

Then what?

I am expecting some larger than normal box where I can draw all the view I want to put in. There is no such thing either.

I am very frustated.

All the "tutorial" out there tell about how to fill scrollView using code.

Another thing I tried is to select controller go to size inspector and then choose FREEFORM.

Great. I still can't make that template big. enter image description here

Should I do this in XIB instead? At least on that one I can have one huge UIView. Or what is the official way industry standard way of doing this? Is there a WWDC for this one?

Say I want to draw something like these:

Community
  • 1
  • 1
user4951
  • 32,206
  • 53
  • 172
  • 282
  • 1
    Sorry, but if you want to make applications, you will eventually need to write code. –  Oct 14 '12 at 07:11
  • I know. Anyway, I have figured out that I can do this in XIB, but NOT in story board. I think it's silly that we can't make the canvas bigger in story board but we can in xib. – user4951 Oct 14 '12 at 07:40
  • aonther reason why IB sucks... :( –  Oct 14 '12 at 07:44
  • Well, you just don't learn how to use it yet H2CO3. For serious design you do need them. – user4951 Oct 14 '12 at 07:46
  • 1
    @JimThio If that were true, then why do my apps not use nibs at all. – CodaFi Oct 14 '12 at 07:48
  • @JimThio I had to implement a highly-dynamic, animated menu during my summer work. It couldn't be done using IB (well, TBH it could, but it would have required a dramatically greater effort than simply coding it.) I can use IB well but I'd rather not. I prefer making UI from code. Much more logical, can be easily altered when you don't have access to Interface Builder (I've been developing iOS apps and tweaks on Linux for more than two years), etc, etc... –  Oct 14 '12 at 07:50
  • Sorry for underestimating you. Well, I like to use XIB for simple tasks. I need to be able to see what I am creating. – user4951 Oct 14 '12 at 07:51
  • @JimThio that's normal, you're a visual type :) –  Oct 14 '12 at 07:51
  • and how do you handle those autolayout thingy without xib? – user4951 Oct 14 '12 at 07:57
  • You have three options 1) you can use auto layout options directly in code, 2) you can use auto resizing masks properly in your code, 3) use can use old good layoutSubviews to move & resize your subviews. Don't want start next flame war - but I never used XIB, time wasting, I'm faster in code and when you do mention serious design, XIB is kinda useless to me, because I can't set everything there (thus I have something in XIB, something in code), etc. – zrzka Oct 14 '12 at 09:55
  • Looks like the pro really do not use XIB. Lessons learned. To hell with XIB. – user4951 Oct 14 '12 at 10:16
  • yes use IB for very simple UI development – tiguero Oct 14 '12 at 10:23

1 Answers1

1

I don't think you can get a tutorial on this as it is simply impossible in IB. As most people already commented out what you want to do here need to be done programmatically.

If you are using XIB you can set up all your content there. Under the size tab (in the inspector) you will need to change the height to fill all your content but you still need to set up your contentSize programmatically.

For storyboard I don't think it is possible to change the size of your scrollview in IB.

tiguero
  • 11,477
  • 5
  • 43
  • 61