Could we use UITableViewDataSource, UITableViewDelegate totally replace UITableViewController, for example, is there difference between these two code lines?
@interface ShareViewController : UITableViewController
@interface ShareViewController : UIViewController<UITableViewDataSource, UITableViewDelegate>
There is a BIG difference between these two lines of code. This
@interface ShareViewController : UITableViewController
means that your ShareViewController inherits from UITableViewController, so it provides, for example, an UITableView as main view.
This
@interface ShareViewController : UIViewController<UITableViewDataSource, UITableViewDelegate>
means that your ShareViewController is a classic UIViewController (inherits from UIViewController) and simply implements protocols to manage table views.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With