Can't use delegates with UIView
I followed the excellent tutorial for how to switch views found at http://www.iphonedevcentral.org/tutorials.php?page=ViewTutorial&id=52&ui...
I was able to successfully setup an application with a single controller and toggle between multiple view. My next step is to display the longitude and latitude on a specific view. Ran into a gotcha.
Using the LocateMe iphone location, I installed the MyCLController and set this controller as the delegate to my view. The problem is just that, delegates can't be assigned or used in a view. They have to be part of the controller.
What may be wrong is that the initial tutorial above is putting lots of logic in the view, when it should be in the controller. It was an excellent tutorial, but may lead someone to bad design decisions.

Comments
Post new comment