trnc
trnc

Reputation: 21577

Accessing superview ScrollView?

i added some views (every view has its own viewcontroller and nib) to an UIScrollView. How can I access the ScrollView from within the UIViews I've added?

self.view.superview doesn't get me the UIScrollView properties. I need to disable scrollEnabled from within an UIView.

Thank you!

Upvotes: 1

Views: 889

Answers (1)

Vinzius
Vinzius

Reputation: 2901

Maybe try (UIScrollView*)(self.view.superview).property to access the property you want :-) It should work.

But maybe with an Delegate it would be better :-p

Good Luck !

Upvotes: 2

Related Questions