Please note, this blog entry is from a previous course. You might want to check out the current one.
The lecture starts with additional information on how to control the appearance of a view in different size classes and how to inspect constraints in various size classes.
Scroll Views
Adding sub views to a scroll view works similar like adding views to any other view. The only important difference is to define the content size of the scroll view:
scrollView.contentSize = CGSize(width: 3000, height: 2000) logo.frame = CGRect(x: 2700, y: 50, width: 120, height: 180) scrollView.addSubview(logo) aerial.frame = CGRect(x: 150, y: 200, width: 2500, height: 1600) scrollView.addSubview(aerial)
Continue reading “cs193p – Lecture #9 Scroll View and Multithreading”