WenchaoD/FSCalendar — dự án di động — đang có 10.6k sao GitHub trong nhóm Mobile. A fully customizable iOS calendar library, compatible with Objective-C and Swift
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Drag all files under FSCalendar folder into your project. 👍
Alternatively to give it a test run, simply press command+u in Example-Objc or Example-Swift and launch the UITest Target.
Only the methods marked "👍" support IBInspectable / IBDesignable feature. Have fun with Interface builder
Setup
Use Interface Builder
1、 Drag an UIView object to ViewController Scene
2、 Change the Custom Class to FSCalendar
3、 Link dataSource and delegate to the ViewController
4、 Finally, implement FSCalendarDataSource and FSCalendarDelegate in your ViewController
To use FSCalendar in swift, you need to Create Bridge Header first.
fileprivate weak var calendar: FSCalendar!
// In loadView or viewDidLoad
let calendar = FSCalendar(frame: CGRect(x: 0, y: 0, width: 320, height: 300))
calendar.dataSource = self
calendar.delegate = self
view.addSubview(calendar)
self.calendar = calendar
To use FSCalendar in Swift3, see Example-Swift for details.
Warning
FSCalendardoesn't update frame by itself, Please implement
For AutoLayout
- (void)calendar:(FSCalendar *)calendar boundingRectWillChange:(CGRect)bounds animated:(BOOL)animated
{
self.calendarHeightConstraint.constant = CGRectGetHeight(bounds);
// Do other updates here
[self.view layoutIfNeeded];
}
For Manual Layout
- (void)calendar:(FSCalendar *)calendar boundingRectWillChange:(CGRect)bounds animated:(BOOL)animated
{
calendar.frame = (CGRect){calendar.frame.origin,bounds.size};
// Do other updates here
}
If you are using Masonry
- (void)calendar:(FSCalendar *)calendar boundingRectWillChange:(CGRect)bounds animated:(BOOL)animated
{
[calendar mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.equalTo(@(bounds.size.height));
// Do other updates
}];
[self.view layoutIfNeeded];
}
If you are using SnapKit
func calendar(_ calendar: FSCalendar, boundingRectWillChange bounds: CGRect, animated: Bool) {
calendar.snp.updateConstraints { (make) in
make.height.equalTo(bounds.height)
// Do other updates
}
self.view.layoutIfNeeded()
}
Roll with Interface Builder
Pre-knowledge
In Swift3, NSDate and NSDateFormatter have been renamed to Date and DateFormatter , see Example-Swift for details.
BOOL sameDay = [self.gregorian isDate:date1 inSameDayAsDate:date2];
// Yes if the date1 and date2 are in same day
[self.gregorian compareDate:date1 toDate:date2 toUnitGranularity:unit];
// compare the era/year/month/day/hour/minute .etc ...
// return NSOrderAscending/NSOrderSame/NSOrderDecending
BOOL inSameUnit = [self.gregorian isDate:date1 equalToDate:date2 toUnitGranularity:unit];
// if the given unit (era/year/month/day/hour/minute .etc) are the same
Support this repo
★Star this repo
Support with
Support with or
Contact
微博: @WenchaoD
Twitter:@WenchaoD
QQ支持群:
If your made a beautiful calendar with this library in your app, please take a screen shot and @me in twitter. Your help really means a lot to me!
License
FSCalendar is available under the MIT license. See the LICENSE file for more info.
WenchaoD/FSCalendar thuộc nhóm Mobile trên TopGit, cùng 7 topic GitHub. Trang Trending và Topics liệt kê các repo cùng số sao và cùng ngôn ngữ để so sánh.
Đọc thêm về WenchaoD/FSCalendar ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/WenchaoD/FSCalendar là nguồn chính thức.
Vì sao WenchaoD/FSCalendar được xếp vào nhóm Mobile?
TopGit xếp WenchaoD/FSCalendar vào nhóm Mobile dựa trên GitHub topics và mô tả của repo (gắn thẻ: "calendar", "carthage", "cocoapods"). Việc phân loại dựa trên metadata thật của repo, không phải đoán theo cảm tính biên tập.
WenchaoD/FSCalendar có bao nhiêu sao?
WenchaoD/FSCalendar có 10.6k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/WenchaoD/FSCalendar. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
WenchaoD/FSCalendar có những chủ đề gì?
GitHub topics của WenchaoD/FSCalendar: "calendar", "carthage", "cocoapods", "ios", "library", "objective-c", "swift". TopGit xếp repo vào nhóm Mobile.
WenchaoD/FSCalendar còn đang phát triển không?
Commit gần nhất trên WenchaoD/FSCalendar là 2.0 năm trước (theo timestamp GitHub). Repo có 1.9k fork — một chỉ báo về mức độ quan tâm của cộng đồng.
WenchaoD/FSCalendar viết bằng ngôn ngữ gì?
WenchaoD/FSCalendar chủ yếu viết bằng Objective-C. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về FSCalendar?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về FSCalendar.