-
Notifications
You must be signed in to change notification settings - Fork 40
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
[MOB-14384] - API to modify Floating button image #633
Conversation
/// - imageData : The `Data` representation of a UIImage | ||
public func setButtonImage(imageData: Data) { | ||
DispatchQueue.main.async { | ||
let image = UIImage(data: imageData) |
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.
Any reason we can't just take in a UIImage
instead of Data
? If not, I wonder if creating the UIImage
off the main thread may be slightly more responsible.
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.
taking in Data
is more generic than UIImage. Given that UIImage is available in TVOS and iOS and not in watchOS (WKInterfaceImage)... Let me know otherwise (if there is any benefits passing UIImage)
+1 for moving UIImage creation outside the main thread
@@ -63,6 +63,17 @@ public class FloatingButton: NSObject, FloatingButtonPresentable { | |||
} | |||
} | |||
|
|||
/// Set the Image for the floating button. |
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.
My personal opinion here: But I don't think it is necessary to include doc comments on functions where the doc comment is defined in the protocol for the function.
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.
Agreed it was repetitive
Codecov Report
@@ Coverage Diff @@
## dev-v3.1.4 #633 +/- ##
==============================================
- Coverage 85.32% 85.29% -0.03%
==============================================
Files 104 104
Lines 4620 4624 +4
==============================================
+ Hits 3942 3944 +2
- Misses 678 680 +2 |
No description provided.