Cannot call value of non-function type 'String'

前端 未结 6 1854
情书的邮戳
情书的邮戳 2021-01-17 07:35

I\'m trying to pass the ILTItem variable into my ILTViewController, triggered by AppDelegate.swift when the user launches my app via a deeplink.

The code I have erro

6条回答
  •  情深已故
    2021-01-17 07:40

    Had a similar issue in this code

    array.first { $0 == item }
    

    The problem was with $0 not conforming to Equatable protocol. In my case it conformed to NSObjectProtocol and simple pointer comparison was enough, so I fixed the issue with

    array.first { $0 === item }
    

提交回复
热议问题