I have created a custom UIViewController
with its view in a .xib file created in Interface Builder. The view looks like this:
The view has a UIButton
with a target-action pair. The action is a method in the view's view controller. I want to add this view to a UIScrollView
, so I created a simple custom view controller which just has as UIScrollView
in it. I added the first view controller's view as a subview to the scrollview and set the content size properly.
Everything now works fine, except that when I press the button the application crashes and the 'EXC_BAD_ACCESS' warning comes up with error code 2.
How can I solve this?