Lors de la mise à jour des graphiques vers 3.0.4, cette erreur est obtenue dans Xcode 9.
Les autres erreurs sont :
Je suis également confronté à des erreurs dans la plupart des classes Charts après la mise à jour vers 3.0.4
Étiquette d'argument incorrecte dans l'appel (avoir 'withAttributes:', attendu 'attributes:')
J'ai aussi remarqué cela. Je le corrige en définissant la version de swift sur 4.0 dans les paramètres de construction des graphiques dans xcode
Je l'ai aussi corrigé. Merci
comment corriger dans un projet ObjectiveC ?
il devrait avoir la balise @objc à utiliser, alors mettez à jour votre code
attributs : [NSFontAttributeName : label.font]
Pour Swift 3, utilisez pod 'Charts','= 3.0.3'
Je suppose que cela devrait être corrigé dans ce cadre.
Au fait, si vous utilisez des pods :
J'ai rencontré ce problème avec v. 3.1.1
, j'utilise Swift 4.1
let att : [NSAttributedStringKey : Any] = [
NSAttributedStringKey(rawValue:
NSAttributedStringKey.font.rawValue) : UIFont.italicSystemFont(ofSize : 15.0
),
NSAttributedStringKey(rawValue:
NSAttributedStringKey.foregroundColor.rawValue) : Const.colorBlue500,
NSAttributedStringKey(rawValue:
NSAttributedStringKey.underlineStyle.rawValue) : 1]
let attributeString = NSMutableAttributedString(string:
"open_accessory_sheet".localize,
attributes: att)
Pour rapide 4 .
tu peux essayer de l'utiliser
Vào Je 7, 9 thg 6, 2018 vào lúc 02:43 Jose Manuel Vergara Florez <
[email protected]> ã viết :
J'ai rencontré ce problème avec la v. 3.1.1, j'utilise Swift 4.2
-
Vous recevez ceci parce que vous avez commenté.
Répondez directement à cet e-mail, consultez-le sur GitHub
https://github.com/danielgindi/Charts/issues/2816#issuecomment-395868392 ,
ou couper le fil
https://github.com/notifications/unsubscribe-auth/AMLGfjdadIXdyF4cgGGTCaYMQs1sz9CDks5t6tPcgaJpZM4PgNRb
.
let att : [NSAttributedStringKey : Any] = [
NSAttributedStringKey(rawValue : NSAttributedStringKey.font.rawValue) : UIFont.italicSystemFont(ofSize : 15.0),
NSAttributedStringKey(rawValue : NSAttributedStringKey.foregroundColor.rawValue) : Const.colorBlue500,
NSAttributedStringKey(rawValue : NSAttributedStringKey.underlineStyle.rawValue) : 1]
let attributeString = NSMutableAttributedString(string : "open_accessory_sheet".localize,
attributs : att)
Commentaire le plus utile
J'ai aussi remarqué cela. Je le corrige en définissant la version de swift sur 4.0 dans les paramètres de construction des graphiques dans xcode