Tag: uitableview

How can I create a variable sized UITableViewCell?

I can’t seem to get the text to actually span multiple lines. The heights look correct. What am I missing? – (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:@”StatusCell”] autorelease]; CGRect frame = cell.contentView.bounds; UILabel *myLabel = [[UILabel alloc] initWithFrame:frame]; myLabel.text = [[person.updates objectAtIndex:indexPath.row] valueForKey:@”text”]; [cell.contentView addSubview:myLabel]; [myLabel release]; return […]

UITableView with dynamic cell heights — what do I need to do to fix scrolling down?

I am building a teensy tiny little Twitter client on the iPhone. Naturally, I’m displaying the tweets in a UITableView, and they are of course of varying lengths. I’m dynamically changing the height of the cell based on the text quite fine: – (CGFloat)heightForTweetCellWithString:(NSString *)text { CGFloat height = Buffer + [text sizeWithFont:Font constrainedToSize:Size lineBreakMode:LineBreakMode].height; […]

Default font size of UITableViewCell

Anybody knows the default font size of UITableViewCell?

Save data from 1 page and add that data to a tableView

Hey guys i have 2 views the first has a UITableView. The Second Has a textField and when the user presses a “Save” button on the second page, i want the textFields text to be added to the tableView. Here is the code i’m using – (IBAction)saveButton:(id)sender { CheckListPracticeViewController * obj = [[CheckListPracticeViewController alloc]init]; [obj.cells […]

Change height of UITableView programmatically

I have a UITableView and I’d like to change its height programmatically depending on the number of cells contained in it. Can you help me?

UITableView grouped section footer not updating after reload

I have 3 or 2 sections (depending on datasource), in my grouped UITableView. I am trying to reload the last section via: dispatch_async(dispatch_get_main_queue(), ^{ [UIView performWithoutAnimation:^{ [feedDetailTB reloadSections:[NSIndexSet indexSetWithIndex:feedDetailTB.numberOfSections-1] withRowAnimation:UITableViewRowAnimationNone]; }]; }); First of all, the footer never disappears. The data source basically keeps track of whether there are more comments or not (a simple […]

how to make UItableview to be with format length

I am doing a homework where i have to receive the incoming message from the NSInputstream and have to view it in UItableview, i can receive the message and send the message properly , but some time my string is writing in the same line even though i give in \n. do any one have […]

UITableView: can I delete multiple rows?

I want to delete multiple rows from a table view, based on the user’s selection. Obviously I can’t use the didSelectRowAtIndexPath method because it will be called for every row selected. I want to allow the user to select multiple rows for deletion and then delete them in one go. Is it possible? If yes, […]

Tableviewcell button

I have tableview , where I subclassed tableviewcell. There is a horizontal scrollview in the cell and I add dynamic button to the scrollview. My requirement: 1. When I tap the button(s) on row0 for the first time, I need to set a different BG color for the tapped button and add the button index […]

UITableViewCell Display multiple fonts

I want to display two words in the uitableviewcell in different fonts similar to the iPhone Address Book. Ex: John Buchanan