I have view controller and a custom object that will return a view with buttons. I to set the button's target to a method on the view controller. I just want this object to create the view i want and then return it for me to addSubview:
.
CreateView.m
//create button
[button addTarget:(view controller) action:@selector(buttonMethod) forControlEvents:UIControlEventTouchUpInside];
How can i do this? Pass the view controller's self to the method?