-
Notifications
You must be signed in to change notification settings - Fork 193
Added a delegate protocol for user's finishing of interaction #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,6 +24,8 @@ | |
|
|
||
| typedef BOOL(^HCSStarRatingViewShouldBeginGestureRecognizerBlock)(UIGestureRecognizer *gestureRecognizer); | ||
|
|
||
| @protocol HCSStarRatingViewDelegate; | ||
|
|
||
| IB_DESIGNABLE | ||
| @interface HCSStarRatingView : UIControl | ||
| @property (nonatomic) IBInspectable NSUInteger maximumValue; | ||
|
|
@@ -42,5 +44,13 @@ IB_DESIGNABLE | |
| @property (nonatomic, strong) IBInspectable UIImage *emptyStarImage; | ||
| @property (nonatomic, strong) IBInspectable UIImage *halfStarImage; | ||
| @property (nonatomic, strong) IBInspectable UIImage *filledStarImage; | ||
|
|
||
| @property (nonatomic, weak) IBOutlet id<HCSStarRatingViewDelegate> delegate; | ||
| @end | ||
|
|
||
| @protocol HCSStarRatingViewDelegate <NSObject> | ||
|
|
||
| @optional | ||
| - (void)userFinishedRatingOnView:(HCSStarRatingView*)ratingView withRating:(CGFloat)value; | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we rename this to something like Makes more sense to me as a delegate API.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, I also think it's kinda clunky at the moment.
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cool, in that case I'll merge the PR and update the pod once this is changed. Thanks! 😄
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, this could just be |
||
|
|
||
| @end | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love that you made this an outlet! ❤️