Converting a UIView to UIScrollView is now going to be like a child’s play. In this post, we will share with you the easiest way to make it happen.
Drag & drop a UIViewController to your storyboard and add a UIView to it.
Make an outlet of the view.
Go to view controller’s Identity Inspector and change class to UIScrollView
Resize your view to get scrolling effect
(self.urview as! UIScrollView).contentSize = CGSizeMake(self.view.frame.width, self.view.frame.height)
Compile and Run to see it working.
Isn’t it simple?