Route setDelegate: to setAsyncDelegate: (#3007)

* Make ASTableView/ASCollectionView delegate/dataSource unavailable, route setDelegate: to setAsyncDelegate:

* Remove deprecated method from example

* Drop down from unavailable to deprecated
This commit is contained in:
Adlai Holler
2017-02-09 15:20:26 -08:00
committed by GitHub
parent e338098e4f
commit 5c8818d107
5 changed files with 16 additions and 17 deletions

View File

@@ -228,17 +228,6 @@ class MosaicCollectionViewLayoutInspector: NSObject, ASCollectionViewLayoutInspe
return ASSizeRange.init(min: CGSize.zero, max: layout._headerSizeForSection(section: atIndexPath.section))
}
/**
* Asks the inspector for the number of supplementary sections in the collection view for the given kind.
*/
func collectionView(_ collectionView: ASCollectionView, numberOfSectionsForSupplementaryNodeOfKind kind: String) -> UInt {
if (kind == UICollectionElementKindSectionHeader) {
return UInt((collectionView.dataSource?.numberOfSections!(in: collectionView))!)
} else {
return 0
}
}
/**
* Asks the inspector for the number of supplementary views for the given kind in the specified section.
*/
@@ -251,6 +240,6 @@ class MosaicCollectionViewLayoutInspector: NSObject, ASCollectionViewLayoutInspe
}
func scrollableDirections() -> ASScrollDirection {
return ASScrollDirectionVerticalDirections;
return ASScrollDirectionVerticalDirections
}
}