From b99195dbce7df108dd2cac78475e16d6d3ae50a5 Mon Sep 17 00:00:00 2001 From: David Date: Sat, 5 Dec 2015 14:17:02 -0800 Subject: [PATCH] Fix log bug in demo. --- DLRadioButton.podspec.json | 4 ++-- .../DLRadioButtonExample/DLDemoViewController.m | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/DLRadioButton.podspec.json b/DLRadioButton.podspec.json index 694a176..0b00e3f 100644 --- a/DLRadioButton.podspec.json +++ b/DLRadioButton.podspec.json @@ -1,6 +1,6 @@ { "name": "DLRadioButton", - "version": "1.4.2", + "version": "1.4.3", "summary": "A highly customizable Radio Button for iOS", "description": "A highly customizable Radio Button for iOS.\n\n* Buttons are drew by UIBezierPath, customize it however you want.\n* You can also use pictures to indicate buttons' selection state.\n", "homepage": "https://github.com/DavydLiu/DLRadioButton", @@ -17,7 +17,7 @@ }, "source": { "git": "https://github.com/DavydLiu/DLRadioButton.git", - "tag": "1.4.2" + "tag": "1.4.3" }, "source_files": "DLRadioButton/**/*.{h,m}", "exclude_files": "Classes/Exclude", diff --git a/DLRadioButtonExample/DLRadioButtonExample/DLDemoViewController.m b/DLRadioButtonExample/DLRadioButtonExample/DLDemoViewController.m index fb4ae97..b577700 100644 --- a/DLRadioButtonExample/DLRadioButtonExample/DLDemoViewController.m +++ b/DLRadioButtonExample/DLRadioButtonExample/DLDemoViewController.m @@ -5,7 +5,13 @@ @implementation DLDemoViewController #pragma mark - Helpers - (IBAction)logSelectedButton:(DLRadioButton *)radiobutton { - NSLog(@"%@ is selected.\n", radiobutton.selectedButton.titleLabel.text); + if (radiobutton.isMultipleSelectionEnabled) { + for (DLRadioButton *button in radiobutton.selectedButtons) { + NSLog(@"%@ is selected.\n", button.titleLabel.text); + } + } else { + NSLog(@"%@ is selected.\n", radiobutton.selectedButton.titleLabel.text); + } } #pragma mark - UIViewController