Nach 7 bis Xcode 6.1 Beta 2 von Xcode 6 Beta aktualisieren, funktioniert die folgende nicht mehr:Xcode 6.1 Attribut Wörterbücher in Swift
let font = UIFont(name: "Arial", size: 16)
let colour = UIColor.redColor()
let attributes = [NSFontAttributeName: font, NSForegroundColorAttributeName: colour]
Ich habe speziell versucht das Wörterbuch als
erklärtlet attributes: [NSString : AnyObject] = [NSFontAttributeName: font, NSForegroundColorAttributeName: colour]
aber ich erhalte den Fehler "Can not convert ... 'Dictionary' in 'NSString!'". Die Deklaration des Schlüssels NSString!
statt NSString
beklagt, dass NSString!
nicht hashbar ist. Irgendwelche Hinweise?
für Xcode6.01 zum Spielplatz kopiert - es –
funktioniert der Code versagt in XCode 6.1 Beta 2. –
@MaximShoustin bestätigen - So Warum der Downvote? – Grimxn