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
13
votes
4 answers

UITableViewCell detailTextLabel not showing up

Using a UITableView and its UITableViewCell(s) in Swift. I have some problem showing the detailTextLabel field of a UITableViewCell. I already found these two helpful posts, but could not get a fully working solution: swift detailTextLabel not…
Michel
  • 10,303
  • 17
  • 82
  • 179
13
votes
4 answers

Misplaced or hidden UITableView Section Header while switching from one datasource to another and realoding the UITableView

I am making a profile view on iOS which has three tabs like twitter app. I am using one table view and when user taps on these tabs I am reloading it from other data sources. But I want to keep the section header to be on the top independent of…
kidsid49
  • 1,358
  • 3
  • 18
  • 37
13
votes
2 answers

How to add image on UITableView delete button?

I have an UITableView and I've added edit actions to it. Now I want to add image above the delete buttons label, as: This is my code: func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) ->…
Orkhan Alizade
  • 7,379
  • 14
  • 40
  • 79
13
votes
4 answers

Resizing UITableViewCell content width automatically

I have some code that creates a table cell with a slider. It's pretty straightforward and it sizes well on the iPhone. I've anonymized it a bit here: UITableViewCell* cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault…
Shaggy Frog
  • 27,575
  • 16
  • 91
  • 128
13
votes
5 answers

Pass multiple parameters to addTarget

In my UITableViewCell I have a button. And I want to add action to it by passing multiple parameters in cellForRowAtIndexPath method. func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { let…
Arti
  • 7,356
  • 12
  • 57
  • 122
13
votes
5 answers

Swift: load images Async in UITableViewCell

I have a tableview that I created with code (without storyboard): class MSContentVerticalList: MSContent,UITableViewDelegate,UITableViewDataSource { var tblView:UITableView! var dataSource:[MSC_VCItem]=[] init(Frame: CGRect,DataSource:[MSC_VCItem])…
Imran Sh
  • 1,623
  • 4
  • 27
  • 50
13
votes
2 answers

Swift - UITableView editActionsForRowAtIndexPath open UIPresentationController when click Edit

Hi is there any way to open an UIPresentationController when swipe left is triggered and it's click Edit ? func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) -> [UITableViewRowAction]? { let…
Bogdan Bogdanov
  • 882
  • 11
  • 36
  • 79
13
votes
3 answers

editActionsForRowAtIndexPath not executing on iOS 8 with Xcode 7

I am testing my application on 3 devices. 2 devices on iOS 9, and one device on iOS 8. On iOS 9 the function editActionsForRowAtIndexPath is working and action is show when I swipe one cell. But on iOS 8, I can't swipe cells. Here is my code : func…
Logan Gallois
  • 594
  • 5
  • 27
13
votes
2 answers

Twitter iOS Profile Page Configuration

I'm trying to structure a page similar to Twitter's profile page. It looks like they are using a basic UITableView. The top profile is just the tableHeaderView. The tabs are a UISegmentedControl inside the SectionRowHeader so that it sticks to the…
Oren
  • 5,055
  • 3
  • 34
  • 52
13
votes
4 answers

How to make fixed height cell on uitableview?

So I want to make timeline content like instagram, I'm using custom cell on my uitableview. My problem is I already set the cell height to 345 on the storyboard but I get cell table like below: and here is my custom cell on storyboard: How can I…
Ega Setya Putra
  • 1,645
  • 6
  • 23
  • 51
13
votes
6 answers

Multiple Row Selection in UIPickerView

I want to select multiple rows in a UIPickerView, so I had the idea to show my data in a table and add this table as subview to the picker. I have tried this but didn't succeed. Any suggestions how to do this?
Ank
  • 514
  • 1
  • 5
  • 19
13
votes
4 answers

tableHeaderView on top of first cell

I'm trying to create a tableview programmatically that has a search bar in the tableHeaderView. For some reason the search bar appears on top of the first cell. I'm using Masonry to build constraints. Can someone point me to what i'm doing wrong. -…
13
votes
6 answers

How to disable selected table cell highlight after returning from Detail View (Back Segue)

I am having problem with my table view cell. I can't disable the highlight of table cell selection after returning from detail view to main table view using segue with embedded navigation controller. The table cell is still selected. I don't want…
Thiha Aung
  • 5,036
  • 8
  • 36
  • 79
13
votes
7 answers

How can we add image in UITableView section header using swift?

In my willDisplayHeaderView I have changed color of section header But I want to add an image before section title. Any help? My code for willDisplayHeaderView is func tableView(tableView: UITableView, willDisplayHeaderView view: UIView, forSection…
Saqib Omer
  • 5,387
  • 7
  • 50
  • 71
13
votes
9 answers

Push segue from UITableViewCell to ViewController in Swift

I'm encountering problems with my UITableViewCells. I connected my UITableView to a API to populate my cells. Then I've created a function which grabs the indexPath.row to identify which JSON-object inside the array that should be sent to the…
Jack
  • 3,632
  • 7
  • 45
  • 67