Category: Objective-C Tutorials

Objective-C Tutorials

How to show and hide (toggle) UITableview sections on the fly

Some time ago I had written a post about how to use UITableView cells and make them work as a drop-down list. Anyone who had read that post might understood that when working with UITableViews you can do things more than the usual and common ones, and you can go as far as your imagination and the technology let you go. Indeed, when knowing how to work with UITableViews in a more advanced level, then you can create more flexible apps that make your users happier.

Keep Reading...
Objective-C Tutorials

How to import contacts from the Address Book – Part 2

Welcome to the second part of this tutorial! At the first part we talked about a couple of things on how to import contacts from the device’s Address Book and we developed a demo app to see everything in action. What we really did, was to let us tap on a contact’s name, return back to our app and then select specific pieces of information regarding the selected contact, which we displayed on a table view.

Keep Reading...
Objective-C Tutorials

UITableView: Display and hide cells as a dropdown list

When creating iOS applications, the need to pick a value from a list while displaying an UITableView comes up quite often. One obvious solution to that matter, and the hard one in most cases, is to load another UIView which may contain an UIPickerView or an UITableView that will list the values you need, let the user pick the value and then get back into your table and set the picked (by the user) value. Another solution, more attractive and probably easier for the user is to display the list you need inside the UITableView that’s been shown. Perhaps that approach sounds more difficult, but once you try it you’ll find out yourself how fast, easy and beautiful solution is.

Keep Reading...
Objective-C Tutorials

Input Accessory View (How to add extra controls above keyboard)

When building iPhone applications that support or provide text input, it’s often necessary to create some extra buttons (or other controls) beyond the ones provided by the default keyboard interface. Those buttons should be created for specific operations needed by your application, such as moving to the next or previous text field, make the keyboard disappear e.t.c. To understand what exactly this is all about, just see what’s happening when you are using the Safari browser and you type username/password values to login in your e-mail account. Just right above the keyboard, there are two buttons that allow you to move to the next or previous field and a third button that allows you to close the keyboard and see the whole browser again.

Keep Reading...
Objective-C Tutorials

UIPickerView – Add it programmatically

It is often needed to give the user the ability to choose among various options when creating an application. In that case, the UIPickerView it’s a nice (and many times the best) choice to do that. The UIPickerView can be easily created using the Interface Builder, but unfortunately Apple doesn’t allow us to change its height through IB. Besides that, sometimes there is the need to create it and place it on-screen manually (programmatically) for a lot of reasons.

Keep Reading...