All Questions

Tagged with
Filter by
Sorted by
Tagged with
317 votes
23 answers
244k views

UITableview: How to Disable Selection for Some Rows but Not Others

I am displaying in a group tableview contents parsed from XML. I want to disable the click event on it (I should not be able to click it at all) The table contains two groups. I want to disable ...
Warrior's user avatar
  • 39.2k
270 votes
10 answers
186k views

How to disable scrolling in UITableView table when the content fits on the screen

I have a few (grouped style) tables in my iphone app (only on part of the screen and added with Interface Builder though, not subclassed from UITableViewController) that 80% of the time are small and ...
Ginny's user avatar
  • 3,111
258 votes
45 answers
211k views

Making a UITableView scroll when text field is selected

After a lot of trial and error, I'm giving up and asking the question. I've seen a lot of people with similar problems but can't get all the answers to work right. I have a UITableView which is ...
249 votes
4 answers
205k views

How to create NSIndexPath for TableView

I need delete row 1 of a table in a function I have defined. In order to use deleteRowAtIndexPath you must use an IndexPath with a section and row defined. How can I create an indexpath like this? ...
Rubber Duck's user avatar
  • 3,037
234 votes
23 answers
218k views

How to deselect a selected UITableView cell?

I am working on a project on which I have to preselect a particular cell. I can preselect a cell using -willDisplayCell, but I can't deselect it when the user clicks on any other cell. - (void)...
Ram's user avatar
  • 2,513
217 votes
26 answers
137k views

Detecting which UIButton was pressed in a UITableView

I have a UITableView with 5 UITableViewCells. Each cell contains a UIButton which is set up as follows: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)...
rein's user avatar
  • 33.3k
214 votes
2 answers
108k views

How to fix UITableView separator on iOS 7? [duplicate]

UITableView draws with ragged lines on iOS 7: How to fix it? The line between cells should be on the full width of the screen.
Dmitry's user avatar
  • 14.5k
198 votes
11 answers
109k views

Long press on UITableView

I would like to handle a long press on a UITableViewCell to print a "quick access menu". Did someone already do this? Particularly the gesture recognize on UITableView?
foOg's user avatar
  • 3,146
191 votes
18 answers
197k views

How to customize the background color of a UITableViewCell?

I would like to customize the background (and maybe the border too) of all of the UITableViewCells within my UITableView. So far I have not been able to customize this stuff, so I have a bunch of ...
jpm's user avatar
  • 16.7k
180 votes
6 answers
80k views

Pull to refresh UITableView without UITableViewController

I'm trying to implement a pull to refresh feature in a UITableView within a UIViewController. I can't use a UITableViewController because I want the UITableView to be a smaller subview in the view ...
Daniel Robinson's user avatar
177 votes
20 answers
58k views

UITableViewCell subview disappears when cell is selected

I'm implementing a color-chooser table view where the user can select amongst, say, 10 colors (depends on the product). The user can also select other options (like hard drive capacity, ...). All ...
Cyrille's user avatar
  • 25.1k
170 votes
5 answers
232k views

Adding iOS UITableView HeaderView (not section header)

I want to add a table header (not section headers) like in the contacts app for example: exactly like that - a label beside an image above of the table. I want the all view be scrollable so I can't ...
AMM's user avatar
  • 2,195
169 votes
8 answers
62k views

What is the default height of UITableViewCell?

I thought this information would have been easier to find :-) What is the default height of a UITableViewCell? It looks like 44 pixels, but I'd prefer to be sure.
Rob's user avatar
  • 26.2k
166 votes
16 answers
96k views

How to set the full width of separator in UITableView

I have a UITableView where the separators don't have the full width. It ends like 10 pixels before the left side. I was playing around with this code in the viewDidLoad(). self.tableView....
Timo Cengiz's user avatar
  • 3,407
158 votes
22 answers
162k views

How to detect the end of loading of UITableView

I want to change the offset of the table when the load is finished and that offset depends on the number of cells loaded on the table. Is it anyway on the SDK to know when a uitableview loading has ...
emenegro's user avatar
  • 6,941
154 votes
19 answers
96k views

Change Default Scrolling Behavior of UITableView Section Header

I have a UITableView with two sections. It is a simple table view. I am using viewForHeaderInSection to create custom views for these headers. So far, so good. The default scrolling behavior is ...
davidjhinson's user avatar
  • 1,695
149 votes
24 answers
97k views

Handling an empty UITableView. Print a friendly message

I have a UITableView that in some cases it is legal to be empty. So instead of showing the background image of the app, I would prefer to print a friendly message in the screen, such as: This list ...
cateof's user avatar
  • 6,668
149 votes
9 answers
108k views

Adding the little arrow to the right side of a cell in an iPhone TableView Cell

This should be simple enough. I have an iPhone app with a TableView. How do I add the little classic arrow to the righthand side of each cell?
Eric Brotto's user avatar
  • 53.9k
147 votes
11 answers
100k views

Reducing the space between sections of the UITableView

Is there a way to reduce the space between two sections of a UITableView? There are about 15 pixels between every single section I have. I did already try to return 0 for -tableView:...
flohei's user avatar
  • 5,258
141 votes
7 answers
132k views

Select tableview row programmatically

How do I programmatically select a UITableView row so that - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath gets executed? selectRowAtIndexPath ...
4thSpace's user avatar
  • 44k
128 votes
7 answers
33k views

How to limit UITableView row reordering to a section

I was hitting my head over this one, and google was turning up nothing. I eventually worked it out and thought I'd write it up here for the sake of the next person. You have a UITableView with ...
126 votes
8 answers
84k views

Default height for section header in UITableView

I want to set the height of the first header in my UITableView. For the other headers I want them to remain the default height. What value/constant can I put in place of "someDefaultHeight" in the ...
rein's user avatar
  • 33.3k
119 votes
20 answers
162k views

How to get the indexpath.row when an element is activated?

I have a tableview with buttons and I want to use the indexpath.row when one of them is tapped. This is what I currently have, but it always is 0 var point = Int() func buttonPressed(sender: ...
Vincent's user avatar
  • 1,645
118 votes
17 answers
154k views

Expand/collapse section in UITableView in iOS

Could somebody tell me the way to perform UITableView expandable/collapsible animations in sections of UITableView as below? or
vinnitu's user avatar
  • 4,284
117 votes
9 answers
144k views

How to set the UITableView Section title programmatically (iPhone/iPad)?

I've created a UITableView in Interface Builder using storyboards. The UITableView is setup with static cells and a number of different sections. The issue I'm having is that I'm trying to setup my ...
user avatar
115 votes
29 answers
85k views

Is it possible to use AutoLayout with UITableView's tableHeaderView? [duplicate]

Since I discovered AutoLayout I use it everywhere, now I'm trying to use it with a tableHeaderView. I made a subclass of UIView added everything (labels etc...) I wanted with their constraints, then ...
ItsASecret's user avatar
  • 2,619
114 votes
11 answers
103k views

How to customize the background/border colors of a grouped table view cell?

I would like to customize both the background and the border color of a grouped-style UITableView. I was able to customize the background color by using the following: tableView.contentView....
jpm's user avatar
  • 16.7k
112 votes
17 answers
137k views

How do I make UITableViewCell's ImageView a fixed size even when the image is smaller

I have a bunch of images I am using for cell's image views, they are all no bigger than 50x50. e.g. 40x50, 50x32, 20x37 ..... When I load the table view, the text doesn't line up because the width ...
Robert's user avatar
  • 38k
110 votes
7 answers
98k views

How to set the width of a cell in a UITableView in grouped style

I have been working on this for about 2 days, so i thought i share my learnings with you. The question is: Is it possible to make the width of a cell in a grouped UITableView smaller? The answer is: ...
110 votes
18 answers
64k views

Get notified when UITableView has finished asking for data?

Is there some way to find out when a UITableView has finished asking for data from its data source? None of the viewDidLoad/viewWillAppear/viewDidAppear methods of the associated view controller (...
kennethmac2000's user avatar
108 votes
18 answers
163k views

UITableView load more when scrolling to bottom like Facebook application

I am developing an application that uses SQLite. I want to show a list of users (UITableView) using a paginating mechanism. Could any one please tell me how to load more data in my list when the user ...
rokridi's user avatar
  • 1,575
106 votes
5 answers
86k views

Get Selected index of UITableView

I want to have selected index for UITableView. I have written following code: NSIndexPath *index = [NSIndexPath indexPathForRow:1 inSection:0]; [tableView scrollToRowAtIndexPath:index ...
iOSDev's user avatar
  • 3,617
105 votes
11 answers
48k views

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 ...
Daniel Dickison's user avatar
105 votes
19 answers
95k views

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. ...
iMe's user avatar
  • 1,051
104 votes
6 answers
137k views

iPhone/iOS JSON parsing tutorial [closed]

As a learning experience, I want to make an iPhone application that calls a webserver/webservice, retrieves a JSON response, and uses that response to populate the rows of a UITableView (assuming it ...
Casey Flynn's user avatar
  • 13.9k
101 votes
6 answers
73k views

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 ...
Jon's user avatar
  • 4,732
100 votes
5 answers
38k views

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. ...
iPhoneDev's user avatar
  • 2,995
90 votes
16 answers
90k views

Loading a Reusable UITableViewCell from a Nib

I am able to design custom UITableViewCells and load them just fine using the technique described in the thread found at http://forums.macrumors.com/showthread.php?t=545061. However, using that ...
Greg Martin's user avatar
  • 5,074
89 votes
5 answers
52k views

Tricks for improving iPhone UITableView scrolling performance?

I have a uitableview that loads fairly large images in each cell and the cell heights vary depending on the size of the image. Scrolling performance is decent, but can sometimes be jerky. I found ...
Jonah's user avatar
  • 4,820
87 votes
22 answers
75k views

iPhone: Hide UITableView search bar by default

I used the Interface Builder to create a table view, to which I added the library's Search Bar and Search Display Controller to add search functionality. However, IB set it up so that the bar is ...
Tim's user avatar
  • 59.8k
87 votes
6 answers
55k views

iPhone: Show modal UITableViewController with Navigation bar

I am showing a modal view which is a UITableViewController class. For some reason it won't show the navigation bar when I show it. Here is my code: SettingsCreateAccount *detailViewController = [[...
Nic Hubbard's user avatar
  • 41.9k
85 votes
4 answers
74k views

Using [UIColor colorWithRed:green:blue:alpha:] doesn't work with UITableView seperatorColor?

I'm trying to configure a dark gray seperator color. Why does the following do nothing? self.tableView.seperatorStyle = UITableViewCellSeperatorStyleSingleLine; self.tableView.seperatorColor = [...
skålfyfan's user avatar
  • 5,071
83 votes
6 answers
63k views

UISwitch in a UITableView cell

How can I embed a UISwitch on a UITableView cell? Examples can be seen in the settings menu. My current solution: UISwitch *mySwitch = [[[UISwitch alloc] init] autorelease]; cell.accessoryView = ...
testing's user avatar
  • 20k
82 votes
21 answers
61k views

How to remove the last border of the last cell in UITableView?

In my app, I use a UITableView My problem is that I want to remove the last border of the last cell in UITableView. Please check the following image:
user avatar
82 votes
9 answers
62k views

iPhone UITableView. How do turn on the single letter alphabetical list like the Music App?

In the iPhone music app, selecting Artist, Songs, or Albums presents a tableView with a verticl list of single letters at the righthand side of the UI that enables rapid scrolling. How do I enable ...
dugla's user avatar
  • 12.9k
81 votes
24 answers
61k views

cellForRowAtIndexPath: not called

My app has two states: logged in and not logged in, and I have the following architecture (vastly simplified): - ViewController A which contains a search box and a table view. - ViewController B which ...
Stelian Iancu's user avatar
81 votes
14 answers
176k views

UITableView Separator line

How can I change the separator line that appears at the end of each cell in UITableView? I want to have an image that is a thin separator type line image.
Mobile Developer iOS Android's user avatar
81 votes
17 answers
129k views

How to set the height of table header in UITableView?

I have gone through Apple docs about UITableView class and delegate reference but couldn't find the way to set the table header height explicitly. I set Table cell height using following delegate: -(...
Paresh Masani's user avatar
80 votes
5 answers
157k views

How to insert new cell into UITableView in Swift

I'm working on a project where I have two UITableViews and two UITextFields, when the user presses the button the data in the first textField should go into the tableView and the second go into the ...
code Horizons's user avatar
78 votes
4 answers
35k views

How to change uitableview delete button text

Hi there I am trying to change the text that is showing in the delete button when a user swipes a uitableviewcell inside my tableview. I have seen an example in another question thread that says to ...
C.Johns's user avatar
  • 10.2k

1
2 3 4 5
263