开发者

how to use UISegmentedControl to change datasource in tableview

开发者 https://www.devze.com 2022-12-25 08:49 出处:网络
how to use UISegmentedControl to change datasource in tableview? with sql tables or read data from arrays 开发者_开发知识库

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

精彩评论

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