开发者

how to find messages based on world,continent,state,city,region,10miles and 50miles distance

开发者 https://www.devze.com 2023-02-20 07:16 出处:网络
i am new developer on iphone i need your help to do my application.i display all received messages on tableview and place a slider on right side in that slider i write some names (world,co开发者_运维技

i am new developer on iphone i need your help to do my application.i display all received messages on tableview and place a slider on right side in that slider i write some names (world,co开发者_运维技巧ntinent,state,city,region,10miles and 50miles)when selecting any value on the slider (state is selece state wise messages will display) programaticaly how it is possible.


  1. Don't use a slider, use a segmented control. Sliders are for adjusting a single continously variable value. Have the segments named world,continent,state,city,region,10miles and 50miles.
  2. Before displaying the messages, loop through them and set up an array of the messages for each of the options.
  3. Link the segmented control to an IBAction in your view controller. When it gets called, call reloadData on the table view which shows your list of messages.
  4. In your cellForRowAtIndexPath method, use a case structure to select the array from which to assign the text on the cell depending on the value of segmentedControl.selectedSegmentIndex
0

精彩评论

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