Suchergebnisse für Anfrage "swift-protocols"

4 die antwort

Wie überprüfe ich, ob eine Variable eines Typs ein Array ist?

Ich habe versucht, ein schnelles Protokoll-Array als ein beliebiges Array zu verwenden, aber es ist fehlgeschlagen. protocol SomeProtocol: class{ } class SomeClass: NSObject, SomeProtocol{ } let protocolArray: [SomeProtocol] = [SomeClass()] let ...

2 die antwort

Non - Die Methode '@ objc' erfüllt nicht die optionale Anforderung des '@objc'-Protokolls

ÜberblickIch habe ein Protokoll P1, das eine Standardimplementierung einer der optionalen Objective-C-Funktionen bereitstellt.Wenn ich eine Standardimplementierung der optionalen Funktion bereitstelle, wird eine Warnung angezeigtCompiler ...

TOP-Veröffentlichungen