andreamazz / andreamazz/AMScrollingNavbar

TableView Sections not moving

Đang mở
#283 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Swift
Star
6k
Fork
628
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Hello!
Thank you for your library!
I note that Table view sections do not moving when scrolling enabled.
```
import UIKit
import AMScrollingNavbar

class TVCTableViewController: UITableViewController {

override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)

if let navigationController = navigationController as? ScrollingNavigationController {
print("FOLLOW")
navigationController.followScrollView(tableView, delay: 0)
}
}

override func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = UIView(frame: CGRect(x: 0, y: 0, width: tableView.frame.width, height: 60))
view.backgroundColor = .red
return view
}

override func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return 60.0
}


// MARK: - Table view data source

override func numberOfSections(in tableView: UITableView) -> Int {
// #warning Incomplete implementation, return the number of sections
return 1
}

override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
// #warning Incomplete implementation, return the number of rows
return 20
}

override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath)

return cell
}

}
```
![simulator screen shot - iphone 7 - 2017-10-23 at 10 08 44](https://user-images.githubusercontent.com/3396425/31876192-2ddac318-b7da-11e7-88a5-1f7353063997.png)
![simulator screen shot - iphone 7 - 2017-10-23 at 10 08 48](https://user-images.githubusercontent.com/3396425/31876191-2dc0e042-b7da-11e7-93d2-05488aa1a6b2.png)

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.