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

Fix keyboard scroll behavior & session refresh #119

Merged
merged 3 commits into from
Sep 21, 2017
Merged

Conversation

kvld
Copy link
Contributor

@kvld kvld commented Sep 21, 2017

Коротко для Release Notes, в формате «Сделали/Добавили/Исправили N»:
Фикс пустой сессии при регистрации, скролл клавиатуры

Описание:

  • Клавиатура при фокусе на последнем текстовом поле скроллится так, чтобы пользователю была доступна кнопка отправки формы. Проблемы со скачущей вёрсткой пока непонятно как фиксить, подождем обновление IQKeyboardManager.
  • Сессия могла оказаться необновленной и регистрация повисала. Теперь регистрация обёрнута в performRequest, чтобы рефрешить сессию, когда нужно.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@kvld kvld added this to the 1.43 milestone Sep 21, 2017
@kvld kvld self-assigned this Sep 21, 2017
@kvld kvld requested a review from Ostrenkiy September 21, 2017 13:45
@@ -209,6 +212,8 @@ class EmailAuthViewController: UIViewController {
extension EmailAuthViewController: UITextFieldDelegate {
func textFieldDidBeginEditing(_ textField: UITextField) {
AnalyticsReporter.reportEvent(AnalyticsEvents.SignIn.Fields.tap, parameters: nil)
// 24 - default value in app (see AppDelegate), 60 - offset with button
IQKeyboardManager.sharedManager().keyboardDistanceFromTextField = textField == passwordTextField ? 60 : 24
Copy link
Contributor

Choose a reason for hiding this comment

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

ты потом это в дефолтное значение возвращаешь где-нибудь?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Теперь оно возвращается в viewDidDisappear().

@@ -190,6 +193,8 @@ class RegistrationViewController: UIViewController {
extension RegistrationViewController: UITextFieldDelegate {
func textFieldDidBeginEditing(_ textField: UITextField) {
AnalyticsReporter.reportEvent(AnalyticsEvents.SignUp.Fields.tap, parameters: nil)
// 24 - default value in app (see AppDelegate), 60 - offset with button
IQKeyboardManager.sharedManager().keyboardDistanceFromTextField = textField == passwordTextField ? 60 : 24
Copy link
Contributor

Choose a reason for hiding this comment

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

дефолтное значение надо руками возвращать потом?

@kvld kvld merged commit 77ee316 into dev Sep 21, 2017
@kvld kvld deleted the fix/keyboard-scroll branch September 21, 2017 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants