ios - Using Object Initializers in Swift to replace AllocWithZone -
i updated xcode xcode 7 beta 4 xcode 7 beta 5 , began have error wasn't present before. being: "allocwithzone unavailable in swift: use object initializers instead."
here code error found:
public func copywithzone(zone: nszone) -> anyobject { let copy = self.dynamictype.allocwithzone(zone) chartdataset copy.colors = colors copy.label = self.label return copy }
what substitute in place of ".allocwithzone" utilizes object initializer instead of obj c component?
i used this, , ios charts library works me:
let copy=self.dynamictype.initialize() as! chartdataentry
Comments
Post a Comment