Hello everyone:
I'm sure someone has come across this at one time or another and hopefully can help.
I have a UITableView for which I have created a custom view for each row. The custom view is created in another class (which implements a UIView) which includes two images, a label, and a detaildisclosurebutton.
The view displays just fine, the problem I have run into comes in when the user pushes the detaildisclosurebutton. The program should push another view controller onto the view controller stack then display it.
I'm having a hard time trying to do this because since the button is created in the seperate view class, the button push is also handled there and I either cannot push the new view controller onto the view controller stack (because it implements a UIView and not a UIViewController) or there's some way of doing it that I'm not aware of. It would seem that no matter what you do, you need a reference to the rootviewcontroller which seems like it would end up being a cyclical reference.
Should I add a reference to the rootviewcontroller in the custom UIView class and push it that way? (which seems a little messy) Or is there a better way of doing something like this? I can see that this issue can come up in the future and I would like to get the accepted method for doing this.
Thanks,
Joe
I'm sure someone has come across this at one time or another and hopefully can help.
I have a UITableView for which I have created a custom view for each row. The custom view is created in another class (which implements a UIView) which includes two images, a label, and a detaildisclosurebutton.
The view displays just fine, the problem I have run into comes in when the user pushes the detaildisclosurebutton. The program should push another view controller onto the view controller stack then display it.
I'm having a hard time trying to do this because since the button is created in the seperate view class, the button push is also handled there and I either cannot push the new view controller onto the view controller stack (because it implements a UIView and not a UIViewController) or there's some way of doing it that I'm not aware of. It would seem that no matter what you do, you need a reference to the rootviewcontroller which seems like it would end up being a cyclical reference.
Should I add a reference to the rootviewcontroller in the custom UIView class and push it that way? (which seems a little messy) Or is there a better way of doing something like this? I can see that this issue can come up in the future and I would like to get the accepted method for doing this.
Thanks,
Joe