ios - How can I access UITextFields from outside the ViewController (from a .m file)? -
i have class keep utility methods; 1 of methods takes values in textboxes stored in viewcontroller , saves values plist.
the problem utility methods class not viewcontroller , therefore can't "hook up" outlet properties of textboxes tothe utility class.
is there way can pass viewcontroller parameter utility class method?
just make utilities class singleton inheriting nsobject. way can access methods wherever you'd , you'll have 1 instance of it.
matt gallagher wrote great helper file create singletons. check out here:
http://www.cocoawithlove.com/2008/11/singletons-appdelegates-and-top-level.html
Comments
Post a Comment