added switch to show on demo the introduced new feature for multiple selection on pie chart
Showing
3 changed files
with
11 additions
and
1 deletions
This diff is collapsed. Click to expand it.
| @@ -25,12 +25,13 @@ | @@ -25,12 +25,13 @@ | ||
| 25 | @property (weak, nonatomic) IBOutlet UIButton *changeValueButton; | 25 | @property (weak, nonatomic) IBOutlet UIButton *changeValueButton; |
| 26 | 26 | ||
| 27 | @property (weak, nonatomic) IBOutlet UISwitch *leftSwitch; | 27 | @property (weak, nonatomic) IBOutlet UISwitch *leftSwitch; |
| 28 | +@property (weak, nonatomic) IBOutlet UISwitch *centerSwitch; | ||
| 28 | @property (weak, nonatomic) IBOutlet UISwitch *rightSwitch; | 29 | @property (weak, nonatomic) IBOutlet UISwitch *rightSwitch; |
| 29 | @property (weak, nonatomic) IBOutlet UILabel *leftLabel; | 30 | @property (weak, nonatomic) IBOutlet UILabel *leftLabel; |
| 30 | @property (weak, nonatomic) IBOutlet UILabel *rightLabel; | 31 | @property (weak, nonatomic) IBOutlet UILabel *rightLabel; |
| 31 | 32 | ||
| 32 | - (IBAction)rightSwitchChanged:(id)sender; | 33 | - (IBAction)rightSwitchChanged:(id)sender; |
| 33 | - (IBAction)leftSwitchChanged:(id)sender; | 34 | - (IBAction)leftSwitchChanged:(id)sender; |
| 34 | - | 35 | +- (IBAction)rightSwitchChanged:(id)sender; |
| 35 | 36 | ||
| 36 | @end | 37 | @end |
| @@ -344,6 +344,15 @@ | @@ -344,6 +344,15 @@ | ||
| 344 | } | 344 | } |
| 345 | } | 345 | } |
| 346 | 346 | ||
| 347 | +- (IBAction)centerSwitchChanged:(id)sender | ||
| 348 | +{ | ||
| 349 | + if (self.pieChart) | ||
| 350 | + { | ||
| 351 | + [self.pieChart setEnableMultipleSelection:self.centerSwitch.on]; | ||
| 352 | + [self.pieChart strokeChart]; | ||
| 353 | + } | ||
| 354 | +} | ||
| 355 | + | ||
| 347 | - (IBAction)leftSwitchChanged:(id)sender { | 356 | - (IBAction)leftSwitchChanged:(id)sender { |
| 348 | if ([self.title isEqualToString:@"Pie Chart"]){ | 357 | if ([self.title isEqualToString:@"Pie Chart"]){ |
| 349 | UISwitch *showRelative = (UISwitch*) sender; | 358 | UISwitch *showRelative = (UISwitch*) sender; |
-
Please register or login to post a comment