mirror of
https://github.com/Instagram/IGListKit
synced 2026-05-23 17:28:22 +00:00
Use type checking instead of casting in README
Summary: Just a little improvement to a code example. - [x] All tests pass. Demo project builds and runs. - [x] I added tests, an experiment, or detailed why my change isn't tested. - [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/CONTRIBUTING.md) Closes https://github.com/Instagram/IGListKit/pull/45 Reviewed By: jessesquires Differential Revision: D4002830 Pulled By: rnystrom fbshipit-source-id: b6fb8f87752f0886333c4445107caac8219027e9
This commit is contained in:
parent
e15311a0a2
commit
f833986df2
1 changed files with 1 additions and 1 deletions
|
|
@ -78,7 +78,7 @@ func objectsForListAdapter(listAdapter: IGListAdapter) -> [IGListDiffable] {
|
|||
|
||||
func listAdapter(listAdapter: IGListAdapter,
|
||||
sectionControllerForObject(object: Any) -> IGListSectionController {
|
||||
if let _ = object as? String {
|
||||
if object is String {
|
||||
return LabelSectionController()
|
||||
} else {
|
||||
return NumberSectionController()
|
||||
|
|
|
|||
Loading…
Reference in a new issue