开发者

how to use UISegmentedControl to change datasource in tableview

how to use UISegmentedControl to change datasource in tableview? with sql tables or read data from arrays 开发者_开发知识库 thanks


  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.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜