views:

266

answers:

1

how to use UISegmentedControl to change datasource in tableview? with sql tables or read data from arrays thanks

+2  A: 
  1. Use -addTarget:action:forControlEvents: (with events UIControlEventValueChanged) to set up a response action for the segmented control.
  2. In the action, check the sender's selectedSegmentIndex property. Use this to determine which data source to use.
  3. Change the table view's dataSource property.
KennyTM
@user: What textLabel? You did not mention textLabel in the question.
KennyTM
opps sorry sorry again