Separating dataSource and delegate
Why did Apple design UITableView with two protocols, dataSource and delegate, instead of just letting you hand it a data array?
Why did Apple design UITableView with two protocols, dataSource and delegate, instead of just letting you hand it a data array?
dataSource is what to show and how many, delegate is how it looks and how it responds; the two change for different reasons. Because it's a protocol and not an array, the table view doesn't know the data type and lazily requests only the cells it needs.
UIKitMultiple choiceBasics
In a UITableView that doesn't use estimatedRowHeight, what's the correct order these four…
#uitableview #datasource #objective-c
UIKitShort answerAdvanced
Each cell in a UITableView flash sale list shows a countdown like "Time left 00:12:34"…
#uitableview #objective-c
Memory and ARCShort answerBasics
You try to declare weak var delegate: MyDelegate? and the compiler rejects it. Why, and…
#delegate #protocol
UIKitShort answerAdvanced
Each post in a feed has to send an impression event exactly once when it has been at…
#uitableview