Skip to content
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

feat: Make the coordinates of the screen point configurable #215

Merged
merged 4 commits into from
Sep 11, 2019

Conversation

mykola-mokhnach
Copy link

Hardcoded values were never a good approach. With this PR the screen point is going to be configurable via settings

NSCharacterSet.whitespaceAndNewlineCharacterSet];
NSString *strY = [screenPointCoords.lastObject stringByTrimmingCharactersInSet:
NSCharacterSet.whitespaceAndNewlineCharacterSet];
if (0 == strX.length || 0 == strY.length) {
Copy link
Member

@KazuCocoa KazuCocoa Sep 10, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about returning an error if the X/Y is greater than screen size with a message like 'the x/y must be less than screen size', too?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't want to control it so much. The coordinates might become valid if screen resolution is changed, for example. Or an external display is connected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants