Reputation: 4984
I have converted ILColorPicker to work on XCode4 and Storyboard. My problem is that it fills the entire UIView on the iPad... where do I start looking for a way to make it smaller?
I was thinking of using a subview, but not sure how to "wire" it into the subview. Any other ideas?
UPDATE: here is the code where I believe I can modify the frame, except I don't know how...
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
// Initialization code
[self setup];
}
return self;
}
Upvotes: 0
Views: 445
Reputation: 43875
Adjusting the frame size is programmed with CGRectMake
like this:
- (id)initWithFrame:(CGRect)frame {
if ((self = [super initWithFrame:CGRectMake(x, y, width, height)])) {
// Initialization code
}
return self;
}
In the above the variable x
and y
corrispond to the top-left corner. And width
and height
are the width and height of the frame.
Upvotes: 2