Skip to content

Commit

Permalink
titleView's label now centers correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
irtemed88 committed Jun 22, 2015
1 parent ba21241 commit 95d6562
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions IBActionSheetSample/IBActionSheetSample/IBActionSheet.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}

Expand Down

0 comments on commit 95d6562

Please sign in to comment.