How to see UITableViewDelegate in Builder interface?

I have a UIViewController to which I have added a UITableViewDelegate. This controller has a matching tip. I knitted them in IB. However, the owner of the nib file does not display the table delegate or data source. I have a similar controller and nib where the tableview delegate is displayed in IB. I see no difference in the two.

What am I missing for the table delegate and data source to display in IB?

- EDIT: ANSWER -
This project is tab-based. For the second tab bar, I added a highlighted tip and linked the aforementioned UIViewController to it. The pin always loads, but the tableview delegate does nothing. This is because I need to remove the connection to the view for this controller created using the mainwindow nib element, which runs automatically when the project is created. When a new tab bar project is created, each view is connected. Having an automatic connection to the view plus my custom view connection caused problems with the tableview delegate. IB even displays a small warning in the main window, which I obviously did not see.

+3
source share
2 answers

The delegate protocols UITableView and datasource are related to UITableView - you will only see them if you have a UITableView to attach to it.

You may have seen them appear in the file owner elsewhere if you have a UITableViewController (which is a kind of UIViewController) that probably provides these delegates to be able to set them for the internal UITableView on which it is stored.

0
source

Now your main view is a UIView type, not a UITableView. This way, your file owner will not display the data source or delegate.

, . tableview , .

+2

Source: https://habr.com/ru/post/1731125/


All Articles