This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
hello world!
RAN 42 2km
import UIKitimport CoreLocationimport Parse
class HomeViewController: UIViewController, UIScrollViewDelegate, LocationManagerDelegate { @IBOutlet weak var scrollView: UIScrollView! @IBOutlet weak var scrollerLeadingSpaceConstraint: NSLayoutConstraint! var locationManager = LocationManager.sharedInstance var currentLocation = CLLocation() weak var ViewControllerDelegate : setAsCurrentViewControllerDelegate? override func viewDidLoad() { super.viewDidLoad() locationManager.startLocationManager() } override func viewDidAppear(animated: Bool) { super.viewDidAppear(true) locationManager.LMDelegate = self } func scrollViewDidScroll(scrollView: UIScrollView) { self.scrollerLeadingSpaceConstraint.constant = self.scrollView.contentOffset.x/4; }}