Access properties with self returns always “null”

0 votes
asked Jul 23, 2010 by geforce

I've got a custom UIScrollView class. On the - (id)initWithFrame:(CGRect)frame function, I set different properties, but when I want to access a property like self.zoomScale, it´s always null.

Here's my definition:

@interface MyScrollView : UIScrollView <UIScrollViewDelegate> {..

And here's the .m file:

- (id)initWithFrame:(CGRect)frame {
    if ((self = [super initWithFrame:frame])) {

   //setup etc.
   [self setMaximumZoomScale:2.0f];
   [self setMinimumZoomScale:1.0f];


Any ideas on that? Would be great to know.
Thanks for your time.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.
Welcome to Q&A, where you can ask questions and receive answers from other members of the community.
Website Online Counter