let image:UIImage? = UIImage(named: "画像名") let imageView:UIImageView! = UIImageView(image:image) //画像縮小の場合 let screenWidthScale:CGFloat = self.view.bounds.width * 0.8 //画像の大きさに対して0.8倍 let scale:CGFloat = screenWidthScale / image.size.width imageView.frame = CGRectMake(self.view.bounds.width/2,self.view.bounds.height/2,image.size.width*scale,image.size.height*scale) //インスタンスビューに表示して一番前に表示 self.view.addSubview(lockBackground) self.view.bringSubviewToFront(lockBackground)