dom999999
dom999999

Reputation: 447

UIScrollView not scrolling all the way down

class ESA: UIViewController {

@IBOutlet var textScroll: UIScrollView!


override func viewDidLoad() {
    super.viewDidLoad()

    textScroll.scrollEnabled = true
    textScroll.contentSize = CGSizeMake (375, 1500)


}

override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()
    // Dispose of any resources that can be recreated.
}

}

My View controller is set to 1500 and so is the Scroll View. However, I can only scroll a little bit down (just under halfway). Any ideas what would be causing this?

Upvotes: 1

Views: 1544

Answers (1)

skind
skind

Reputation: 173

Check to make sure you don't have any constraints set to vertically fix the scrollview to the center. I had the same problem, but once I updated the constraints to simply be fixed 0 pixels from the top, it went from scrolling only half way down, to scrolling the entire way down.

Upvotes: 2

Related Questions