how to find messages based on world,continent,state,city,region,10miles and 50miles distance
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.
- 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.
- Before displaying the messages, loop through them and set up an array of the messages for each of the options.
- 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.
- 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
精彩评论