-
Notifications
You must be signed in to change notification settings - Fork 54
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
Adds quick screenshot method to all SLElement objects #129
Conversation
Reduces steps and allows for easy screenshots of individual elements. Should be useful in multiple runs for small UI changes.
My doc generation comments might not be good. Haven't worked that much for Obj-C. Also open to putting a timestamp if a filename isn't provided. I left notes in the comments in the patch. |
/** | ||
Takes a screenshot of the specified element. | ||
|
||
The rect for the screenshot of the element is automatically provided. |
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 don't think we need to mention this--it's kinda an implementation detail.
Thanks for the PR @jzucker2! I think this is a solid addition. Besides the points of style I mention in the diff, one other thing to change is that all user interface elements can make use of this method, so it should be defined in |
Moved element screenshotting to SLUIAElement class.
Updated as per your suggestions. Hope I understand you properly. Looking forward to hearing your feedback. |
Any idea why Travis CI would fail? This isn't drastically different than the previous commit. Seems to be an issue with iPad?? |
When running `subliminal-test` from the command line, the images are also saved | ||
as PNGs within the specified output directory. | ||
|
||
@param filename An optional string to use as the name for the resultant image file (provide 'nil' if you do not want the screenshot to have a name). |
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 think it might be a bit clearer to say "provide nil
to use a generic name."
Ok, I think I'm on the same page as you now. Hope this makes more sense. Thanks for the suggestions. Glad to contribute to this project! |
👍 Thanks again! |
Adds quick screenshot method to all SLElement objects
Reduces steps and allows for easy screenshots of individual
elements. Should be useful in multiple runs for small UI changes.