Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nyg/datecellswift
Apple's DateCell code sample rewritten in Swift.
https://github.com/nyg/datecellswift
apple datecell swift
Last synced: 4 days ago
JSON representation
Apple's DateCell code sample rewritten in Swift.
- Host: GitHub
- URL: https://github.com/nyg/datecellswift
- Owner: nyg
- License: bsd-3-clause
- Created: 2017-07-25T16:58:15.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-07-25T17:20:11.000Z (over 7 years ago)
- Last Synced: 2024-11-12T01:35:29.509Z (2 months ago)
- Topics: apple, datecell, swift
- Language: Swift
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DateCellSwift
## Description
Apple's DateCell code sample rewritten in Swift in a much more configurable way. Check `rowCount` and `dateLabels` in the `TableViewController`.
```swift
// row count per section, here: 3 sections of 2, 5 and 2 rows each
let rowCount = [ 2, 5, 2 ]// index path of all the date label cells
var dateLabels = [
IndexPath(row: 1, section: 0),
IndexPath(row: 1, section: 1),
IndexPath(row: 3, section: 1),
IndexPath(row: 0, section: 2),
IndexPath(row: 1, section: 2) ]
```## Note
The index path shown in each cell may at time be incorrect because the cell was not refreshed. This is not an issue as in real applications we rarely display the index path to the user...
## Screenshot
![](http://i.imgur.com/pAFg2ap.png)