Reputation: 63
I have a scrollview in my superclass, I want to override its size in one of the subclass views of this superclass.
I am using the following Init but my syntax for selecting the scrollview in the parent is wrong and throwing an error, where am i going wrong here?
The scrollView is in the parent view and i want to resize its frame thats set in the super
- (id)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
[super scrollView]; CGRectMake(50, 0, self.width - 50, self.height);
[self setControlArray:[NSMutableArray new]];
[self setBusOffset:1];
[self addBusToView];
[self addBusNavigationToView];
}
return self;
}
Error is
Property 'frame' cannot be found in forward class object 'CDCChannelScrollView'
I assume .frame isnt the correct accessor to edit the frame
Upvotes: 0
Views: 32
Reputation: 63
the answer was to use setFrame:
[self.scrollView setFrame:CGRectMake(50, 0, self.width - 170, self.height)];
Upvotes: 1