uitableview

Variable UITableCellView height with subview

Hi everyone, I want to create a UITableView with varying row heights, and I'm trying to accomplish this by creating UILabels inside the UITableViewCells. Here's my code so far: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *MyIdentifier = @"EntryCell"; UITabl...

Using Interface Builder for UITableView's

I'm very early in the iPhone development learning process. I'm trying to get my head around various pieces. Right now I've just taken the basic NavigationController template and I'm trying to create a simple grouped table view with a couple of text fields. What I can't seem to do is to get Interface Builder to allow me to drop a UITab...

UITableView didSelectRow while editing?

Hi, I'm building an interface much like the built-in Weather application's flipside view, or the Alarms view of the Clock application in editing mode. The table view is always in editing mode, so the delete icon appears on the left side of each cell. When the table view is in editing mode, my delegate doesn't receive didSelectRowAtInde...

How can I disable the UITableView selection highlighting?

When you tap a row in a UITableView, the row is highlighted and selected. Is it possible to disable this so tapping a row does nothing? ...

Is there a way to control the animation on a UITableView scrollToRowAtIndexPath?

I would like to modify the animation duration and attach a callback to be called when the animation finishes when calling scrollToRowAtIndexPath with animated:YES but I can't find a handle to its animation proxy or any other way to do it. Anyone know if this is possible? ...

UIImageView not displaying in UITableView header

My problem is that I can't seem to get the image from my bundle to display properly. This method is in the view controller that controls the tableview. headerView is loaded with the tableview in the .nib file and contains a few UILabels (not shown) that load just fine. Any ideas? - (void)viewDidLoad { [super viewDidLoad]; [[sel...

Using a UITableViewController with a small-sized table?

When using a UITableViewController, the initWithStyle: method automatically creates the underlying UITableView with - according to the documentation - "the correct dimensions". My problem is that these "correct dimensions" seem 320x460 (the iPhone's screen size), but I'm pushing this TableView/Controller pair into a UINavigationControll...

Can I use -selectRowAtIndexPath: (or anything else) on a UITableView to trigger delegated -didSelectRowAtIndexPath: method?

I have a UITableView set up as a navigation controller type deal (like the default in Xcode). I have added an "Add" button which adds an element to the UITableView. When I call -selectRowAtIndexPath: on this new row I just added, it will highlight the row, but the next view is not pushed onto the stack. I assume this is because -selectRo...

What's the UITableView index magnifying glass character?

In Apple's iPhone apps (like Contacts), they have a nice magnifying glass icon at the top of the table view index. Since the table view index API is character-based, I assume that this magnifying glass is a Unicode character. So far I've resorted to placing a question mark character there, but that looks lame. Can anyone tell me what ch...

How do I make UITableViewCellAccessoryDisclosureIndicator visible in black background?

Hi I wrote this cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; in this method - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath; but I can only see it when I select that cell otherwise it's not visible.and it work perfectly when background is white. I am sure t...

UITableView issue when using separate delegate/dataSource

General Description: To start with what works, I have a UITableView which has been placed onto an Xcode-generated view using Interface Builder. The view's File Owner is set to an Xcode-generated subclass of UIViewController. To this subclass I have added working implementations of numberOfSectionsInTableView: tableView:numberOfRowsInS...

How do I set UITableViewCellSelectionStyle property to some custom color?

I am developing an iPhone application, in my table view I wanted custom color for Cell Selection Style, I read the UITableViewCell Class Reference but there are only three constants defined for Selection style (Blue, Gray, None). I saw one application that used a different color than those defined in the reference. How can we use a colo...

Is there a better way to determine the right size for a UITableViewCell?

I have a UITableView cell that is going to have a variable size depending on it's content (potentially several lines of text). SInce it appears that heightForRowAtIndexPath is called before I layout the cell, I just guess the correct height by calling [NSString sizeWithFont] on my text string. Is there a better way to set the height af...

How to customize the background color of a UITableViewCell?

I would like to customize the background (and maybe the border too) of all of the UITableViewCells within my UITableView. So far I have not been able to customize this stuff, so I have a bunch of white background cells which is the default. Is there a way to do this with the iPhone SDK? ...

How do I remove the borders of a UITableView?

I have subclassed the UITableView control, and the style is grouped, but I do not need the cell separators. I tried setting my table view's separatorStyle to none, but it doesn't work. Can any one help me out? ...

UIButton in a UITableView header ignores most touches

I've got a button that I'm adding as a subview of a table view's tableHeaderView. The button appears fine, and tap-and-holding on it works intermittently - for the most part, though, it's unresponsive. I've tried adding it as a subview of the table itself; the effect is about the same. I thought the problem might be with the scroll view'...

How to reset the scroll position of a UITableView?

I would like to completely reset the scroll position of a UITableView, so that every time I open it, it is displaying the top-most items. In other words, I would like to scroll the table view to the top every time it is opened. I tried using the following piece of code, but it looks like I misunderstood the documentation: - (void)viewW...

Is it possible to configure a UITableView to allow multiple-selection?

Hey there, For the iPhone, is it possible to configure a UITableView such that it will allow multiple-selection? I've tried overriding -setSelected:animated: for each UITableViewCell, but trying to fudge the required behavior is tricky as it's difficult to separate the real unselections from the ones where the UITableView thinks I've u...

Exit Edit Mode

I have an array of objects which populate a UITableView. When a user removes the last object from the array, I automatically create a new "default" object. However, in the TableView, when the user gets there, the list is still in "Edit" mode. Is there a way for me to programatically set the TableView back to "normal" mode again? ...

Broken cell with an odd strikethrough?

I'm having a weird issue with a particular UITableView in my iPhone devel experience here. If you look at the following screenshot: you'll notice a strike through going through the middle of the 'Jane Aba' cell. Any idea what might be causing this odd graphic display? It's true for both the simulator and for the actual device runni...