Merge pull request #4 from giuseppenucifora/sviluppo

Release 1.0
This commit is contained in:
Giuseppe Nucifora 2015-10-29 01:45:17 +01:00
commit e3702a16fe
3 changed files with 9 additions and 9 deletions

View File

@ -12,7 +12,7 @@
#import "UIButton+BackgroundColor.h" #import "UIButton+BackgroundColor.h"
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
@interface TabBarItem() <TabBarPickerSubItemsViewDelegate> @interface TabBarItem()
@property (nonatomic, strong) UIButton *itemButton; @property (nonatomic, strong) UIButton *itemButton;

View File

@ -256,14 +256,14 @@
break; break;
} }
case 1:{ case 1:{
int max = (int)[_calendar maximumRangeOfUnit:NSCalendarUnitHour].length; NSInteger max = (int)[_calendar maximumRangeOfUnit:NSCalendarUnitHour].length;
[lblDate setText:[NSString stringWithFormat:@"%02d",(row % max)]]; // 02d = pad with leading zeros to 2 digits [lblDate setText:[NSString stringWithFormat:@"%02ld",(long)(row % max)]]; // 02d = pad with leading zeros to 2 digits
lblDate.textAlignment = NSTextAlignmentCenter; lblDate.textAlignment = NSTextAlignmentCenter;
break; break;
} }
case 2:{ case 2:{
int max = (int)[_calendar maximumRangeOfUnit:NSCalendarUnitMinute].length; NSInteger max = (int)[_calendar maximumRangeOfUnit:NSCalendarUnitMinute].length;
[lblDate setText:[NSString stringWithFormat:@"%02d",(row % max)]]; [lblDate setText:[NSString stringWithFormat:@"%02ld",(long)(row % max)]];
lblDate.textAlignment = NSTextAlignmentLeft; lblDate.textAlignment = NSTextAlignmentLeft;
break; break;
} }

View File

@ -148,7 +148,7 @@
// height is the height/width for one segment // height is the height/width for one segment
// index is the index of the page // index is the index of the page
// size is the number of segments that present one page // size is the number of segments that present one page
int value = height * index * size; NSInteger value = height * index * size;
// check if the page where the user wants so scroll to is in the contentSize of the ScrollView // check if the page where the user wants so scroll to is in the contentSize of the ScrollView
if (!(value + [self frameSize:self] < [self contentScrollSize:self])) { if (!(value + [self frameSize:self] < [self contentScrollSize:self])) {
@ -308,9 +308,9 @@
if (!_enableFitScreen && !((int)contentSize.height % (_pageSize * _segmentSize) == 0)) { if (!_enableFitScreen && !((int)contentSize.height % (_pageSize * _segmentSize) == 0)) {
// Calculate how much 'white space' is needed. // Calculate how much 'white space' is needed.
int currentContentSize = [self contentSize:contentSize]; NSInteger currentContentSize = [self contentSize:contentSize];
int sizeOnePage = (_pageSize * _segmentSize); NSInteger sizeOnePage = (_pageSize * _segmentSize);
int canSomebodyPleaseRenameThisValueIfHeOrSheFindsOutHowToCallIt = ((int)[self contentSize:contentSize] % (_pageSize * _segmentSize)); NSInteger canSomebodyPleaseRenameThisValueIfHeOrSheFindsOutHowToCallIt = ((int)[self contentSize:contentSize] % (_pageSize * _segmentSize));
CGFloat value = sizeOnePage - canSomebodyPleaseRenameThisValueIfHeOrSheFindsOutHowToCallIt + currentContentSize; CGFloat value = sizeOnePage - canSomebodyPleaseRenameThisValueIfHeOrSheFindsOutHowToCallIt + currentContentSize;
contentSize = [self setCGSize:contentSize withValue:value]; contentSize = [self setCGSize:contentSize withValue:value];