@@ -98,11 +98,16 @@ final class OrderStatusListViewController: UIViewController {
9898//
9999extension OrderStatusListViewController {
100100 func configureNavigationBar( ) {
101+ configureNavigationBarStyle ( )
101102 configureTitle ( )
102103 configureLeftButton ( )
103104 configureRightButton ( )
104105 }
105106
107+ func configureNavigationBarStyle( ) {
108+ navigationController? . navigationBar. barStyle = . black
109+ }
110+
106111 func configureTitle( ) {
107112 title = NSLocalizedString ( " Order Status " , comment: " Change order status screen - Screen title " )
108113 }
@@ -196,6 +201,10 @@ private extension OrderStatusListViewController {
196201// MARK: - UITableViewDatasource conformance
197202//
198203extension OrderStatusListViewController : UITableViewDataSource {
204+ func numberOfSections( in tableView: UITableView ) -> Int {
205+ return statusResultsController. sections. count
206+ }
207+
199208 func tableView( _ tableView: UITableView , numberOfRowsInSection section: Int ) -> Int {
200209 return statusResultsController. sections [ section] . numberOfObjects
201210 }
@@ -217,6 +226,11 @@ extension OrderStatusListViewController: UITableViewDataSource {
217226// MARK: - UITableViewDelegate conformance
218227//
219228extension OrderStatusListViewController : UITableViewDelegate {
229+ func tableView( _ tableView: UITableView , heightForHeaderInSection section: Int ) -> CGFloat {
230+ // iOS 11 table bug. Must return a tiny value to collapse `nil` or `empty` section headers.
231+ return CGFloat . leastNonzeroMagnitude
232+ }
233+
220234 func tableView( _ tableView: UITableView , didSelectRowAt indexPath: IndexPath ) {
221235 selectedStatus = statusResultsController. object ( at: indexPath)
222236 }
@@ -235,6 +249,7 @@ extension OrderStatusListViewController {
235249
236250 AppDelegate . shared. noticePresenter. enqueue ( notice: notice)
237251 }
252+
238253 /// Displays the `Unable to Change Status of Order` Notice.
239254 ///
240255 func displayErrorNotice( orderID: Int ) {
0 commit comments