list_view
as delegate
and dataSource
, and pin all references in both GCs
# Assign `list_view` as `delegate` and `dataSource`, and pin all references in both GCs
private fun assign_delegate_and_data_source(list_view: TableView)
import TableView.number_of_sections_in_table_view,
TableView.number_of_rows_in_section,
TableView.title_for_header_in_section,
TableView.cell_for_row_at_index_path in "ObjC" `{
UITableViewAndDataSource *objc_delegate = [[UITableViewAndDataSource alloc] init];
objc_delegate = (__bridge UITableViewAndDataSource*)CFBridgingRetain(objc_delegate);
objc_delegate.nit_list_layout = list_view;
TableView_incr_ref(list_view);
// Set our
self.delegate = objc_delegate;
self.dataSource = objc_delegate;
`}
lib/ios/ui/ui.nit:600,2--616,3