Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- imgHorizon = UIImage.init(named:"horizon")!
- imgBezel = UIImage.init(named:"bezel_transparent")!
- imgWings = UIImage.init(named:"wings_transparent")!
- imgViewHorizon = UIImageView.init()
- imgViewBezel = UIImageView.init()
- imgViewWings = UIImageView.init()
- svHorizon = UIScrollView.init()
- super.init(coder: aDecoder)
- imgViewHorizon = UIImageView(frame: CGRect(x: 0, y: 0, width: imgBezel.size.width, height: imgHorizon.size.height))
- imgViewHorizon.backgroundColor = UIColor.red
- imgViewBezel = UIImageView(frame: CGRect(x: 0, y: 0, width: imgBezel.size.width, height: imgBezel.size.height))
- imgViewBezel.contentMode = UIViewContentMode.center
- imgViewBezel.clipsToBounds = true
- imgViewBezel.image = imgBezel
- imgViewWings = UIImageView(frame: CGRect(x: 0, y: 0, width: imgBezel.size.width, height: imgBezel.size.height))
- imgViewWings.contentMode = UIViewContentMode.center
- imgViewWings.clipsToBounds = true
- imgViewWings.image = imgWings
- svHorizon = UIScrollView(frame: CGRect(x: 0, y: 0, width: imgBezel.size.width, height: imgBezel.size.width))
- svHorizon.contentSize = CGSize(width: imgBezel.size.width, height: imgHorizon.size.height)
- svHorizon.contentMode = UIViewContentMode.scaleToFill
- svHorizon.bounces = false
- svHorizon.backgroundColor = UIColor.cyan
- svHorizon.contentOffset = CGPoint(x: 0, y: 0)
- svHorizon.addSubview(imgViewHorizon)
- addSubview(svHorizon)
- addSubview(imgViewBezel)
- addSubview(imgViewWings)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement