Questions tagged [uitableview]

UITableView is a class used for displaying and editing lists of information on iOS. A table view displays items in a single column. UITableView is a subclass of UIScrollView, which allows users to scroll through the table, although UITableView allows vertical scrolling only.

UITableView is a class used for displaying and editing hierarchical lists on iOS () and watchOS (). It uses an efficient architecture that reuses existing UITableViewCell objects while they scroll offscreen, improving memory usage and performance during fast scrolling.

Sample of Use

Sample of Use

Resources:

64456 questions
104
votes
11 answers

UITableView row animation duration and completion callback

Is there a way to either specify the duration for UITableView row animations, or to get a callback when the animation completes? What I would like to do is flash the scroll indicators after the animation completes. Doing the flash before then…
Daniel Dickison
  • 21,832
  • 13
  • 69
  • 89
104
votes
19 answers

How to resize a tableHeaderView of a UITableView?

I'm having trouble resizing a tableHeaderView. It simple doesn't work. 1) Create a UITableView and UIView (100 x 320 px); 2) Set the UIView as tableHeaderView of the UITableView; 3) Build and Go. Everything is ok. Now, I want to resizing the…
iMe
  • 1,041
  • 2
  • 9
  • 5
104
votes
9 answers

How can I debug 'unrecognized selector sent to instance' error

I am creating a custom table cell view for my table view. After I connect an image view of custom cell (in storyboard) to my code in swift, I get the following error. [UITableViewCellContentView image]: unrecognized selector sent to instance…
n179911
  • 19,547
  • 46
  • 120
  • 162
103
votes
2 answers

Autolayout is ignored in Custom UITableViewCell

Despite having set constraints to all elements, including the vertical ones needed for the cell to calculate its height, auto-layout seems to be ignored: all cells are squeezed. Here's a screenshot of the result and of the constraints in the…
Kqtr
  • 5,824
  • 3
  • 25
  • 32
102
votes
3 answers

How to add a footer to a UITableView in Storyboard

I'm fairly new to iOS development. I want to add a footer to the table view in a UITableViewController. I've made the view I want to use as the footer graphically in Storyboard, however I can't work out how to hook it up as the footer to my table…
Jon Cox
  • 10,622
  • 22
  • 78
  • 123
102
votes
15 answers

iOS 7 TableView like in Settings App on iPad

I want to have a group UITableView with the style same like the iPad Settings application Detail view for iOS 7. It is a tableView with rounded corner. Please check the attachment for details. Is some default settings to make it look like that or we…
Ekra
  • 3,241
  • 10
  • 41
  • 61
101
votes
6 answers

Use didSelectRowAtIndexPath or prepareForSegue method for UITableView?

I'm using storyboards and I have a UITableView. I have a segue setup that pushes from my table to the detail VC. But which method should I use to handle this? I'll have to pass a couple objects to the detail view. But do I use…
Jon
  • 4,732
  • 6
  • 44
  • 67
101
votes
17 answers

How to know when UITableView did scroll to bottom in iPhone?

I would like to know when a UITableView did scroll to bottom in order to load and show more content, something like a delegate or something else to let the controller know when the table did scroll to bottom. How can I do this?
Son Nguyen
  • 3,481
  • 4
  • 33
  • 47
100
votes
5 answers

Is there any way to hide "-" (Delete) button while editing UITableView

On my iphone app, I have a UITableView in edit mode, where user is allowed only to reorder the rows no delete permission is given. So is there any way where I can hide "-" red button from TableView. Please let me know. Thanks
iPhoneDev
  • 2,995
  • 4
  • 33
  • 44
100
votes
11 answers

Refresh certain row of UITableView based on Int in Swift

I am a beginning developer in Swift, and I am creating a basic app that includes a UITableView. I want to refresh a certain row of the table using: self.tableView.reloadRowsAtIndexPaths(paths, withRowAnimation: UITableViewRowAnimation.none) and I…
SentientBacon
  • 1,509
  • 3
  • 11
  • 19
100
votes
18 answers

iOS8 - constraints ambiguously suggest a height of zero

Has anyone got any idea how to debug this? Warning once only: Detected a case where constraints ambiguously suggest a height of zero for a tableview cell's content view. We're considering the collapse unintentional and using standard height…
Chris
  • 2,727
  • 2
  • 27
  • 28
99
votes
6 answers

UITableView + Add content offset at top

I need to add some blank space to the top of my UITableView that does not affect the size of the content area. Shifting the content down or adding a blank cell is NOT what I want to do. Instead I just want an offset. How?
bluefloyd8
  • 2,266
  • 2
  • 24
  • 20
98
votes
7 answers

UITableView disable swipe to delete, but still have delete in Edit mode?

I want something similar as the Alarm app, where you can't swipe delete the row, but you can still delete the row in Edit mode. When commented out tableView:commitEditingStyle:forRowAtIndexPath:, I disabled the swipe to delete and still had Delete…
willi
  • 6,559
  • 4
  • 30
  • 27
98
votes
9 answers

I do not want animation in the begin updates, end updates block for uitableview?

I have a UITableView that is using a custom table cell and each cell has a UIWebView. Because UIWebView took along time to load, i want to avoid reloading them at all cost. In some situations, I have all cells loaded, but their heights are messed…
mkto
  • 4,584
  • 5
  • 41
  • 65
97
votes
20 answers

Grouped UITableview remove outer separator line

I have a grouped UITableview which is created programatically. Also I have a cell with xib file populated in tableview programmatically as well. So far so good. But I want to only remove outer separator line. I used below code but this time removed…
serhat sezer
  • 1,330
  • 1
  • 10
  • 26