I have a ViewController with a ScrollView in it, which has 2 ContainerViews in it. Now, every ContainerView loads a ViewController. And in this ViewControllers (SubController from the ContainerViews) its impossible to do Outlets. I get the little circles at the outlets, so the reference exists, but setting the text of a label for example, always results in the following error:
fatal error: unexpectedly found nil while unwrapping an Optional value
I've done the connection 10 times, with all possible names. Restarted xcode multiple times, still not working.
This answer could help: https://stackoverflow.com/a/28479934/2414069
EDIT: (below code is pseudo, everything is in the place it should..)
@IBOutlet weak var pinInfo_name: UILabel!
@IBOutlet weak var pinInfo_address: UITextView!
@IBOutlet weak var pinInfo_comment: UITextView!
self.pinInfo_name.text = defaults.stringForKey("activePin_name")!
self.pinInfo_address.text = defaults.stringForKey("activePin_address")!
self.pinInfo_comment.text = defaults.stringForKey("activePin_comment")!
SOULUTION: Ok I slept about it, and found my error within 10 minutes: I wanted to change the .text properties from a object I created in another ViewController. I still have no Idea how to do that, buts thats a story for another time.
tl dr
Access right