Learning iOS Development (Part 11) Custom UITableViewCell

azamsharp · 16K views · 2011 · 17:52

Open on YouTube

Software (other)Software practice, open source & careerstutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it when answering how to create and wire up a custom UITableViewCell from a xib or storyboard, especially when outlets are not connected correctly.

Recommended by 4 people across 4 different months, 2012 to 2013.

What it is

A 2011 screencast from the AzamSharp iOS series in which Mohammad Azam builds a custom UITableViewCell using Xcode 4.2 and Interface Builder. It walks through designing the cell in a NIB, subclassing UITableViewCell, and wiring up IBOutlets.

What people said

Recommends Thomson Comer · 2012-01 · Stack Overflow · on “UITextField text not changing on the UI”

Here's a movie on how to properly wire your IBOutlets for a custom UITableViewCell: [this video] I did not create this movie.

Recommends Rich Apodaca · 2012-05 · Stack Overflow · on “ios steps to create custom UITableViewCell with xib file”

A video tutorial [this video] showing how to do this with Xcode 4.2 has been made. The author has written a blog post [LINK] as well.

Recommends Murtuza Kabul · 2012-10 · Stack Overflow · on “ios stuck at an exception while subclassing uitableviewcell”

I finally sorted it out. The problem was, I was applying the ActivePoolViewCustomCell class to the files owner of my custom cell nib which I should have been applying to the cell itself. this video helped me out to resolve it [this video]

Recommends anon · 2013-05 · Stack Overflow · on “How to create a UITableCell that has multiple subtitles”

You could do that easily by having a custom layout for the UITableViewCell. This video should help you in doing this: [this video] Basically you will need to design the UI of the cell in storyboard/NIB file and add multiple labels to your table cell there. Sub-class UITableViewCell and link it to the designed UITableViewCell in storyboard/NIB. Addd IBOulets in that class for the labels and link your labels from the UI to these IBOutlets.

Cites Thomson Comer · 2012-01 · Stack Overflow · on “UITextField text not changing on the UI”

You almost definitely forgot to connect the outlet for the UITextField in interface builder. Bring up the .xib file that that typeTextField is visible in, click on typeTextField, then show the Utility pane (the one on the far right in Xcode 4+). Click the Connections Inspector (the one that looks like a right arrow) and drag a New Referencing Outlet to your File's Owner. When you don't connect the UITextField you drew in Interface Builder with the IBOutlet that you identified in your source file, both UITextFields get created as separate entities. You can make changes and work with the valid typeTextField with a broken IBOutlet, but it'll never appear on your view. Consult How to connect an

Cites Ali · 2012-07 · Stack Overflow · on “Custom TableView and using didSelectRowAtIndexPath in iOS”

I have created a custom TableView by following this Custom UITableViewCell [this video] I creared a CustomerCell and then use it like this in ViewController: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { NSString *uniqueIdentifier = @"cutomerCell"; CustomerCell *cell = nil; cell = (CustomerCell *) [self.tableview dequeueReusableCellWithIdentifier:uniqueIdentifier]; Customer *customer = [self.customers objectAtIndex:[indexPath row]]; if(!cell) { NSArray *topLevelObject = [[NSBundle mainBundle] loadNibNamed:@"CustomerCell" owner:nil options:nil]; for(id currentObject in topLevelObject) { if([currentObject isKindOfClass:[CustomerCell class]]