Tag: uitableview

UITableView/UITableViewCell tap event response?

I’ve been googling around to try to figure out what sort of event handles are called when one row (or cell) in a UITableView is tapped, but haven’t been able to figure it out. I’m trying to change the image property of the cell when it’s tapped. Thanks.

UITableView Animation Headache

NSIndexPath* updatedPath = [NSIndexPath indexPathForRow: 0 inSection: 0]; NSIndexPath* updatedPath2 = [NSIndexPath indexPathForRow: 1 inSection: 0]; NSArray* updatedPaths = [NSArray arrayWithObjects:updatedPath, updatedPath2, nil]; [self.mySexyTableView reloadRowsAtIndexPaths:updatedPaths withRowAnimation:UITableViewRowAnimationTop]; The above code works and it animates. The problem is that I have lot of data and I don’t want to hard-code the row indexes. Since I have only […]

Measuring the UITableView Scrolling Performance – iphone

I am trying to measure the scrolling performance for my UITableView, between using subview and drawing the view myself. As we may know about scrolling performance, there are a couple of famous articles (Tweetie, TableViewSuite, Glassy and Glassy2 that help us with the technique and all will point to the same point: when we have […]

Emojis messing with obj-c's sizeWithFont math

In a UITableView that needs to display a long list of chatlike conversations, often containing emojis, a size calculation error occurs. My problem is, that if a string is just the right length, and I use sizeWithFont, I on my first measurement using sizewithfont get an incorrect length of the string, causing a “linebreak”. I […]

Detect horizontal panning in UITableView

I’m using a UIPanGestureRecognizer to recognize horizontal sliding in a UITableView (on a cell to be precise, though it is added to the table itself). However, this gesture recognizer obviously steals the touches from the table. I already got the pangesturerecognizer to recognize horizontal sliding and then snap to that; but if the user starts […]

Using cornerRadius on a UIImageView in a UITableViewCell

I’m using a UIImageView for each of my UITableViewCells, as thumbnails. My code uses SDWebImage to asynchronously grab those images from my backend and load them in, and then caching them. This is working fine. My UIImageView is a 50×50 square, created in Interface Builder. Its background is opaque, white color (same as my UITableViewCell […]

UITableView page size when paging enabled

I’m facing with a simple but tedious problem. What I’m trying to do is make an UITableView to page like an UIScrollView but enabling paging doesn’t help me so much because I can’t set page size so the tableview scrolls exactly of its height so it shows rows 1…10 or 11…20 and so on. What […]

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?