1.解包包装类型,只需要尾部加! 2.初始化赋值必须保证变量是包装类型 var str : String? = nil 转载于:https://www.cnblogs.com/iOSboyYang/p/5550700.html