how to use UISegmentedControl to change datasource in tableview? with sql tables or read data from arrays thanks
+2
A:
- Use
-addTarget:action:forControlEvents:
(with events UIControlEventValueChanged) to set up a response action for the segmented control. - In the action, check the sender's
selectedSegmentIndex
property. Use this to determine which data source to use. - Change the table view's
dataSource
property.
KennyTM
2010-04-04 16:05:24
@user: What textLabel? You did not mention textLabel in the question.
KennyTM
2010-04-04 16:25:18
opps sorry sorry again
2010-04-04 16:27:57