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
78
votes
14 answers

How to make a cell on a UITableView not selectable?

I have a cell that I am inserting to the top of a UITableView. How can I make sure that when the user clicks on the cell, it doesn't show the blue selected indicator?
Sheehan Alam
  • 60,111
  • 124
  • 355
  • 556
78
votes
15 answers

Auto-layout: What creates constraints named UIView-Encapsulated-Layout-Width & Height?

My layout constraints are fine in Interface Builder but an exception occurs at runtime thanks to some part of the framework applying fixed height and width constraints that I really don't want. Why are they there, and how to turn them off? They're…
Reuben Scratton
  • 38,595
  • 9
  • 77
  • 86
78
votes
8 answers

Set UITableView content inset permanently

In my app I have a UISearchBar under UINavigationBar so it is always visible to user. In that case I had to set contentInset with extra 44px so the UIScrollView will be scrolling under UISearchBar (exactly like in Contacts.app). And there would be…
cojoj
  • 6,405
  • 4
  • 30
  • 52
77
votes
14 answers

Swift tableView Pagination

I have success working tableview with json parsing code. But may have 1000 more item so I need pagination when scrolling bottom side. I don't know how can I do this for my code shown below. For objective-C, there are a lot of examples but for Swift…
SwiftDeveloper
  • 7,244
  • 14
  • 56
  • 85
77
votes
18 answers

Warning: Attempt to present * on * which is already presenting (null)

This is my first application for iOS. So I have a UIVIewController with a UITableView where I have integrated a UISearchBar and a UISearchController in order to filter TableCells to display override func viewDidLoad() { menuBar.delegate = self …
Splendf
  • 1,611
  • 1
  • 10
  • 8
77
votes
9 answers

Convert HTML to Plain Text in Swift

I'm working on a simple RSS Reader app as a beginner project in Xcode. I currently have it set up that it parses the feed, and places the title, pub date, description and content and displays it in a WebView. I recently decided to show the…
Zaid Syed
  • 773
  • 1
  • 6
  • 5
76
votes
6 answers

How to reload and animate just one UITableView cell/row?

how can I reload and animate just one cell/row ? Right now i download some files. Everytime a file finished downloading, i call it's finished delegate and call [tableview reload]. But then the whole table reloads. And how can i animate the table, so…
madmax
  • 1,803
  • 3
  • 25
  • 50
75
votes
13 answers

How to enable swipe to delete cell in a TableView?

I have a UIViewController that implements TableViews delegate and datasource protocols. Now I want to add "swipe to delete" gesture to cells. How should I go about it. I have given a blank implementation of commitEditingStyle method and also set the…
Amogh Talpallikar
  • 12,084
  • 13
  • 79
  • 135
75
votes
16 answers

UITableView backgroundColor always white on iPad

I'm working on a project. I have plenty of UITableViews which are set as clear color. Their views' background color are set to my custom color and everything is fine on iPhone. The issue comes up on iPad! I tried almost everything, but my…
Göktuğ Aral
  • 1,409
  • 1
  • 13
  • 28
75
votes
3 answers

Pass data through segue

I'm doing simple iOS application with tableview controller and detailView. All I want is to pass data through segue. this is how it looks. All I want is that u click on "Markíza" it will open URL video number 1 and if u click on "TV JOJ" it will…
patrikbelis
  • 1,350
  • 2
  • 16
  • 35
75
votes
5 answers

How to get the rect of a UICollectionViewCell?

UITableView has the method rectForRowAtIndexPath:, but this does not exist in UICollectionView. I'm looking for a nice clean way to grab a cell's bounding rectangle, perhaps one that I could add as a category on UICollectionView.
akaru
  • 6,299
  • 9
  • 63
  • 102
75
votes
13 answers

How to create a UITableViewCell with a transparent background

I'm trying to set the background color of a UITableViewCell to transparent. But nothing seems to work. I have some images/buttons inside the tableViewCell and I would like to make the white grouptableview background disappear to get a 'floating'…
levi
  • 2,035
  • 3
  • 16
  • 11
74
votes
7 answers

Swift - how to make custom header for UITableView?

I need to add custom header to my table I try this func tableView(tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { let view = UIView(frame: CGRect(x: 0, y: 0, width: tableView.frame.size.width, height: 18)) let…
Alexey K
  • 6,537
  • 18
  • 60
  • 118
73
votes
8 answers

UITableView Footer, Stop from floating over content

I would like to make my UITableView Footer stop floating over my content, as is the default activity. I want my footer to be.. well.. a footer. Always the last view to be displayed at the end of my tableview. :) Same thing with the header too…
Jason
  • 2,445
  • 3
  • 17
  • 17
73
votes
3 answers

How can I get the UITableView scroll position so I can save it?

Is there any way to find out which UITableViewCell is at the top of the scroll window? I'd like to get the current scroll position so that I can save it when the app exits. When the app gets started I want to scroll to the position it was at when…
progrmr
  • 75,956
  • 16
  • 112
  • 147