tags:

views:

33

answers:

1

Hi,

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.

A: 

HI, thanks for your fast reply.

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];
   //......

}
geforce
Put your details into your question, do not post them as an answer please. So is the problem is that the properties don't become initialized? Check if initWithFrame method gets called for a start
Vladimir
Ok, sorry for that extra post. Yeah, initWithFrame gets called. Only if i want to access properties it´s null..
geforce