I want a PageViewController that just has one constant background. Kind of similar to the tutorial in Evernote's iOS app.
I was thinking about making the UIPageViewController's background transparent and each view in the page controller transparent as well but I don't think its working.
Any ideas?
On your UIPageViewController add the UIImageView definition on top (Swift):
var imageView: UIImageView?
And then in viewDidLoad: add:
imageView = UIImageView(image: UIImage(named: "background")!)
imageView!.contentMode = .ScaleAspectFill
view.insertSubview(imageView!, atIndex: 0)
I've made some edits and added some notes to your project which can be found here
Just reiterating those notes:
.ScaleAspectFit to avoid image distortion..ScaleAspectFill if your image's aspect ratio differs from the view's aspect ratioMain.storyboard, i've removed the tutorialViewController's view background image and set the background color to .clearColor()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With