Tag: uitableview

Populating a UITableView in Firebase a Set Number of Cells at a time

I am using Firebase to populate a UITableView. I was wondering if it’s possible to have Firebase download the first 5 results, and, once the user has scrolled to the last of these, download the next 5 results. At the moment, Firebase downloads all of my child nodes at once, but if it did it […]

Make UITableView selection before view appears

I’m building a detail view for a UITableView. The detail view contains a UITableView which has two rows, and I want the first one to be selected when the detail view is opened. I have tried to use the method [selectRowAtIndexPath:animated:scrollPosition] in [viewWillAppear]: – (void) viewWillAppear:(BOOL)animated { [[self tableView] selectRowAtIndexPath:[NSIndexPath indexPathForRow:kStartDateRow inSection:kSection] animated:NO scrollPosition:UITableViewScrollPositionNone]; } […]

moveRowAtIndexPath without Delete button

I need a help in UITableview specifically – (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath *)destinationIndexPath. In this if i set [tableView setEditing:YES animated:YES]; Then table contains both delete and moveCell feature. But i need only the moveCell feature. I don’t want the delete category. Like this, Is there any way to do this? Helpers are appreciated.

Populating an embedded UITableViewController

I have an app using a navigation controller. In one of the views, I have a view container with an embedded UITableViewController using static cells. I need to populate this table view controller’s labels with data passed in from a previous view. The flow is as follows View1 > segue-> Parent>Child I need to pass […]

how to control table view scrolling speed?

I want control table view scrolling speed?How can I do that programmatically. Please help. Thanks in advance. Jenson Jacob

Which is the best approach among Autolayout or calculating the height using NSAttributedString, to implement dynamic height of an UITableViewCell?

I have followed the tutorial from http://raywenderlich.com/73602/dynamic-table-view-cell-height-auto-layout and implemented the same, but with the release of iOS 8.3, the above tutorial doesn’t seem to be working. Therefore i switched back to the following code which works absolutely fine -(float)height :(NSMutableAttributedString*)string { NSAttributedString *attributedText = string; CGRect rect = [attributedText boundingRectWithSize:CGSizeMake(200, MAXFLOAT) options:(NSStringDrawingUsesLineFragmentOrigin|NSStringDrawingUsesFontLeading) context:nil]; CGSize requiredSize […]

Setting the inputAccessoryView of a UITextField to its superview

I have a UITableView with an Add cell… row and would like to have a keyboard pop up with a view above it like in the “Messages” application, where the user can type the name of the new cell. I realize that there are several other ways to get user data, and several ways to […]

Adding CALayer to UITableViewCell removed after scroll

I am trying to add a CALayer to the bottom part of my UITableViewCell to get a bit of a “shadow” effect. The problem is when the table is scrolled up and off the screen the layer is removed, so when you scroll back down it isn’t visible. If you scroll the cells downward off […]

Why does reloadRowsAtIndexPaths not work for iOS 5.0?

SOLVED: See my answer (and possible explanation) below. I’m making an app that works on iOS 5.1 devices, but not on iOS 5.0 devices. Here is the trouble code that works on 5.1 but NOT on 5.0: – (void) expandIndexPath: (NSIndexPath *) indexPath afterDelay: (BOOL) delay { NSIndexPath *oldSelectedIndexPath = [NSIndexPath indexPathForRow:self.mySelectedIndex inSection:0]; self.mySelectedIndex= indexPath.row; […]

How to hide tab bars and show full tableview on screen?

In my app’s implementation, I have a tabbar controller with 5 different tabs. After I hide my tab bar via the following code – (void)hideTabBar { for(UIView *view in self.tabController.view.subviews) { if([view isKindOfClass:[UITabBar class]] || [view isKindOfClass:[UIButton class]]) { view.hidden = YES; } } } I still see the bottom portion of my tableview obscured […]