Search code examples
iosswiftuitableviewuiscrollviewdelegate

error when i add UIScrollViewDelegate to UItableviewController swift


i get an error when i add UIScrollViewDelegate with UITableViewController so i tried every thing i know but nothing worked `

import UIKit

class TableViewController: UITableViewController, UIScrollViewDelegate {

help me
(sorry for my bad english)


Solution

  • UITableViewController has already contains UIScrollViewDelegate, UITableViewDelegate, UITableViewDataSource

    If you want to use UIScrollViewDelegate methods, just override it the do everything you want.