Skip to content

Commit

Permalink
Fix some searchbar inconsistencies
Browse files Browse the repository at this point in the history
It's now set to inactive on segue to mapVC, but my UX feeling says that
this shouldn't be happening, as a user's search result is typically not
removed when coming back from a detailvc.

Also only scroll past searchbar if tableview is at the top. But all of
this is rather unclean as well. I think other apps just show their
search bar... But every option looks so wrong here :/

See #40
  • Loading branch information
kiliankoe committed Apr 13, 2015
1 parent f9bb443 commit 40c2d50
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ParkenDD/LotlistViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ class LotlistViewController: UITableViewController, CLLocationManagerDelegate, U
let mapVC: MapViewController = segue.destinationViewController as! MapViewController
mapVC.detailParkinglot = selectedParkinglot
mapVC.allParkinglots = parkinglots

// searchController.active = false
}
}

Expand Down Expand Up @@ -148,7 +150,9 @@ class LotlistViewController: UITableViewController, CLLocationManagerDelegate, U

// Scroll to first row to "hide" the searchcontroller by default
// This has to be done at a point where the table view actually contains data
// self.tableView.scrollToRowAtIndexPath(NSIndexPath(forRow: 0, inSection: 0), atScrollPosition: UITableViewScrollPosition.Top, animated: false)
// if self.tableView.contentOffset.y < 60.0 {
// self.tableView.scrollToRowAtIndexPath(NSIndexPath(forRow: 0, inSection: 0), atScrollPosition: UITableViewScrollPosition.Top, animated: false)
// }
})
}
}
Expand Down

0 comments on commit 40c2d50

Please sign in to comment.