uitableview

How do i change the location of the text in UITableView?

How do i change the location of the text AND show the FULL string in UITableView? Here is a screen shot of what I have, once you look at it you will know what I mean. Thanks ...

iPhone: How to wrap text in drawRect?

This is an iPhone question. How does one draw wrappped text in the drawRect method? I'm trying to use atebits' ABTableViewCell class to do custom drawing of a table view cell. I'd like to draw a small picture and then text next to it which may or may not need to line wrap. Think of the table cells in a Twitter client like Tweetie which s...

UITableViewCell's contentView's width with a given accessory type

On an iPhone, how do you figure out the width of a table view cell's content view when it is showing a certain accessory view (disclosure indicator, etc)? I need this in order to calculate the correct cell height for cells that contain wrapping, variable-length text. But when the table view delegate is asked for a cell height, it doesn...

How do I detect a touch in the iPhone status bar?

I have a UITableview that I would like to scroll to the top when the status bar is touched. I expected to find a notification that I could listen to and then use tableview:scrollToRowAtIndexPath: for the scroll, but can find none. Is there a way to do this? [Update] Finding some more on the net, I am suspicious that this is the simu...

How to delete a row in UITableView manually?

Here's what I've come up with: NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:1]; // my table view has 2 sections [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationTop]; Everytime I build and run, it throws the following exception: Invalid update: inval...

How to change a grouped UITableView cell's background to black (or non-white)?

Just want to make sure I'm not overlooking something obvious... It seems like it should be trivial to set the background color (black is fine) of a UITableView's cell to something other than white or completely transparent so that you can display your data with white text. However, with my attempts I lose the corners on my grouped table ...

UITableView - how to pass-through touches to parent view

I have this setup: UIView UITableView UIView The nested view is hidden initially and I want it to show up when user touches the table view anywhere, on cell, outside section - just about anywhere on the screen outside status/nav. bar. I added touchesBegan for the main view (in which I show the nested view) and when TableView is hi...

tableViewHeader rejecting multiple sub-views...

The tableViewHeader property of UITableView is a UIView so I thought I would be able to add multiple sub-views to it. However, when I added the code for the segmented control the UILabel a few lines before it doesn't draw. Rects shouldn't be overlaping each other. What am I doing wrong? - (void)viewDidLoad { [super viewDidLoad]; CGR...

iPhone: Requesting cellforrow for rows out of bounds

What did I do wrong? I just modified the Navigation Based application code a bit to read and display a JSON string. It crashes when I scroll up the list with the message Objc_msgSend and points at this as the problem: cell.textLabel.text=[[locations objectAtIndex: storyIndex] objectForKey: @"title"]; #import "RootViewController.h" #im...

Handling touchesBegan in UITableViewCell disables didSelectRowAtIndexPath

Hi, I'm implementing swipe gestures in my customtableviewcell control and so I hvae to implement touchesBegan event. I'm able to implement the swipes, but unfortunately, because the touchesBegan gets handled in the customcell, i'm not getting a didSelectRowAtIndexPath message on the tablecontroller. If the touchesBegan method is disabled...

iPhone Dev: Reload data of a table view from a child controller and another controller in a TabBar

Hi, I'm implementing a notes manager application which has a tableView in a tabBar where the main information of its notes is displayed. When accessing to one note, you can edit its properties. In one button of the tabBar you can choose the way the notes are displayed in the tableView. The problem I have is that I don't know how to re...

UITableView as a UIScrollView

I've been working with a UIScrollView and have about 200 items to scroll through...so far. This doesn't work since it takes around 45 seconds to load all of the views. I've tried loading the first 20 (about 4 seconds) on the main thread then load in blocks of 50 on other threads. I get the first 20 to scroll through but the others don...

Change iPhone tableview (style grouped) background color while preserving texture

Hi, How can we change the background color of tableview (style grouped) while still preserving texture of thin columns/lines effect that we can see when it has the default blue color.If i try to change background color using backgroundcolor property i get a plain view without any texture. thanks ...

UIScrollView in UITableCellView, cell doesn't update

I have a custom UITableViewCell with a UIScrollView in it that is wired to the cell controller. When I assign text to the scrollview, some cells get the correct text, some are blank, some redisplay old text and others have the scrollview clipped around the 2nd or 3rd line of text. It seems random on what will happen. I followed the su...

Always missing one row in UITableView

I created a UITableView programmatically (not using a XIB). It reads a *.plist file containing an NSMutableArray of NSDictionary objects. The problem I am experiencing is this: When I display the objects in the UITableView, it never shows the object at row zero. I know this because I get the following NSLog output: 2009-06-01 10:02:3...

UIToolBar with UITableView - TableView is not refreshing when loaded

The UIToolBar has two views, a UIView w/UITextViews and a UIView w/UITableView. The UITableView that gets called via a UIToolBar. The first time the UITableView loads, it hits the DB and gets the info. I "tab" back to the UIView w/UITextViews select some data, and then "tab" back to the UITableView, but none of the delegate methods get ...

UITableView section header is all black

For an iPhone, I've got a UITableView that is grouped, has one section, and in which I've set up a section header that's a UILabel object from the nib. When the table view displays, the header shows up as a stripe of solid black -- no text. In heightForHeaderInSection I've set the height to be the frame.size.height of the UILabel objec...

How to refresh UITableViewCell?

I have a UITableView with a custom UITableViewCell. In cellForRowAtIndexPath, I assign a font to a label in every cell, since the user can change font size at any time. To change font size, the user clicks a button below the tableview, which dislays another view with settings. Once they have chosen a font size and click done, that vie...

Efficient ways of inserting a new cell into a sorted UITableView?

I am trying to insert a new cell into a table view where the data is sorted. Is there an easy & efficient way to do this using the API? The easiest way seems to be insert the new data into an NSMutableArray, sort using a sort descriptor, and call reloadData. This should only redisplay the visible rows, so it doesn't look too bad. Would...

How do I implement a scrolling list view in iPhone programming

I have a view for an inbox. In the view I can currently show 10 sms messages. After 10 sms messages, I need to be able to scroll the messages. In other words, how do I implement a scrolview in iPhone programming like the one in the mail inbox or the SMS application? ...