Skip to content

Commit

Permalink
Fix a compile error.
Browse files Browse the repository at this point in the history
  • Loading branch information
xhacker committed Feb 16, 2015
1 parent 7eae2ef commit f54b762
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions TEAChart.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "TEAChart"
s.version = "0.3"
s.version = "0.3.1"
s.summary = "Simple and intuitive iOS chart library. Contribution graph, clock chart, and bar chart."
s.homepage = "https://github.com/xhacker/TEAChart"
s.social_media_url = "https://twitter.com/xhacker"
Expand All @@ -9,7 +9,7 @@ Pod::Spec.new do |s|
s.author = { "Xhacker Liu" => "liu.dongyuan@gmail.com" }

s.platform = :ios, '6.0'
s.source = { :git => "https://github.com/xhacker/TEAChart.git", :tag => "0.3" }
s.source = { :git => "https://github.com/xhacker/TEAChart.git", :tag => "0.3.1" }
s.source_files = 'TEAChart', 'TEAChart/**/*.{h,m}'
s.requires_arc = true
end
6 changes: 6 additions & 0 deletions TEAChart/NSDate+TEAExtensions.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@

#import <Foundation/Foundation.h>

#ifdef __IPHONE_8_0
#define TEACalendarIdentifierGregorian NSCalendarIdentifierGregorian
#else
#define TEACalendarIdentifierGregorian NSGregorianCalendar
#endif

@interface NSDate (TEAExtensions)

- (NSDate *)tea_nextDay;
Expand Down
2 changes: 1 addition & 1 deletion TEAChart/NSDate+TEAExtensions.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ - (NSDate *)tea_nextDay
NSDateComponents *components = [[NSDateComponents alloc] init];
components.day = 1;

NSCalendar *calendar = [NSCalendar currentCalendar];
NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:TEACalendarIdentifierGregorian];
return [calendar dateByAddingComponents:components toDate:self options:0];
}

Expand Down
1 change: 1 addition & 0 deletions TEAChart/TEAClockChart.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#import "TEAClockChart.h"
#import "TEATimeRange.h"
#import "NSDate+TEAExtensions.h"

@implementation TEAClockChart

Expand Down
6 changes: 0 additions & 6 deletions TEAChartDemo/TEAChartDemo-Prefix.pch
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,3 @@
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif

#ifdef __IPHONE_8_0
#define TEACalendarIdentifierGregorian NSCalendarIdentifierGregorian
#else
#define TEACalendarIdentifierGregorian NSGregorianCalendar
#endif

0 comments on commit f54b762

Please sign in to comment.