I made a UIView in IB and I want to modify some of properties of subviews in UIView, what can I do?
For example, I want to modify the origin of button.
For example, I want to modify the origin of button.
Code:
- (id)initWithFrame:(CGRect)frame {
if ((self = [super initWithFrame:frame])) {
NSArray *keyboards = [[NSBundle mainBundle] loadNibNamed:@"ChineseRhymeKeyboard" owner:self options:nil];
self = [[keyboards objectAtIndex:0] retain];
for (UIButton *button in self.subviews) {
// CGRect frame = button.frame;
// frame.origin.y -= 10;
// button.frame = frame;
// [self addSubview:button];
NSLog(@"%@", button.titleLabel.text);
}
}
return self;
}