diff --git a/IBActionSheetSample/IBActionSheetSample/IBActionSheet.m b/IBActionSheetSample/IBActionSheetSample/IBActionSheet.m index 5bf6c84..f4c5cd8 100755 --- a/IBActionSheetSample/IBActionSheetSample/IBActionSheet.m +++ b/IBActionSheetSample/IBActionSheetSample/IBActionSheet.m @@ -1108,14 +1108,14 @@ - (id)initWithTitle:(NSString *)title font:(UIFont *)font { - (void)resizeForPortraitOrientation { self.frame = CGRectMake(0, 0, CGRectGetWidth(adjustedScreenBounds()) - 16, CGRectGetHeight(self.frame)); - self.titleLabel.frame = CGRectMake(0, 0, CGRectGetWidth(adjustedScreenBounds()) - 24, 44); + self.titleLabel.frame = self.bounds; [self setMaskTo:self byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight]; } - (void)resizeForLandscapeOrientation { self.frame = CGRectMake(0, 0, CGRectGetWidth(adjustedScreenBounds()) - 16, CGRectGetHeight(self.frame)); - self.titleLabel.frame = CGRectMake(0, 0, CGRectGetWidth(adjustedScreenBounds()) - 44, 44); + self.titleLabel.frame = self.bounds; [self setMaskTo:self byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight]; }