Category Archives: Programming
How to get the Return key to dismiss a UITextView
Need to dismiss they keyboard in a UITextView? Changing the Return key to read “Done” doesn’t make the iPhone keyboard to go away. Put this code in the delegate for your UITextView and your return key can behave more like … Continue reading
plist > JSON > XML
Having developed 4 or 5 iPhone apps now that download remote XML data from servers and populate tables view and other content, I can tell you without reservation that it is the slowest way to go. Performance using JSON is … Continue reading
How To Place a UIWebView inside a UIScrollView
To display several pieces of content on a screen, I needed several views. A scroll view (UIScrollView) was necessary to encompass the headline, photo and story text; I had the headline and photo at the top in a fixed area, … Continue reading
Making annotations fit on a Map View.
After struggling with formulae that convert degrees longitude and latitude to meters, I found a much better way to get annotations to fit on a Map View, thanks to this site: http://codisllc.com/blog/zoom-mkmapview-to-fit-annotations/
Helpful Core Data debugging
Core Data is really great, but if your app crashes without warning it can be a major headache. Replacing the default error handling code with this more involved approach saved me hours of time debugging: http://www.designcodeexecute.com/2009/08/28/iphone-sdk-coredata-debugging-error-1560-1570
Can not use an object as parameter to a method (Obj-C errors, part 2)
This is an easy one to seasoned X-coders, but one that tripped me up a few times when I first got started. BAD CODE: -(void) makePhotoFromImage: (UIImage )image; ERROR: can not use an object as parameter to a method TRANSLATION … Continue reading
Objective C compiler errors: translations for newbs
I’m pretty new at Xcode and Objective C, so there may not be a one-to-one correspondence here between errors and the most probable cause, but this helps me so it may help you. This will be a work in progress; … Continue reading
Dump mySQL database design into OmniGraffle
Check out this blog entry on Designweenie if you are a Mac user that uses OmniGraffle to design mySQL databases. One important note: you will need to run AppleScript Editor in 32-bit mode if you are using Snow Leopard (Mac … Continue reading
mySQL to SQLite cheatsheet for iPhone developers
Although I started writing this as a cheat-sheet for myself (after many hours of struggling with this by trial-and-error), I figured it would be helpful for other iPhone developers who’d like to take a mySQL database online and migrate it … Continue reading