Tag: uitableview

I want to be able to scroll a UITableViewCell left and right using a Storyboard. Is this not possible?

I’ve tried every thing I can think of, and nothing is working. Similar to the effect in iOS 7’s Mail.app, I want to be able to slide the cells of my table view right and left. I want to be able to do this in a Storyboard and Auto Layout, as most of my app […]

Set background color of UITableViewCell

I have looked around to find a solution for setting the background color of the accessoryView to the same background color as the cellĀ“s contentView. cell.contentView.backgroundColor = [UIColor colorWithRed:178/255.f green:14/255.f blue:12/255.f alpha:0.05]; cell.accessoryView.backgroundColor =[UIColor colorWithRed:178/255.f green:14/255.f blue:12/255.f alpha:0.05]; There is a solution that works but only let me use one color for all cells. cell.contentView.superView.backgroundColor […]

Change color of alternate row in UITableView for iPhone SDK

In my app, I want to display multi-column tableView in iPad. So, I used a cocoa control from :MultiColumn TableView it works fine for me, But I want to display the rows in alternate color. For this, I am not able to find where I change the code for it. Help me to solve this […]

Problem detecting if UITableView has scrolled to the bottom

I’m using the following code to detect if I’ve reached the bottom of a UITableView – (void)scrollViewDidScroll:(UIScrollView *)scrollView{ if(self.tableView.contentOffset.y >= (self.tableView.contentSize.height – self.tableView.bounds.size.height)) { NSLog(@”bottom!”); NSLog(@”%@”, [self getLastMessageID]); [self getMoreStuff:[self getLastMessageID]]; } } This works fine, but the only problem is when the user is pulling the tableview down (like pull to refresh) the code […]

Show custom label when no data available for tableView

The app in question has an ability for users to mark items as favourite. When the user has no favourites saved, I’d like to notify them of the fact (mostly I hate the idea of a blank tableView). My numberOfRowsInSection is zero when there are no items the user has marked as favourite. I’d like […]

Best way to create custom UITableview section header in storyboard

Current I am creating a prototype cell in storyboard and using this cell as a section header. Inside tableView:viewForHeaderInSection: method, I am dequeuing the cell and returning it. My section header cell has a UITextField and a UIButton in it. When I tap on text field keyboard appears but as soon as focus is moved […]

UITableView section index related crashes under iOS 7

I have a simple section index for a table view that appears fine for the first time but then crashes if certain kinds of interaction happens that force a redraw of the section index, either by: Pushing a view controller by tapping on one of the cells Tapping on the search bar in the header […]

How to determine if the user has scrolled to the bottom of the UITableView?

How can I determine if the user has scrolled to the last cell/bottom of a UITableView?

How can I animate the dismissal of a UITableView swipe-to-delete button?

As is done in the iPhone Mail app, I would like have the “Delete” button which appears on swiping an editable table cell from right to left to animate when it is dismissed (by way of tapping elsewhere than the Delete button on the UITableViewCell). Instead, my Delete button immediately disappears when it is dismissed. […]

ABTableViewCell – Adding a UIButton

I have been using the ABTableViewCell to create fast scrolling cells. All is working great apart from I can’t figure out how to add a UIButton to my custom cell. When using ABTableViewCell you do all the drawing of the text/images yourself using drawAtPoint or drawInRect. However UIButton doesn’t support any of these methods. You […]