Q: scrollView setContentOffset crashes when accessing method from another file I have a HomeView class with scrollView IBOutlet and a function the changes the offset of the scrollView: 
scrollView.setContentOffset(CGPoint(x: self.view.frame.width * 2, y: 0), animated: true)

From the FeedView class I attempt:
let Home = HomeView()
Home.ScrollRight()

But I get this error:
fatal error: unexpectedly found nil while unwrapping an Optional value


A: Because your HomeView created by either XIB or Story board. Thats why below line return nil object.  
let Home = HomeView()

If you want to call ScrollRight() method of HomeView from another class then declare global variable of HomeView like 
var homeVC = HomeView()

and in viewDidMethod of HomeView
homeVC = self as HomeView

not you can access homeVC from anywhere 
and just call method by 
homeVC.ScrollRight() 

from another viewController.  
=======================================
EX
import UIKit
var homeVC = HomeVC()

class HomeVC: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        homeVC = self as HomeVC
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
    }
}

Now you can use homeVC object and access property of HomeVC anywhere.
NOTE:
If you are calling function from same viewController (HomeView) then you don't need to create object of that viewController. You can just simply call function by below like directly.
ScrollRight() OR self.ScrollRight()

A: If your scroll view is set up as an outlet it means it is created within your view controller's main view when said view controller is instantiated from a storyboard.
This code:
let Home = HomeView()

...at most instantiates the view controller itself, but it does not load its view (let alone wire the outlets to the appropriate subviews -in this case, your scroll view).
Please read about view controller view life cycle. It's all in Apple's programming guides and countless tutorials online.
