Hello,
I have no idea what is going wrong. I’m trying to implement the UITableView-Interfaces but the compiler fails with the errors
(E179) Method "method tableView(tableView: not nullable UITableView) numberOfRowsInSection(section: NSInteger): NSInteger" not implemented as required for interface "IUITableViewDataSource"
and
(E179) Method "method tableView(tableView: not nullable UITableView) cellForRowAtIndexPath(indexPath: not nullable NSIndexPath): not nullable UITableViewCell" not implemented as required for interface "IUITableViewDataSource"
This is strange because the headers are exactly the same. What is wrong?
namespace TableViewTest;
interface
uses
UIKit;
type
[IBObject]
RootViewController = public class(UIViewController, IUITableViewDataSource, IUITableViewDelegate)
private
protected
method tableView(tableView: UITableView) numberOfRowsInSection(section: NSInteger): NSInteger;
method tableView(tableView: UITableView) cellForRowAtIndexPath(indexPath: NSIndexPath): UITableViewCell;
method tableView(tableView: UIKit.UITableView) didSelectRowAtIndexPath(indexPath: Foundation.NSIndexPath);
public
method viewDidLoad; override;
method didReceiveMemoryWarning; override;
end;
implementation
method RootViewController.viewDidLoad;
begin
inherited viewDidLoad;
end;
method RootViewController.didReceiveMemoryWarning;
begin
inherited didReceiveMemoryWarning;
end;
method RootViewController.tableView(tableView: UITableView) numberOfRowsInSection(section: NSInteger): NSInteger;
begin
exit 0;
end;
method RootViewController.tableView(tableView: UITableView) cellForRowAtIndexPath(indexPath: NSIndexPath): UITableViewCell;
begin
exit nil;
end;
method RootViewController.tableView(tableView: UITableView) didSelectRowAtIndexPath(indexPath: NSIndexPath);
begin
end;
end.
Best regards
Benny