1
配列からカスタムクラスのelemntを削除し、私はそれから要素を削除する:私は何をサブクラス化しないカスタムクラス<code>Component</code>のオブジェクトの配列を持っている
var components: [Component] = [comp1, comp2, comp3]
components = components.filter({$0 != comp2}) // Error
エラー:
をBinary operator '!=' cannot be applied to two 'Component' operands
ありがとうございます。私はこの種のオペレータを迅速に見ています。 – Abdou023