content top

RDAR: UITableView registerNib crashes if NIB has more than one object

RDAR: UITableView registerNib crashes if NIB has more than one object

iOS 5 introduced a new API that you can use to register a NIB to be used with cells. [self.tableView registerNib:[UINib nibWithNibName:@"RMMenuCell" bundle:nil] forCellReuseIdentifier:@"RMMenuCell"]; [self.tableView registerNib:[UINib nibWithNibName:@"RMMenuCell" bundle:nil] forCellReuseIdentifier:@"RMMenuCell"]; When you register a nib, the dequeue method is...

Read More

Objective-C: Showing meaningful error alerts

A very trivial, yet often overlooked property of NSError is the localizedDescription and localizedRecoverySuggestion property. Most Objective-C frameworks whether Apple’s own SDK or third party frameworks use a NSError out reference to communicate errors to the caller. To give you an example, take the NSJSONSerialization class. Parsing JSON from a data (say response data from a NSURLConnection) can fail if the JSON is malformed. id...

Read More

iOS Programming training courses in Singapore

After my book got pretty good reviews, I’ve been approached by clients to do online courses for their employees. Taking it to the next level, I’m expanding my consulting business to focus on training. Announcing today, iOSTraining.sg, a classroom based training in Singapore for prospective and amateur developers. iOS programming isn’t easy. (Would you believe if we told you otherwise?) You can’t learn it without prior...

Read More

Software patents: the good, the bad and the ugly

Ok, there is almost a war in the between Apple and Google “fanbois” because Apple used patent suit to block sales of Samsung’s Galaxy Nexus. Before we comment on this, allow me to explain a bit. What is a patent? Wikipedia describes it as an intellectual property to which the inventor is granted exclusive rights for a limited period of time. A patent is a form of intellectual property. It consists of a set of exclusive...

Read More

iOS Tip: Informing the user of your intent to use their location

iOS Tip: Informing the user of your intent to use their location

If you ever use location services in your app, consider using CLLocationManager’s purpose text field to set a string that says why exactly your app requires location information. This goes a long way in convincing the user as to why they need to provide you with their location information. The image below shows a blank location request alert. When you set the CLLocationManager’s purpose property, self.locationManager =...

Read More
Page 5 of 26« First (1)...34567...1020...Last »
content top