Texture icon indicating copy to clipboard operation
Texture copied to clipboard

Result of 'collectionNode(_:nodeBlockForItemAt:)' has different optionality than expected by protocol

Open mycroftcanner opened this issue 4 years ago • 0 comments

Texture's documentation on UICollectionViewCell Interoperability and some of the sample projects suggests changing the return value type of nodeBlockForItemAt and nodeForItemAt to ASCellNodeBlock! and ASCellNode respectively.

It works really well if you want to initialise some nodes such as a ASCollectionNode in the foreground by just routing it to nodeForItemAt.

However it generates the following warnings:

Result of 'collectionNode(_:nodeBlockForItemAt:)' has different optionality than expected by protocol 'ASCollectionDataSource'

Result of 'collectionNode(_:nodeForItemAt:)' has different optionality than expected by protocol 'ASCollectionDataSource'

Is there anyway to silence the warning or change the swift protocols to return an optional?

mycroftcanner avatar Jul 09 '21 12:07 mycroftcanner