ios - How do I use a UISegmentedControl to switch views? -


How do I want to use different states of a UISegmentedControl, like how Apple does the app store When switching between 'Top Paid' and 'Top Free' in

The easiest way is to show which view you can select to see two scenes Can change their visibility here. Here is some sample code how this can be done, certainly not an optimized way of handling ideas, but to demonstrate that you want to < Em> UISegmentControl How to use:

- (IBAction) Segmentsvich: (id) sender {UISegmentedControl * segmentedControl = (UISegmentedControl *) sender; NSInteger Segment = Fragmented Control. Selected SegmentIndex; If (selected partition == 0) {// Toggle the right view to be visible [previously set view set: No]; [Second View Set Handled: Yes]; } Else {// Toggle the right view to be visible [Set the first view Head: Yes]; [Second View Set Handled: No]; }}


You can make the factor again to show / show the correct view of the code correctly.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -