https://github.com/clistery/fsattendancetable
IOS考勤表控件
https://github.com/clistery/fsattendancetable
attendance attendance-record calendar ios
Last synced: 2 months ago
JSON representation
IOS考勤表控件
- Host: GitHub
- URL: https://github.com/clistery/fsattendancetable
- Owner: CListery
- License: apache-2.0
- Created: 2019-09-30T00:58:09.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-05T03:30:30.000Z (over 5 years ago)
- Last Synced: 2025-02-26T09:18:04.026Z (8 months ago)
- Topics: attendance, attendance-record, calendar, ios
- Language: Objective-C
- Homepage:
- Size: 131 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FSAttendanceTable
[](https://cocoapods.org/pods/FSAttendanceTable)
[](https://cocoapods.org/pods/FSAttendanceTable)
[](https://cocoapods.org/pods/FSAttendanceTable)## Views
## Example
```Object-C
FSAttMonthFullView *monthView = [[FSAttMonthFullView alloc] init];
monthView.translatesAutoresizingMaskIntoConstraints = NO;
[self.view addSubview:monthView];
[monthView addConstraint:[NSLayoutConstraint constraintWithItem:monthView
attribute:NSLayoutAttributeWidth
relatedBy:NSLayoutRelationEqual
toItem:nil
attribute:NSLayoutAttributeNotAnAttribute
multiplier:1
constant:kScreenWidth]];
[self.view addConstraint:[NSLayoutConstraint constraintWithItem:monthView
attribute:NSLayoutAttributeTop
relatedBy:NSLayoutRelationEqual
toItem:self.view
attribute:NSLayoutAttributeTop
multiplier:1
constant:50]];NSMutableArray *calendarList = [[NSMutableArray alloc] init];
NSDate * lastDate = [NSDate dateWithString:@"2019-09-25" format:@"yyyy-MM-dd"];
for (int index = 0; index < 20; index++) {
NSDate *date = [NSDate dateWithTimeIntervalSince1970:lastDate.timeIntervalSince1970 - index * 24 * 60 * 60];FSAttCalendarModel *cal = [FSAttCalendarModel initWithTime:date.timeIntervalSince1970];
cal.isSelected = YES;
cal.schemes = [[NSMutableArray alloc] init];
[cal.schemes addObject:[FSAttScheme initWithStatus:FSAttCheckStatus_HOLIDAY]];
[cal.schemes addObject:[FSAttScheme initWithStatus:FSAttCheckStatus_LEAVE_EARLY]];
[calendarList addObject:cal];
}NSDate * startTime = [NSDate dateWithString:@"2019-09-01" format:@"yyyy-MM-dd"];
NSDate * endTime = [NSDate dateWithString:@"2019-09-30" format:@"yyyy-MM-dd"];
[self makeFull:startTime End:endTime List:calendarList];[monthView setupData:calendarList];
```## Installation
FSAttendanceTable is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod 'FSAttendanceTable'
```## Author
[clistery](cai1083088795@gmail.com)
## License
FSAttendanceTable is available under the Apache License. See the LICENSE file for more info.