uitableviewcell

how to avoid cell state changes on scroll.

Hi, I want to use the minus red control to mark a cell for deletion in a batch deletion way. I made some goals like multiselection or avoiding delete button being shown, but when table auto scrolls to the first row, after user ends dragging, all cells that were in showingDeletion state change to editingState and the minus red buton get...

alternative to deprecated UITableViewCell setText?

Code in the book Beginning iPhone Development (by Dave Mark & Jeff LaMarche) assigns to the UITableViewCell text property: UITableViewCell *cell = ... ... cell.text = ... This assignment brings up a "'setText' is deprecated..." warning. What should I use as an alternative? Also, how do I open the long URL in the warning (in Xcode) w...

Custom draw a UITableViewCell

I am trying to create a UITableViewCell which overrides the complete drawing of the contents. I have overridden drawRect, which is being called, but it still draws the default contents. How do I get it to stop drawing the default contents and how do I replace it with my own rendering? - (id)initWithStyle:(UITableViewCellStyle)style ...

cell.accessoryType disappearing issue

I have setup custom UITableViewCell from code. In my cell, I have a "UITableViewCellAccessoryDisclosureIndicator". When highlighting the cell, it goes blue, and the accessory item turns white. So that's all good. However, when tapped and a new view is pushed, the accessory item disappears. When I go back to the tableview the UITableView...

class variable accessible at end of one function, and crashes on access at beginning of next

(programming in iPhone objective-C) I have a class level NSString* that I create, add property(nonatomic,retain) and synthesize code for and I can modify the string endlessly with stringByAppendingString functions and display the string using NSLog just fine. All of this is done in a subclass, overridden viewDidLoad function. When I try...

Increase tappable area on UITableView

I'm testing a new iPhone app with my end-users and found that a lot of times they misses the clickable area of a UITableCell and perform the wrong action. (Some users never before use any kind of computer!). Then I try myself and found that still I can fail sometimes. So I wonder how increase the tappable area of the cell with accessory...

How to add Disclosure button to Custom UITableViewCell

Can I render the Disclosure button graphic with it not being a button. I want to add the image to the custom rendered cell, but am not sure how to get the image. How do I render the image alone. ...

black uitableviewcell accessary?

is there a way to turn the default UITableViewCellAccessoryDetailDisclosureButton from blue colour to black colour???? ...

Labels aligning in UITableViewCell

I use UITableView with cells created using UITableViewCellStyleSubtitle. Every cell's height is dynamically adjusted using the - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath delegate method. The problem you can see on the picture (note: image updated) How to set up align of textLab...

Custom button on a row in UITableView?

I would like to add a custom button (checked/unchecked) to each row of the UITableView. Should I use UITableViewCell for this purpose? Also, if I want the same look and feel for each UITableViewCell, should I create multiple cells and apply the same properties to each cell or is there any trick to repeat the process? I will be using IB...

custom UITableViewCell item problems

Hi, I am a newbie. I have a custom UITableViewCell with 3 items: a UILabel a UITextField and a UIButton My question is, how do I know from which cell the button was clicked or textField was edited ? Is there a way to track them? Thanks for any replies. ...

text layout in custom rendered UITableViewCell

I am trying to custom render text within a UITableViewCell. This text can be over a number of lines and can contain http links, font and colour changes. I have looked at the sizeWithFont methods of NSString, but can't really work out a good way of rendering each part of the string so that it all runs together correctly. Do I need to r...

Communicating between UITableView and UITableViewCell?

Here is what I am trying to achieve.. I have a UITableView and each row is a UITableViewCell. They both are nibs. Each cell has a button (checkbox) and a label. User can either touch the checkbox to select OR touch the row. In either case, BOTH should happen : If user touches the row, the checkbox gets checked. If user touches the ch...

UITableViewCell changes from 2.1 to 3.0 - Duplicate Cells

I have a subclass of UITableViewCell that I create for a UITableView. Let's say I have 26 cells (letters of the alphabet). In SDK 2.1 I load the first six cells, A->F, then scroll down and it loads the next six cells (G->L). In SDK 3.0 I load the first six cells, A->F, then scroll, it reloads the first six cells again (A->F), instead o...

Intertesting problem with UITableViewCell and UITableView, Any solution?

I have a class inherited from UITableViewController and this is also the root class. This tableView contains three custom UITableViewCells (loaded from NIB file and not subclassed) and each UITableViewCell has one UITextField. Now when I implement delegate method - (BOOL)textField:(UITextField *)textField shouldChangeCharactersI...

UITableViewCell - set it to be selected/highlighted... and stay selected/highlighted

Hello, I would like to have a UITableViewCell stay lit (blue) after i call cell.selected = yes. is this possible? do i have to go another way about it (as in not cell.selected) thanks! ...

iphone dev: dynamically resize UITableView

hey, we have a UITableView inside which we have (obviously) many UITableViewCells. We need to implement an action so that when the user touches the cell, the cell grows and shows more information. if the user touches the cell again, it resizes back to the original size. We were able to implement this by changing the height of the frame ...

UITableView Custom Cell Resets Cell Content

Okay I know I'm running up against my limits of understanding as regards objective-c, cocoa, xcode, and blah blah and so on. But here's what I'm trying to do: I have a tableview in a viewcontroller. The tableview's delegate is the viewcontroller. Viewcontroller has an outlet to the tableview. The table is put together using custom cells...

heightForRowAtIndexPath for longer NSStrings

I have a UITableView (Grouped!) and need to calculate the height of two styles of cells: UITableViewCellStyleDefault and UITableViewCellStyleValue2. This is how I do it for UITableViewCellStyleDefault: CGSize textSize = {300.f, 200000.0f}; CGSize size = [myTextString1 sizeWithFont:[UIFont systemFontOfSize:14.0f] constrainedToSize:tex...

Changing UITableViewCell textLabel background color to clear

In my app i have a table view with customViewCells. i subclassed the UITableViewCell class and added an image that will load async and for the text i use cell.textLabel.text = @"someThext". for the cells the background color is set alternatively to [UIColor darkGrayColor] and whitecolor. When i run the app in the simulator and on the p...