Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Hyche committed Jun 16, 2020
1 parent e766e87 commit a8f98fe
Show file tree
Hide file tree
Showing 33 changed files with 54 additions and 3 deletions.
Binary file added .DS_Store
Binary file not shown.
Binary file added AdvancedTopics/Experimentation/.DS_Store
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,17 @@ class EHMultipleContentViewController: UIViewController {

// Now let's lay out the images left-to-right
let views = ["gil": imageViewGil, "steve": imageViewSteve, "tim": imageViewTim]
// These constraints are between the scroll view and a subview of the scroll view.
// So they are referring to the scrollView's content, not the scrollView itself.
let horzConstraints = NSLayoutConstraint.constraints(withVisualFormat: "H:|-[gil]-[steve]-[tim]-|",
options: .alignAllTop,
metrics: nil,
views: views)
NSLayoutConstraint.activate(horzConstraints)

// Now we just need to align the first image vertically.
// These constraints are between the scroll view and a subview of the scroll view.
// So they are referring to the scrollView's content, not the scrollView itself.
let vertConstraints = NSLayoutConstraint.constraints(withVisualFormat: "V:|-[gil]-|",
options: NSLayoutFormatOptions(rawValue: 0),
metrics: nil,
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Regular Width" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Dox-lu-DH7">
<rect key="frame" x="133" y="323" width="108.5" height="21"/>
<rect key="frame" x="330" y="501.5" width="108.5" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Regular Height" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YiT-cP-Fht">
<rect key="frame" x="130.5" y="363" width="113.5" height="21"/>
<rect key="frame" x="131" y="363" width="113.5" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
//: Playground - noun: a place where people can play

import UIKit
import PlaygroundSupport

class ScrollViewDelegate: NSObject, UIScrollViewDelegate {

func scrollViewDidScroll(_ scrollView: UIScrollView) {
print("scrollView.bounds = \(scrollView.bounds)")
}
}

let containerView = UIView(frame: CGRect(x: 0.0, y: 0.0, width: 512.0, height: 512.0))
containerView.backgroundColor = UIColor.lightGray

let scrollView = UIScrollView(frame: CGRect(x: 20.0, y: 20.0, width: 472.0, height: 472.0))
let scrollViewDelegate = ScrollViewDelegate()
scrollView.delegate = scrollViewDelegate

let image = UIImage(named: "tim-xlarge.jpg")
let imageView = UIImageView(image: image)
scrollView.addSubview(imageView)
scrollView.contentSize = image?.size ?? CGSize(width: 472.0, height: 472.0)

containerView.addSubview(scrollView)


PlaygroundPage.current.liveView = containerView
PlaygroundPage.current.needsIndefiniteExecution = true

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<playground version='5.0' target-platform='ios'>
<timeline fileName='timeline.xctimeline'/>
</playground>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Timeline
version = "3.0">
<TimelineItems>
</TimelineItems>
</Timeline>
Binary file not shown.
Binary file added Constraints/Experimentation/.DS_Store
Binary file not shown.
Binary file not shown.
Binary file added Constraints/Synthesis/NationalFlags/.DS_Store
Binary file not shown.
Binary file not shown.
Binary file added Constraints/Synthesis/XcodePanes/.DS_Store
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
</CommandLineArgument>
<CommandLineArgument
argument = "-_UIConstraintBasedLayoutPlaySoundOnUnsatisfiable YES"
isEnabled = "NO">
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "-_UIConstraintBasedLayoutPlaySoundWhenEngaged YES"
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added StackViews/Synthesis/ProfileForm/.DS_Store
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added StackViews/Synthesis/UUIDList/.DS_Store
Binary file not shown.
Binary file not shown.

0 comments on commit a8f98fe

Please sign in to comment.