uitableviewcell

UITableViewCell with a UIButton

I have UITable which contains some UIButtons. I would like a way to use the label. The problem I have is that I need two tag labels, one for retrieving the cell in tableviewCellWithReuseIdentifier and configureCell. Until recently I have been using the UIButton.title to determine which row in the table I selected. The (invisible) text...

NSString drawInRect with UILineBreakModeTailTruncation doesn't appear the "..."

I am trying to use this method to draw a string into a custom UITableViewCell. [self.text drawInRect:TEXT_RECT withFont:font lineBreakMode:UILineBreakModeTailTruncation alignment:UITextAlignmentLeft]; The problem is that if the text is too long, the text is actually tail truncate but it doesn't display the "..." If I use the draw...

Drag and drop between two tables in ipad

Hi all I have two UITableView in my iPad application. I want to drag a cell from one tableview and drop onto another tableview. Please suggest me any idea how can I Implement drag & drop between two tables in iPad ? Thanks in advance ...

Delete button on a UITableview Cell blocks custom cell images.

I have subclassed a tableview cell and added a couple of labels and images to the custom cell. [self.contentView addSubview:lblDesc]; [self.contentView addSubview:imagesToDisplay]; When i edit the tableView and press the "-" sign the delete button appears on top of the image and other contents. Some other apps squeeze the...

refreshing cell content after deleting cells

I have the following problem: I have a UITableView with some Text and some Images as content. The TextLabel of the cell displays the text and I add a UIView with some UIImageViews as its subview to the cells contentview. Everything works fine until I delete some cells. What happens is, I delete a cell (lets say the first) from the tabl...

UITableView background with alpha color causing problem with UITableViewCell

Hi everybody, I'm trying to get a semi-transparent uitableview, with this color [UIColor colorWithRed:(247.0/255.) green:(151.0/255.0) blue:(121.0/255.0) alpha:0.38]; It's ok if there are only empty cells, but when a cell has content inside, the background turns more solid. It's as if the cell itself had the same table background, so ...

How to use UITextView in UITableViewCell with variable height?

I am interested in creating a UITableViewCell with a UITextView inside of it, which adjusts its height (to a certain maximum) as the user types more or less text into the UITextView. I know how to add the UITextView to a custom UITableViewCell--but how might I change the UITableViewCell's height as the user is in the process of typing? I...

Size of UITableViewCell has major impact on smooth scrolling?

G'day guys, I'm building an iPad app at the moment and our designer has given us a view that has an image background and a tableview that covers a section of that background (it isn't transparent don't worry about that). Each cell contains information about stores. I've implemented it by looking at the smoothscrolling code from Loren Br...

Long press on UITableView

Hi, I would like to handle a long press on a UITableViewCell to print a "quick access menu". Does someone already did this ? Particularly the gesture recognize on UITableView ? ...

Edit Button on Navigation Controller

I have a navigation controller in my app and on its root view controller i have an Edit button as the rightBarButtonItem. I have a second table view which is pushed when a cell is tapped on the root view controller. The leftBarButtonItem becomes the Back button. I would like an Edit button as well, where can i put it that would make t...

UITableView - don't unload cells when they go off screen

My tableView consists of 5-10 cells, each of which contains a scrollview of images. The problem is that when a cell goes off screen, it removes all the images and then reloads them when the cell comes back on screen. I know this is done for performance reasons, but in this case it just looks bad. Is there a way to prevent the unloading o...

Passing text value from one view to another

I have this in my table view controller, and i want to pass the cell's text value to my UITextField on the modal view. - (void)buttonTapped:(id)sender { AddName *addName = [[AddName alloc] init]; UITableViewCell *cell = (UITableViewCell*)[sender superview]; NSLog(@"text in buttontapped: %@", cell.textLabel.text); addName...

ReCall NSArray in RootViewController

I use original method XML data can show in rootviewcontroller TableView. When i use New Procedure it show the table only no data. How can i show the data in New Method? Original Method appDelegate.m (setup XML & load the data) rootviewController.m (use nsarray & load the data into table view) New Method appDelegate.m (setup XML &...

nsmutabldictionary to call local file in uitableview

i am reading through sam's 24 hours to iphone programming. it's a really nice book with great examples, but as all programming goes, there's more ways than one to accomplish something. i am basically trying to build a uitableview that once a row is selected will open a local file in a uiwebview (detailcontroller). the book example buil...

UICell textlabel change frame size

Hello, I have a table that displays cell using UITableViewCellStyleSubtitle: ============================================================= Title:This is the title of something Date:Custom label Subtitle:breif description ============================================================= My Problem is that sometimes the titles are lo...

UITableViewCell backgroundView image resizing?

Hello, I am using an image to display the whole content of a UITableViewCell and it's set using the backgroundView property. My problem is that it is always scaled to fit the cell. Is there a way to disable scaling in this case, so I can provide the 480 pixel version only and it just gets cropped when orientation is portrait? I'm doin...

UItableViewCell - don't allow to select the cell, but can still press buttons inside it?

Hi there Can you add a button as a subview to a uitableview cell and have that clickable, but not the cell itself. ie: I don't want the selected view to come up. Obvs I can just not have the cell disclose anywhere, but I don't want it to look "selected" when someone taps it. Setting user interaction enabled to NO makes the whole thing ...

I am Using the default UITableViewCell .I want to set the image on cell from my local server...cell.imageView.image

BLImageCache *sharedImageCache = [BLImageCache sharedInstance]; NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys:indexPath ,@"IndexPath", nil] ; NSString *urlString; urlString = [[mNewsArray objectAtIndex:indexPath.row] objectForKey:@"imgUrl"]; urlString =[urlString stringByAddingPercentEscapesUsingEncoding:NSUTF8Str...

UITableViewCell with prepareForReuse does not work

I have created a custom UITableViewCell where I add a bunch of buttons loaded dynamically to its contentView. These display properly. When the data which controls what buttons are loaded change and I call reloadData I can see that prepareForReuse is called: - (void) prepareForReuse { NSLog(@"prep for reuse"); [self clearButtons...

How to reuse UIViews, the way UITableView does?

I want to create a view that shows vast amounts of data. Using UITableView would have been a good idea except it's not the way/style I want to show it. I'm thinking of creating my own view, and I was wondering: UITableViewCell is constantly being reused through the dequeueReusableCellWithIdentifier method; how does this work? I mean, I c...