Create NSIndexPath for UITableView in iPhone/iPad App
Contributed by qmchenry on April 2, 2010 under Computer programmingOnce you get past basic table view applications on the iPhone or iPad, you may run into the need to create an instance of NSIndexPath. NSIndexPath is an interesting class that stores the path to get to something in a nested set of collections. In an iPhone UITableView application, NSIndexPath is central as it provides a reference to the section of the table and the specific row of interest. There is a trick to creating an instance yourself. Read on to find out how.
3 comments Continue reading...Cocoa: Convert number to comma-separated NSString
Contributed by qmchenry on January 30, 2010 under C programmingAt some point in your Mac, iPhone, or iPad development you may find the need to express a long number (1000000000) as a comma-separated string (1,000,000,000) to make life easier on your users. The NSNumberFormatter class is a rich tool for converting numbers to strings supporting different types of currencies and localizations. It’s also the perfect class to leverage for our comma-ing task.
4 comments Continue reading...Our first iPhone game GreenThumb available in the App Store
Contributed by qmchenry on October 11, 2009 under GamesWe are giddy to announce the availability of our first game for the iPhone, GreenThumb. View the game at iTunes or try a full-featured, ad-supported FREE version! GreenThumb is an original, one-thumb casual game for the iPhone and iPod Touch. It is easy to pick up yet challenging to master.
5 comments Continue reading...
Using iPhone 3G S and iPhone 4 Voice Control Commands
Contributed by qmchenry on June 24, 2009 under Apple iPhoneApple’s latest hardware upgrade for the iPhone line, the iPhone 3G S, adds voice control capabilities. Without looking at the device, using voice control you can easily dial the phone using numbers or a contact’s name, and control the iPod with various commands. (Updated as these can be performed with iPhone 4 as well) Here are the details:
42 comments Continue reading...
iPhone SDK: Solve [UINavigationController pushViewController:] unrecognized selector sent to instance
Contributed by qmchenry on January 16, 2009 under Apple iPhoneI adore coding to the iPhone SDK. It’s the most joyful coding I’ve done in the quarter century (gasp!) I’ve spent coding various computer systems. It’s a combination of Objective-C (elegant) and Cocoa (beautiful). There is one exception I keep getting and just infrequently enough that I forget why I get it. I thought someone might benefit from this because it’s an easy trap to fall into.
17 comments Continue reading...
Cocoa: Explode or break an NSString into individual words
Contributed by qmchenry on October 20, 2008 under Computer programmingBreaking apart a string of text into component words is a requirement for performing searches in text and other text processing. This task is easy in Cocoa/Objective-C, although it requires digging through a few class references in the documentation. If you need a more complicated expansion of a string, at least this code will give you a starting point.
3 comments Continue reading...
iPhone Programming: Set UITableView Accessory Arrow Style
Contributed by qmchenry on October 12, 2008 under Apple iPhoneThe iPhone SDK provides an easy-to-code standard for creating consistent user interfaces. The UITableView class is used in many iPhone applications. Most applications that present information to you in rows that you can tap to slide a new page over to see details use a UITableView to do the magic. Once you have a UITableView setup, you can easily add the little accessory arrow icons to the right side of the table cells by following the steps in this Tech-Recipe.
13 comments Continue reading...QMCHENRY'S TOP TEN
- XP: kill a Windows process from the command line with taskkill
- Solve: Can't connect to local MySQL server through socket /tmp/mysql.sock
- XP: Repair or fix master boot record using recovery console
- Add a column to an existing MySQL table
- Mount an ISO file in Linux
- Create a Symbolic Link in UNIX
- Remove ^M characters at end of lines in vi
- Get Latitude and Longitude values from Google Maps
- JSP basics: import a Java class for use in a JSP
- bash shell script iterate through array values
- View our Top Tens
TECH-RECIPES BLOGS
- Symfony Propel 1.4: New Project Workflow
- quickie: video on adding 3G modem to a Thinkpad Tablet
- modding: adding 3G to my Lenovo Thinkpad Tablet
- quick look: Lenovo Thinkpad Tablet (Honeycomb) and Pen (pics)
- design: my geek lair
- How to Delete Your Twitter Account
- Flash Error May Slow Down OS X Lion
- Mass Effect: Cannot See Mouse Pointer



