forked from DavydLiu/DLRadioButton
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for RTL interface layout.
Updated API comments.
- Loading branch information
Showing
12 changed files
with
106 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
DLRadioButton.xcodeproj/xcshareddata/xcschemes/DLRadioButton.xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,85 +1,89 @@ | ||
#import <UIKit/UIKit.h> | ||
|
||
/** | ||
A hightly customizable Radio Button for iOS. | ||
*/ | ||
* A hightly customizable Radio Button for iOS. | ||
*/ | ||
IB_DESIGNABLE | ||
@interface DLRadioButton : UIButton | ||
|
||
/**@name Properties*/ | ||
/** | ||
Container for holding other buttons in same group. | ||
*/ | ||
* Container for holding other buttons in same group. | ||
*/ | ||
@property (nonatomic) IBOutletCollection(DLRadioButton) NSArray *otherButtons; | ||
|
||
/** | ||
Size of icon, default is kDefaulIconSize. | ||
*/ | ||
* Size of icon, default is kDefaulIconSize. | ||
*/ | ||
@property (nonatomic) IBInspectable CGFloat iconSize; | ||
|
||
/** | ||
Color of icon, default is title color for current UIControlState. | ||
* Color of icon, default is title color for current UIControlState. | ||
*/ | ||
@property (nonatomic) IBInspectable UIColor *iconColor; | ||
|
||
/** | ||
Stroke width of icon, default is iconSize / 9. | ||
* Stroke width of icon, default is iconSize / 9. | ||
*/ | ||
@property (nonatomic) IBInspectable CGFloat iconStrokeWidth; | ||
|
||
/** | ||
Size of selection indicator, default is iconSize * 0.5. | ||
* Size of selection indicator, default is iconSize * 0.5. | ||
*/ | ||
@property (nonatomic) IBInspectable CGFloat indicatorSize; | ||
|
||
/** | ||
Color of selection indicator, default is title color for current UIControlState. | ||
*/ | ||
* Color of selection indicator, default is title color for current UIControlState. | ||
*/ | ||
@property (nonatomic) IBInspectable UIColor *indicatorColor; | ||
|
||
/** | ||
Margin width between icon and title, default is kDefaultMarginWidth. | ||
* Margin width between icon and title, default is kDefaultMarginWidth. | ||
*/ | ||
@property (nonatomic) IBInspectable CGFloat marginWidth; | ||
|
||
/** | ||
Whether icon on the right side, default is NO. | ||
*/ | ||
@property (nonatomic, getter=isIconOnRight) IBInspectable BOOL iconOnRight; | ||
* Whether icon on the right side, default is NO. | ||
* @warning Please also set contentHorizontalAlignment to UIControlContentHorizontalAlignmentRight. | ||
*/ | ||
@property (nonatomic, getter = isIconOnRight) IBInspectable BOOL iconOnRight; | ||
|
||
/** | ||
Whether use square icon, default is NO. | ||
*/ | ||
@property (nonatomic, getter=isIconSquare) IBInspectable BOOL iconSquare; | ||
* Whether use square icon, default is NO. | ||
*/ | ||
@property (nonatomic, getter = isIconSquare) IBInspectable BOOL iconSquare; | ||
|
||
/** | ||
Image for radio button icon (optional). | ||
* Image for radio button icon (optional). | ||
*/ | ||
@property (nonatomic) IBInspectable UIImage *icon; | ||
|
||
/** | ||
Image for radio button icon when selected (optional). | ||
* Image for radio button icon when selected (optional). | ||
*/ | ||
@property (nonatomic) IBInspectable UIImage *iconSelected; | ||
|
||
/** | ||
Whether enable multiple selection, default is NO. | ||
* Whether enable multiple selection, default is NO. | ||
*/ | ||
@property (nonatomic, getter=isMultipleSelectionEnabled) BOOL multipleSelectionEnabled; | ||
@property (nonatomic, getter = isMultipleSelectionEnabled) BOOL multipleSelectionEnabled; | ||
|
||
/** | ||
@return Selected button in same group. | ||
* Finds out selected button in same group. | ||
* | ||
* @return Selected button. | ||
*/ | ||
- (DLRadioButton *)selectedButton; | ||
|
||
/** | ||
@return Selected buttons in same group, use it only if multiple selection is enabled. | ||
* Finds out selected buttons in same group, use it only if multiple selection is enabled. | ||
* | ||
* @return Selected buttons. | ||
*/ | ||
- (NSArray *)selectedButtons; | ||
|
||
/** | ||
Clears selection for other buttons in in same group. | ||
*/ | ||
* Clears selection for other buttons in in same group. | ||
*/ | ||
- (void)deselectOtherButtons; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,85 +1,89 @@ | ||
#import <UIKit/UIKit.h> | ||
|
||
/** | ||
A hightly customizable Radio Button for iOS. | ||
*/ | ||
* A hightly customizable Radio Button for iOS. | ||
*/ | ||
IB_DESIGNABLE | ||
@interface DLRadioButton : UIButton | ||
|
||
/**@name Properties*/ | ||
/** | ||
Container for holding other buttons in same group. | ||
*/ | ||
* Container for holding other buttons in same group. | ||
*/ | ||
@property (nonatomic) IBOutletCollection(DLRadioButton) NSArray *otherButtons; | ||
|
||
/** | ||
Size of icon, default is kDefaulIconSize. | ||
*/ | ||
* Size of icon, default is kDefaulIconSize. | ||
*/ | ||
@property (nonatomic) IBInspectable CGFloat iconSize; | ||
|
||
/** | ||
Color of icon, default is title color for current UIControlState. | ||
* Color of icon, default is title color for current UIControlState. | ||
*/ | ||
@property (nonatomic) IBInspectable UIColor *iconColor; | ||
|
||
/** | ||
Stroke width of icon, default is iconSize / 9. | ||
* Stroke width of icon, default is iconSize / 9. | ||
*/ | ||
@property (nonatomic) IBInspectable CGFloat iconStrokeWidth; | ||
|
||
/** | ||
Size of selection indicator, default is iconSize * 0.5. | ||
* Size of selection indicator, default is iconSize * 0.5. | ||
*/ | ||
@property (nonatomic) IBInspectable CGFloat indicatorSize; | ||
|
||
/** | ||
Color of selection indicator, default is title color for current UIControlState. | ||
*/ | ||
* Color of selection indicator, default is title color for current UIControlState. | ||
*/ | ||
@property (nonatomic) IBInspectable UIColor *indicatorColor; | ||
|
||
/** | ||
Margin width between icon and title, default is kDefaultMarginWidth. | ||
* Margin width between icon and title, default is kDefaultMarginWidth. | ||
*/ | ||
@property (nonatomic) IBInspectable CGFloat marginWidth; | ||
|
||
/** | ||
Whether icon on the right side, default is NO. | ||
*/ | ||
@property (nonatomic, getter=isIconOnRight) IBInspectable BOOL iconOnRight; | ||
* Whether icon on the right side, default is NO. | ||
* @warning Please also set contentHorizontalAlignment to UIControlContentHorizontalAlignmentRight. | ||
*/ | ||
@property (nonatomic, getter = isIconOnRight) IBInspectable BOOL iconOnRight; | ||
|
||
/** | ||
Whether use square icon, default is NO. | ||
*/ | ||
@property (nonatomic, getter=isIconSquare) IBInspectable BOOL iconSquare; | ||
* Whether use square icon, default is NO. | ||
*/ | ||
@property (nonatomic, getter = isIconSquare) IBInspectable BOOL iconSquare; | ||
|
||
/** | ||
Image for radio button icon (optional). | ||
* Image for radio button icon (optional). | ||
*/ | ||
@property (nonatomic) IBInspectable UIImage *icon; | ||
|
||
/** | ||
Image for radio button icon when selected (optional). | ||
* Image for radio button icon when selected (optional). | ||
*/ | ||
@property (nonatomic) IBInspectable UIImage *iconSelected; | ||
|
||
/** | ||
Whether enable multiple selection, default is NO. | ||
* Whether enable multiple selection, default is NO. | ||
*/ | ||
@property (nonatomic, getter=isMultipleSelectionEnabled) BOOL multipleSelectionEnabled; | ||
@property (nonatomic, getter = isMultipleSelectionEnabled) BOOL multipleSelectionEnabled; | ||
|
||
/** | ||
@return Selected button in same group. | ||
* Finds out selected button in same group. | ||
* | ||
* @return Selected button. | ||
*/ | ||
- (DLRadioButton *)selectedButton; | ||
|
||
/** | ||
@return Selected buttons in same group, use it only if multiple selection is enabled. | ||
* Finds out selected buttons in same group, use it only if multiple selection is enabled. | ||
* | ||
* @return Selected buttons. | ||
*/ | ||
- (NSArray *)selectedButtons; | ||
|
||
/** | ||
Clears selection for other buttons in in same group. | ||
*/ | ||
* Clears selection for other buttons in in same group. | ||
*/ | ||
- (void)deselectOtherButtons; | ||
|
||
@end |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.