BROptionsButton
BROptionsButton copied to clipboard
when the app launches,there will be a part of button below the current button,how can I fix it

and when I presses the button once, it works all fine.
any solutions? I'm facing the same
Btw solved it! 👍 lol, Just added leftRightMargin in openedImageView frame
- (void)setupSubviews {
const CGFloat leftRightMargin = 10;
const CGRect imagesRect = CGRectInset(self.bounds, leftRightMargin, leftRightMargin);
UIImageView *closedImageView = [[UIImageView alloc] initWithFrame:imagesRect];
closedImageView.contentMode = UIViewContentModeScaleAspectFit;
closedImageView.backgroundColor = [UIColor clearColor];
[self addSubview:closedImageView];
self.closedStateImage = closedImageView;
UIImageView *openedImageView = [[UIImageView alloc] initWithFrame:imagesRect];
openedImageView.contentMode = closedImageView.contentMode;
openedImageView.backgroundColor = closedImageView.backgroundColor;
openedImageView.center = CGPointMake(openedImageView.center.x,
openedImageView.center.y + leftRightMargin + (closedImageView.frame.size.height));
[self addSubview:openedImageView];
self.openedStateImage = openedImageView;
openedImageView.autoresizingMask = closedImageView.autoresizingMask = [self allAutoresizingMasksFlags];
openedImageView.translatesAutoresizingMaskIntoConstraints = closedImageView.translatesAutoresizingMaskIntoConstraints = YES;
}
i guess we should close this issue