0

i have a big uiscrollview and topView in ipad viewcontroller, leftscrollView and topView.

there are child scrollviews in leftScrollView. i want to move a childscrollview into topView .

i couldnt cahnge the superview. it says its readonly.

how can i swap it to another view?

fulberto100
  • 313
  • 5
  • 23

1 Answers1

3
[topView addSubview:childScrollView];
Zapko
  • 2,461
  • 25
  • 30
  • 1
    Comment for fulberto100, if it helps: per the docs "Views can have only one superview. If view already has a superview and that view is not the receiver, this method removes the previous superview before making the receiver its new superview.", so adding childScrollView to topView will remove it from wherever it is already and set the superview member appropriately. Probably you were trying to set 'superview' directly? – Tommy May 23 '11 at 13:52