Skip to content
This repository has been archived by the owner on Nov 24, 2021. It is now read-only.

Releases: 3lvis/DATASource

DATASource — 5.5.0

13 Dec 08:59
Compare
Choose a tag to compare

Added support for custom headers: #45

More information was added in the documentation: https://github.com/3lvis/DATASource#custom-headers

DATASource — 5.4.0

09 Dec 15:14
Compare
Choose a tag to compare

Added additional delete to DATASourceDelegate to be notified when changes finish. Useful to check if your UITableView or UICollectionView is empty.

optional func dataSourceDidChangeContent(dataSource: DATASource)

Kicking ass addition by @guilhermekrz! #44

group-hug-o

DATASource — 5.3.0

27 Nov 10:21
Compare
Choose a tag to compare
func dataSource(dataSource: DATASource, collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, atIndexPath indexPath: NSIndexPath, withTitle title: AnyObject?) -> UICollectionReusableView?

Now returns AnyObject instead of String, since sectionName could be anything, not just strings.

DATASource — 5.2.0

27 Nov 09:38
Compare
Choose a tag to compare
  • Improved Collection view grouping, before when providing a sectionName the sorting would always be ascending. Now the sorting gets taken from the provided sort descriptors (this is also best practice). #40

DATASource — 5.1.0

25 Nov 09:16
Compare
Choose a tag to compare
  • Improved the delegate method that provides custom collection view headers to provide the title for the section.

Before

optional func dataSource(dataSource: DATASource, collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, atIndexPath indexPath: NSIndexPath) -> UICollectionReusableView

After

optional func dataSource(dataSource: DATASource, collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, atIndexPath indexPath: NSIndexPath, withTitle title: String) -> UICollectionReusableView

As a result the before method has been deprecated.

DATASource — 5.0.3

18 Nov 15:54
Compare
Choose a tag to compare
  • Improve safety on objectAtIndexPath

DATASource — 5.0.2

06 Nov 07:28
Compare
Choose a tag to compare
  • Improve support for disabling section indexes
  • Fixed a typo where a protocol would say DATASource instead of DataSource

5.0.1

26 Oct 08:23
Compare
Choose a tag to compare
  • Added support for tvOS

Previously on 5.0.0

  • Rewritten in Swift, this has improved Swift compatibility by 78%*

Breaking changes

  • Moved parameters so it's more consistent
init(tableView: UITableView, fetchRequest: NSFetchRequest, mainContext: NSManagedObjectContext, sectionName: String? = default, configuration: (cell: UITableViewCell, item: NSManagedObject, indexPath: NSIndexPath) -> (), cellIdentifier: (indexPath: NSIndexPath) -> (String))

init(collectionView: UICollectionView, fetchRequest: NSFetchRequest, mainContext: NSManagedObjectContext, sectionName: String? = default, configuration: (cell: UICollectionViewCell, item: NSManagedObject, indexPath: NSIndexPath) -> (), cellIdentifier: (indexPath: NSIndexPath) -> (String))
  • Made fetchedResultsController private, added convenience methods to access its data
var objectsCount: Int { get }

var isEmpty: Bool { get }

var objects: [NSManagedObject] { get }

func objectAtIndexPath(indexPath: NSIndexPath) -> NSManagedObject?

func indexPathForObject(object: NSManagedObject) -> NSIndexPath?

func fetch()

Example:

if self.dataSource.isEmpty {
    // Is empty, do something
}
  • Random number, made up. I know Swift compatibility is better but I don't know for how much 😊

Swift release

17 Oct 21:54
Compare
Choose a tag to compare
  • Rewritten in Swift, this has improved Swift compatibility by 78%*

Breaking changes

  • Moved parameters so it's more consistent
init(tableView: UITableView, fetchRequest: NSFetchRequest, mainContext: NSManagedObjectContext, sectionName: String? = default, configuration: (cell: UITableViewCell, item: NSManagedObject, indexPath: NSIndexPath) -> (), cellIdentifier: (indexPath: NSIndexPath) -> (String))

init(collectionView: UICollectionView, fetchRequest: NSFetchRequest, mainContext: NSManagedObjectContext, sectionName: String? = default, configuration: (cell: UICollectionViewCell, item: NSManagedObject, indexPath: NSIndexPath) -> (), cellIdentifier: (indexPath: NSIndexPath) -> (String))
  • Made fetchedResultsController private, added convenience methods to access its data
var objectsCount: Int { get }

var isEmpty: Bool { get }

var objects: [NSManagedObject] { get }

func objectAtIndexPath(indexPath: NSIndexPath) -> NSManagedObject?

func indexPathForObject(object: NSManagedObject) -> NSIndexPath?

func fetch()

Example:

if self.dataSource.isEmpty {
    // Is empty, do something
}
  • Random number, made up. I know Swift compatibility is better but I don't know for how much 😊

DATASource — 4.0.1

06 Sep 09:26
Compare
Choose a tag to compare
  • Indexed list wasn't been sorted correctly, and it wasn't respecting special characters #24

Previously on 4.0.0