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

Reposition KGModal when Keyboard is present. Fixes issue #19 #26

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

ashikahmad
Copy link
Contributor

This is a feature when you have textfield/textview in KGModal and want to reposition when keyboard appears.
This behaviour is kept optional as it is not may be an everyday use.
But when you need this behaviour, just use -
responsiveToKeyboard = YES
...and you are all set!

Note: check example to see this in action.

closeFrame.origin.x = CGRectGetWidth(containerView.bounds)-CGRectGetWidth(closeFrame);
closeButton.frame = closeFrame;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The above calculation for right-side close button frame is done at line [141 | 222] by recalling setter. So not needed here anymore.
And furthermore, it is better to have this calculated from one place so we can update them easily (if needed) without breaking anything.

@@ -1,41 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added xccheckout file to .gitignore

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.

1 participant