Skip to content

Commit

Permalink
Fixed conversion warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jfalb committed Jan 28, 2016
1 parent 3c0128f commit b53df12
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions NGTabBarController/NGTabBar.m
Expand Up @@ -109,9 +109,9 @@ - (void)layoutSubviews {
totalDimension -= appliedItemPadding;

if (NGTabBarIsVertical(self.position)) {
currentFrameTop = floorf((self.bounds.size.height-totalDimension)/2.f);
currentFrameTop = (CGFloat)floor((self.bounds.size.height-totalDimension)/2.f);
} else {
currentFrameLeft = floorf((self.bounds.size.width-totalDimension)/2.f);
currentFrameLeft = (CGFloat)floor((self.bounds.size.width-totalDimension)/2.f);
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions NGTabBarController/NGTabBarItem.m
Expand Up @@ -65,7 +65,7 @@ - (void)layoutSubviews {

if (self.image != nil) {
CGFloat imageOffset = self.title.length > 0 ? kNGImageOffset : 0.f;
CGFloat textTop = floorf((self.bounds.size.height - self.image.size.height)/2.f) - imageOffset + self.image.size.height + 2.f;
CGFloat textTop = (CGFloat)floor((self.bounds.size.height - self.image.size.height)/2.f) - imageOffset + self.image.size.height + 2.f;

self.titleLabel.frame = CGRectMake(0.f, textTop, self.bounds.size.width, self.titleLabel.font.lineHeight);
} else {
Expand All @@ -88,8 +88,8 @@ - (void)drawRect:(CGRect)rect {
// draw an image in the center of the cell (offset to the top)
CGSize imageSize = self.image.size;
CGFloat imageOffset = self.title.length > 0 ? kNGImageOffset : 0.f;
CGRect imageRect = CGRectMake(floorf(((bounds.size.width-imageSize.width)/2.f)),
floorf(((bounds.size.height-imageSize.height)/2.f)) + imageOffset,
CGRect imageRect = CGRectMake((CGFloat)floor(((bounds.size.width-imageSize.width)/2.f)),
(CGFloat)floor(((bounds.size.height-imageSize.height)/2.f)) + imageOffset,
imageSize.width,
imageSize.height);

Expand Down

0 comments on commit b53df12

Please sign in to comment.