Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby-on-rails-4/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios Swift:在Swift代码中,头像图像是必需的_Ios_Uiimageview_Uibutton_Swift2_Uialertview - Fatal编程技术网

Ios Swift:在Swift代码中,头像图像是必需的

Ios Swift:在Swift代码中,头像图像是必需的,ios,uiimageview,uibutton,swift2,uialertview,Ios,Uiimageview,Uibutton,Swift2,Uialertview,默认情况下,“无配置文件图像”设置为imageview,用户应在注册时强制上载配置文件图片,否则用户不应允许导航到下一屏幕。任何帮助都是值得欣赏的。 这是我的密码 lazy var profileLogo:UIImageView = { let profileLogo = UIComponentFactory.appImageView(UIImage(named: "no-profile-image")!, contentMode: .ScaleToFill, cornerRad

默认情况下,“无配置文件图像”设置为imageview,用户应在注册时强制上载配置文件图片,否则用户不应允许导航到下一屏幕。任何帮助都是值得欣赏的。 这是我的密码

lazy var profileLogo:UIImageView = {
        let profileLogo = UIComponentFactory.appImageView(UIImage(named: "no-profile-image")!, contentMode: .ScaleToFill, cornerRadius: LayoutService.width(15))
        profileLogo.userInteractionEnabled = false
        return profileLogo
    }()
 func nextButtonPressed() {
let noImage = UIImage(named: "no-profile-image")
            if self.mainView.profileLogo.image == nil && self.mainView.profileLogo.image == noImage{
                displayAlert("", message: "profile picture is mandatory, please upload it")
}
 }