MIA: [[self window] addSubview:scrollView];


In the first printing, in the code on pages 122, 123, and 124 there appears:

[scrollView addSubview:view];

[scrollView release];

The blank line between the two lines of code should be:
[[self window] addSubview:scrollView];


Also, the line

should be

Until I did that, swiping moved the scrollbars, but not the circles.


I’m having the problem that pinch/zoom doesn’t work. I tried adding

[[self window] addSubview:scrollView];

in between the lines

[scrollView addSubview:view];

[scrollView release];

It doesn’t cause a build error, but it doesn’t make any difference.

And actually it seems that I can put [[self window] addSubview:scrollView]; or [[self window] addSubview:view]; anywhere I like and as many times as I like and it still works. I’m very unclear on what this is doing or how it works. For example I can copy and paste the line “[[self window] addSubview:scrollView];” 10 times and it doesn’t affect my program output at all.

Can anyone quickly explain how adding subViews works? This chapter really has made no sense to me, and I’ve spent most of my time searching forums for answers. Very frustrating.