问题
As the title, I'd like to place a button over the UITableView, like what they did to the check-in button in Foursquare: you can still roll the table view up and down, but the button will stay at the same position.
Any tips? Thanks!
!
回答1:
If you are using a view controller with a table view inside it, just add another subview of the view, above the table view. If you are using a table view controller, it is a bit more tricky. You can add the button as a subview of the table view, and when the table view scrolls, listen to the scroll view delegate methods of the table view and move your button to offset the scroll, so it appears stationary to the user.
来源:https://stackoverflow.com/questions/20203784/how-to-place-a-button-over-the-uitableview-like-foursquare