diff --git a/FSCalendar.podspec b/FSCalendar.podspec index fb3de42..436742c 100644 --- a/FSCalendar.podspec +++ b/FSCalendar.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "FSCalendar" - s.version = "2.1.1" + s.version = "2.2.0" s.summary = "Designed to build the best iOS calendar control." s.homepage = "https://github.com/WenchaoD/FSCalendar" diff --git a/FSCalendar/Info.plist b/FSCalendar/Info.plist index a870e03..a60ea4a 100644 --- a/FSCalendar/Info.plist +++ b/FSCalendar/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.2.0.beta + 2.2.0 CFBundleSignature ???? CFBundleVersion diff --git a/README.md b/README.md index e4da8be..7cfac10 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ [![Join the chat at https://gitter.im/WenchaoD/FSCalendar](https://badges.gitter.im/WenchaoD/FSCalendar.svg)](https://gitter.im/WenchaoD/FSCalendar?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) * 在您静静的离开之前,请确保点击了这个按钮star
-* Before leaving quietly, please make sure you've taken care of this button very well star +* Before leaving quietly, please make sure you've taken good care of this button.star # [中文介绍](http://www.jianshu.com/notebooks/4276521/latest) @@ -37,6 +37,8 @@ ## Scope handle ![scopehandle](https://cloud.githubusercontent.com/assets/5186464/15096674/5270ef9c-1536-11e6-88b0-c4e3e8f93115.gif) +> FSCalendar doesn't change frame or the constraint by itself, see [Adjusts frame dynamicly](#adjusts_frame_dynamicly) + # Installation ## CocoaPods: @@ -114,6 +116,28 @@ self.calendar = calendar ```
+## Warning +`FSCalendar` doesn't change frame by itself, Please implement + +* For autoLayout + +```objc +- (void)calendar:(FSCalendar *)calendar boundingRectWillChange:(CGRect)bounds animated:(BOOL)animated +{ + _calendarHeightConstraint.constant = CGRectGetHeight(bounds); + [self.view layoutIfNeeded]; +} +``` + +* For manual layout + +```objc +- (void)calendar:(FSCalendar *)calendar boundingRectWillChange:(CGRect)bounds animated:(BOOL)animated +{ + calendar.frame = (CGRect){calendar.frame.origin,bounds.size}; +} +``` + ### Roll with Interface Builder ![fscalendar - ibdesignable](https://cloud.githubusercontent.com/assets/5186464/9301716/2e76a2ca-4503-11e5-8450-1fa7aa93e9fd.gif)