Image 一个故事板中的谷歌账户图像显示了,但没有显示';t在另一个故事板中显示
在我的应用程序中添加了谷歌登录-我有不同的故事板用于iPhone4或4s,另一个用于iPhone5-5c-5s-se,另一个用于iPhone6-6s-7,另一个用于iPhone6plus-6splus-7plus 我的问题是,除了iPhone 6plus-6splus-7plus的故事板,我可以在所有的故事板中看到个人资料图片 我收到了如下错误:Image 一个故事板中的谷歌账户图像显示了,但没有显示';t在另一个故事板中显示,image,swift3,user-profile,googlesigninaccount,Image,Swift3,User Profile,Googlesigninaccount,在我的应用程序中添加了谷歌登录-我有不同的故事板用于iPhone4或4s,另一个用于iPhone5-5c-5s-se,另一个用于iPhone6-6s-7,另一个用于iPhone6plus-6splus-7plus 我的问题是,除了iPhone 6plus-6splus-7plus的故事板,我可以在所有的故事板中看到个人资料图片 我收到了如下错误: fatal error: unexpectedly found nil while unwrapping an Optional value 2017
fatal error: unexpectedly found nil while unwrapping an Optional value
2017-04-19 10:29:27.083269 Tipo[7327:3648156] fatal error: unexpectedly found nil while unwrapping an Optional value
这是我的代码(代码很长,所以我把代码放在图片上)
请记住,此代码正在运行,我可以在模拟器和iPhone(如6-6s-7-5-4)中看到配置文件图像,问题仅限于iPhone plus size
这是错误的图片
if GIDSignIn.sharedInstance().currentUser.profile.hasImage
{
print("Account Has Image")
print("\(personalImage)")
////Profile Photo
let dimension = round(200 * UIScreen.main.scale)
let pic = GIDSignIn.sharedInstance().currentUser.profile.imageURL(withDimension: UInt(dimension))
self.personalImage?.image = UIImage(data: NSData(contentsOf: pic!)! as Data)
}