Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Override layoutSubviews to call [super layoutSubviews] and then find and reposition the button's view
- - (void) layoutSubviews
- {
- }
- call [super layoutSubviews] and then find and reposition the button's view.
- - (void) layoutSubviews
- {
- [super layoutSubviews];
- for (UIView *view in self.subviews) { // Go through all subviews
- if (view == buttonYouWant) { // Find the button you want
- view.frame = CGRectOffset(view.frame, 0, -5); // Move it
- }
- }
- }
- -(void)layoutSubviews {
- [super layoutSubviews];
- for (UIView *view in self.subviews) {
- if ([view isKindOfClass:NSClassFromString(@"TheClassNameYouWant")]) {
- // Do whatever you want with view here
- }
- }
- }
Add Comment
Please, Sign In to add comment