UIImageView – How to get file name of image assigned
Problem And Question Is it possible to read the name of an UIImageView's UIImage that’s presently stored in the UIImageView? I was hoping you could do something kind of like this, but haven’t figured...
View ArticleNSXMLParser on iPhone, how do i use it given xml file (newb here :\)
Problem And Question Hey guys, was wondering how do i use the NSXML parser. so lets say given i have a simple xml file with elements like 1/1/1000 14:15:16 How could i use the NSXMLParser to parse the...
View Articleset your Cocoa application as default web browser
Problem And Question How do you set your Cocoa application as the default web browser? I want to create an application that is launched by default when the user clicks on an HTTP or HTTPS link in other...
View Articleperform Callbacks in Objective-C
Problem And Question I am a beginner programmer in Objective-C. Can anyone please tell me how to perform call back functions in Objective-C. I would just like to see some completed examples and I...
View Articlesave NSImage as new file
Problem And Question How can I save a NSImage as a new file (png, jpg, …) in a certain directory? Thank you for answering my “noobish” question. Best Solution And Answer Do something like this:...
View Articleremove from NSMutableArray while iterating
Problem And Question In Cocoa, if I want to loop through an NSMutableArray and remove multiple objects that fit a certain criteria, what’s the best way to do this without restarting the loop each time...
View Articlemake and use Queue in Objective-C
Problem And Question I want to use a queue data structure in my Objective-C program. In C++ I’d use the STL queue. What is the equivalent data structure in Objective-C? How do I push/pop items? Best...
View ArticleCan I edit pixels of UIImage’s property CGImage
Problem And Question UIImage has a read-only property CGImage. I have to read its pixels to a memory block and edit them and then make a new UIImage to replace the old one. I want to know if there is a...
View ArticleDo you need to create NSAutoreleasePool within block in GCD
Problem And Question Normally, if you spawn a background thread or run an NSOperation on an NSOperationQueue you need to create an NSAutoreleasePool for that thread or operation because none exists by...
View ArticleImplementing 30 day time trial
Problem And Question Question for indie Mac developers out there: How do I implement a 30-day time trial in a non-evil fashion? Putting a counter in the prefs is not an option, since wiping prefs once...
View Article