Skip to content

Commit

Permalink
Update Swift collection view interop example (TextureGroup#1837)
Browse files Browse the repository at this point in the history
* Update uicollectionviewinterop.md
  • Loading branch information
drinkius authored and rcancro committed May 28, 2020
1 parent 38a0cad commit 12027d9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/_docs/uicollectionviewinterop.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,14 @@ For this example, the data source method `collectionNode:nodeBlockForItemAtIndex
</pre>

<pre lang="swift" class = "swiftCode hidden">
// Click the "Edit on GitHub" button at the bottom of this
// Setting the return type to implicitly unwrapped optional
// helps overcome compiler error when trying to return nil
func collectionNode(_ collectionNode: ASCollectionNode,
nodeBlockForItemAt indexPath: IndexPath) -> ASCellNodeBlock! {
return optionalNode
}

// Click the "Edit on GitHub" button at the bottom of this
// page to contribute the swift code for this section. Thanks!
</pre>
</div>
Expand Down

0 comments on commit 12027d9

Please sign in to comment.