TOInsetGroupedTableView is a subclass of UITableView that back-ports the new “inset grouped” visual style introduced in iOS 13 to older versions of iOS.
On iOS 13 and above, it defers back to using the system implementation, meaning absolutely no extra configuration code is required.
This library is fantastic for developers adopting the new rounded corners style of table views in their apps, but are still supporting iOS 12.
TOInsetGroupedTableView
repository.TOInsetGroupedTableView
folder to your own Xcode project.In your app’s Podfile, add:
pod 'TOInsetGroupedTableView'
Integrating TOInsetGroupedTableView
is extremely simple as it introduces no new APIs or changes any external inputs. All that is needed is to replace UITableView()
instantiations with TOInsetGroupedTableView()
.
In Swift, the class is renamed to InsetGroupedTableView
. In order to integrate it, simply replace any instances of
self.tableView = UITableView(frame: .zero, style: .insetGrouped)
with
self.tableView = InsetGroupedTableView(frame: .zero)
No other changes are needed.
Just like in Swift, all that is required is to rename any instantiations of UITableView
with TOInsetGroupedTableView
.
For example, simply replace any instances of:
self.tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleInsetGrouped];
with
self.tableView = [[TOInsetGroupedTableView alloc] initWithFrame:CGRectZero]
GitHub:http://github.com/TimOliver/TOInsetGroupedTableView
#ios #mobile-apps