I’m pulling together a few utility methods for testing and I’d like to be able to pop up a view from within an arbitrary method – one that doesn’t necessarily know about any UIViewControllers or windows. Is this possible?
For example I’m preparing a custom location manager shim so that I can manually inject location data when I’m testing. I’d like some of the methods to pop up a MKMapView to allow me to select the “current location” instead of manually entering lat/long values in code.
Taking @vodkhang’s advice I took a peek at the code and created my own category (UIView+ShowThySelf) to pop up any arbitrary view from any method. For those interested it can be found on github
http://github.com/appsinyourpants/Pants-Framework