Is there a way to make UITableView cells in iOS 7 not have a line break in the separator?

For iOS7: if ([self.tableView respondsToSelector:@selector(setSeparatorInset:)]) { [self.tableView setSeparatorInset:UIEdgeInsetsZero]; } For iOS8: First configure your table view as follows: if ([self.tableView respondsToSelector:@selector(layoutMargins)]) { self.tableView.layoutMargins = UIEdgeInsetsZero; } Then in your cellForRowAtIndexPath: method, configure the cell as follows: if ([cell respondsToSelector:@selector(layoutMargins)]) { cell.layoutMargins = UIEdgeInsetsZero; } Note: Include both layoutMargins and separatorInset, to support both iOS versions

Setting style of UITableViewCell when using iOS 6 UITableView dequeueReusableCellWithIdentifier:forIndexPath:

I know you said you didn’t want to create a subclass, but it looks inevitable. Based on the assembly code while testing in the iOS 6.0 simulator, UITableView creates new instances of UITableViewCell (or its subclasses) by performing [[<RegisteredClass> alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:<ReuseIdentifier>] In other words, the style sent (UITableViewCellStyleDefault) appears to be hard-coded. To get … Read more

UITableView is starting with an offset in iOS 7

The new iOS 7 implementation of UIViewController has a new set of options that allows the developer to choose if the system will automatically add insets for UIScrollView, UITableView and derivations. To disable this behaviour uncheck these boxes for all your wanted UIViewControllers in InterfaceBuilder, on UIViewController selected object inspector: For more details: Submit your … Read more

iOS 7 – How to display a date picker in place in a table view?

With iOS7, Apple released the sample code DateCell. Demonstrates formatted display of date objects in table cells and use of UIDatePicker to edit those values. As a delegate to this table, the sample uses the method “didSelectRowAtIndexPath” to open the UIDatePicker control. For iOS 6.x and earlier, UIViewAnimation is used for sliding the UIDatePicker up … Read more

How to Implement Custom Table View Section Headers and Footers with Storyboard

Just use a prototype cell as your section header and / or footer. add an extra cell and put your desired elements in it. set the identifier to something specific (in my case SectionHeader) implement the tableView:viewForHeaderInSection: method or the tableView:viewForFooterInSection: method use [tableView dequeueReusableCellWithIdentifier:] to get the header implement the tableView:heightForHeaderInSection: method. -(UIView *) … Read more

tech