[swift-users] CNLabeledValue var
German Laullon
laullon at gmail.com
Mon Jan 9 13:23:07 CST 2017
Hi All
I just upgrade to Swift 3. After open and convert my codes I found lots of
errors. One of them is about CNLabeledValue.
With Swift 2.3, it works well with:
var toExcludeOrCopy : CNLabeledValue?
With Swift 3, it gives me the error message:
Reference to generic type 'CNLabeledValue' requires arguments in <...>.
After I fixed it with XCode, it changed to:
var toExcludeOrCopy : CNLabeledValue<AnyObject>?
However, Xcode gives me error message with this fix:
Type 'AnyObject' does not conform to protocol 'NSCopying'.
I know the error is because of the generic type but I don't know how to
declare with CNLabeledValue. My purpose is to store any the CNLabeledValue
including phone number, email, address etc to one var.
Any help will be appreciate.
Germán Laullón
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20170109/0481cf4e/attachment.html>
More information about the swift-users
mailing list