I have a ViewController:
class graphicViewController: UIViewController {
var pathToFile = "" //it's changed in method PrepareForSegue from previous ViewController
}
and I have a View:
class graphicView: UIView {
var ltr:String?
override func drawRect(rect: CGRect) {
println(ltr!)
}
}
How and where should I implement access/transfer of variable pathToFile that it must not be null in drawRect?
graphicViewthe type view in yourgraphicViewController?graphicViewis the subview ofgraphicViewController. I can access graphicView like this:graphicViewController.view as graphicView