Skip to content

Commit

Permalink
Version Bump 2.0.0
Browse files Browse the repository at this point in the history
Version Bump 2.0.0
  • Loading branch information
dingwenchao committed Mar 17, 2016
1 parent af7dc4d commit aaf59da
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 17 deletions.
4 changes: 1 addition & 3 deletions Example/Base.lproj/Main_iPhone.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,8 @@
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="fakedSelectedDay">
<integer key="value" value="1"/>
<integer key="value" value="2"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="boolean" keyPath="autoAdjustTitleSize" value="YES"/>
</userDefinedRuntimeAttributes>
<connections>
<outlet property="dataSource" destination="To9-yq-KZP" id="YC8-We-eEn"/>
Expand Down Expand Up @@ -395,7 +394,6 @@
<userDefinedRuntimeAttribute type="number" keyPath="fakedSelectedDay">
<integer key="value" value="1"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="boolean" keyPath="autoAdjustTitleSize" value="YES"/>
<userDefinedRuntimeAttribute type="boolean" keyPath="useVeryShortWeekdaySymbols" value="NO"/>
<userDefinedRuntimeAttribute type="boolean" keyPath="pagingEnabled" value="YES"/>
<userDefinedRuntimeAttribute type="boolean" keyPath="scrollEnabled" value="YES"/>
Expand Down
3 changes: 2 additions & 1 deletion Example/LoadViewExampleViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,14 @@ - (void)viewDidLoad
[super viewDidLoad];

[self.calendar selectDate:[self.calendar tomorrowOfDate:[NSDate date]]];

/*
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self.calendar setScope:FSCalendarScopeWeek animated:YES];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self.calendar setScope:FSCalendarScopeMonth animated:YES];
});
});
*/


}
Expand Down
2 changes: 1 addition & 1 deletion FSCalendar.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "FSCalendar"
s.version = "2.0.0.beta"
s.version = "2.0.0"
s.summary = "Designed to build the best iOS calendar control."

s.homepage = "https://github.com/WenchaoD/FSCalendar"
Expand Down
9 changes: 4 additions & 5 deletions FSCalendar/FSCalendar+IBExtension.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
#import "FSCalendar.h"
#import "FSCalendarConstance.h"

#if TARGET_INTERFACE_BUILDER

IB_DESIGNABLE
@interface FSCalendar (IBExtension)

Expand Down Expand Up @@ -51,10 +49,11 @@ IB_DESIGNABLE
@property (assign, nonatomic) IBInspectable FSCalendarCellShape cellShape;
@property (assign, nonatomic) IBInspectable BOOL useVeryShortWeekdaySymbols;

// For IB Preview. Not actually affect.
#if TARGET_INTERFACE_BUILDER

@property (assign, nonatomic) IBInspectable BOOL fakeSubtitles;
@property (assign, nonatomic) IBInspectable NSInteger fakedSelectedDay;

@end

#endif

@end
8 changes: 4 additions & 4 deletions FSCalendar/FSCalendar+IBExtension.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

#import "FSCalendar+IBExtension.h"

#if TARGET_INTERFACE_BUILDER

@implementation FSCalendar (IBExtension)

#pragma mark - adjustsFontSizeToFitContentSize
Expand Down Expand Up @@ -294,6 +292,8 @@ - (BOOL)useVeryShortWeekdaySymbols
#pragma GCC diagnostic pop
}

#if TARGET_INTERFACE_BUILDER

#pragma mark - fakeSubtitles

- (void)setFakeSubtitles:(BOOL)fakeSubtitles
Expand All @@ -318,6 +318,8 @@ - (NSInteger)fakedSelectedDay
return self.appearance.fakedSelectedDay;
}

#endif

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"

Expand Down Expand Up @@ -365,5 +367,3 @@ - (CGFloat)headerTitleTextSize
#pragma GCC diagnostic pop

@end

#endif
5 changes: 5 additions & 0 deletions FSCalendar/FSCalendar.m
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,13 @@ - (void)layoutSublayersOfLayer:(CALayer *)layer
}
}

#if TARGET_INTERFACE_BUILDER
- (void)prepareForInterfaceBuilder
{
NSDate *date = [NSDate date];
[self selectDate:[self dateWithYear:[self yearOfDate:date] month:[self monthOfDate:date] day:_appearance.fakedSelectedDay?:1]];
}
#endif

- (CGSize)sizeThatFits:(CGSize)size
{
Expand Down Expand Up @@ -980,6 +982,9 @@ - (CGFloat)preferredRowHeight
CGFloat weekdayHeight = self.preferredWeekdayHeight;
CGFloat contentHeight = self.fs_height-headerHeight-weekdayHeight;
CGFloat padding = weekdayHeight*0.1;
if (self.collectionViewLayout.scrollDirection == UICollectionViewScrollDirectionHorizontal) {
padding = FSCalendarFloor(padding);
}
if (!self.floatingMode) {
switch (_scope) {
case FSCalendarScopeMonth: {
Expand Down
4 changes: 2 additions & 2 deletions FSCalendar/FSCalendarAnimator.m
Original file line number Diff line number Diff line change
Expand Up @@ -258,13 +258,13 @@ - (void)performScopeTransitionFromScope:(FSCalendarScope)fromScope toScope:(FSCa
self.calendar.daysContainer.clipsToBounds = YES;

if (animated) {

CGFloat duration = 0.3;
// Perform alpha animation
CGFloat duration = 0.3;
CABasicAnimation *opacity = [CABasicAnimation animationWithKeyPath:@"opacity"];
opacity.duration = duration;
opacity.fromValue = @0;
opacity.toValue = @1;
opacity.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
[self.collectionView.visibleCells enumerateObjectsUsingBlock:^(FSCalendarCell *cell, NSUInteger idx, BOOL *stop) {
if (CGRectContainsPoint(self.collectionView.bounds, cell.center)) {
BOOL shouldPerformAlpha = NO;
Expand Down
4 changes: 4 additions & 0 deletions FSCalendar/FSCalendarAppearance.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,14 @@ typedef NS_OPTIONS(NSUInteger, FSCalendarCaseOptions) {
@property (assign, nonatomic) FSCalendarCaseOptions caseOptions;
@property (assign, nonatomic) BOOL adjustsFontSizeToFitContentSize;

#if TARGET_INTERFACE_BUILDER

// For preview only
@property (assign, nonatomic) BOOL fakeSubtitles;
@property (assign, nonatomic) NSInteger fakedSelectedDay;

#endif

- (void)invalidateAppearance;

@end
Expand Down
2 changes: 1 addition & 1 deletion FSCalendar/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.0.0.beta</string>
<string>2.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down

0 comments on commit aaf59da

Please sign in to comment.