Tôi làm cách nào để khai báo URL nhanh chóng 3?Khai báo URL trong Swift 3
Đây là mã cố gắng của tôi:
var messageURL: URL = URL()
HOẶC
var messageURL: Foundation.URL = URL()
Đây là lỗi: Không thể gọi initializer cho loại 'URL' không có đối số
Dưới đây là một số tài liệu (Swift 3.0) từ Apple mà tôi đang gặp sự cố khi triển khai:
Properties whose name conflicts with Foundation types after removing their NS prefix will lead to module-qualified type names. For example, if there is a var URL: NSURL, it will be rewritten as var URL: Foundation.URL