In my project most of my code is in my UIView subclass. In this subclass i want to call Modal View Controllers functions. As I understand those functions need UIViewController subclass to run and not UIView, where my code currently is. (Runtime stops at warning: 'View' may not respond to -presentModalViewController:animated:'). My question is, what is the way to keep most of my code in UIView and move only part of Modal View Controllers functions into UIViewController?
Should i somehow move only those two functions:
[self presentModalViewController:picker animated:YES];
[[picker parentViewController] dismissModalViewControllerAnimated:YES];
What is then the way to call them in UIViewController from my UIView?
开发者_StackOverflow社区tnx
If I understand your question Miha you need to have everything in your view controller, not in the view itself. The view controller "controls" what views are shown.
精彩评论