https://github.com/lessica/minidateview
A mini date view that presents day-of-month, weekday, and month-of-year.
https://github.com/lessica/minidateview
Last synced: 8 months ago
JSON representation
A mini date view that presents day-of-month, weekday, and month-of-year.
- Host: GitHub
- URL: https://github.com/lessica/minidateview
- Owner: Lessica
- License: mit
- Created: 2016-03-29T16:46:59.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-03-30T09:10:47.000Z (almost 10 years ago)
- Last Synced: 2025-07-07T12:43:14.894Z (8 months ago)
- Language: Objective-C
- Size: 79.1 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MiniDateView
[](https://travis-ci.org/i_82/MiniDateView)
[](http://cocoapods.org/pods/MiniDateView)
[](http://cocoapods.org/pods/MiniDateView)
[](http://cocoapods.org/pods/MiniDateView)
A simple Chinese style mini date view.
## Screenshot
[](https://raw.githubusercontent.com/Lessica/MiniDateView/master/QQ20160330-0%402x.png)
## Usage
To run the example project, clone the repo, and run `pod install` from the Example directory first.
### Create
```Objective-C
// Its width and height cannot be adjusted.
MiniDateView *dateView = [[MiniDateView alloc] initWithFrame:CGRectMake(100, 100, 0, 0)];
dateView.tintColor = [UIColor grayColor];
self.dateView = dateView;
[self.view addSubview:dateView];
```
### Redraw
```Objective-C
// Refresh date
self.dateView.date = [[NSDate date] dateByAddingTimeInterval:86400];
[self.dateView setNeedsDisplay];
```
## Requirements
- iOS SDK 9.0+
- Xcode
- Cocoapods
- This spec needs ARC.
## Installation
MiniDateView is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:
```ruby
pod "MiniDateView"
```
## Author
i_82, i.82@qq.com
## License
MiniDateView is available under the MIT license. See the LICENSE file for more info.