Code Monkey home page Code Monkey logo

Comments (14)

raulriera avatar raulriera commented on July 18, 2024

viewDidLoad hasn't finished calculating the sizes of your view controller, have you tried using viewWillAppear? Technically this is the event you want if you want to display the keyboard

from textfieldeffects.

DieGlueckswurst avatar DieGlueckswurst commented on July 18, 2024

Tried this: override func viewWillAppear(_ animated: Bool) { self.emailTextField.becomeFirstResponder() } but that doesn't change anything

from textfieldeffects.

raulriera avatar raulriera commented on July 18, 2024

You need to call super.viewWillAppear(animated: animated) before your first responder. If that doesn't work, make sure your constraints are setup correctly.

Try reproducing the issue in the demo project, that will help me more

from textfieldeffects.

DieGlueckswurst avatar DieGlueckswurst commented on July 18, 2024

Didn't work either :( Pretty sure the constraints are correct. You can just look at my git:

https://github.com/DieGlueckswurst/Wishlist

Just run the project and click on "Mit Email fortfahren".
The code is inside ViewControllers -> StartingVC -> EmailVC

from textfieldeffects.

raulriera avatar raulriera commented on July 18, 2024

You seem to be overwriting the rect methods, try using the library directly to see if the problem persists https://github.com/DieGlueckswurst/Wishlist/blob/5d8a09ce9db4fe53f22c66f1684a158bb77a0e1f/Wishlist/Helpers/TextfieldExtensions/CustomTextField.swift

If not, please try to reproduce on the demo project

from textfieldeffects.

DieGlueckswurst avatar DieGlueckswurst commented on July 18, 2024

Ok I created a demo project and it is not the same error but now the Textfield doesn't get displayed at all if I call becomeFirstResponder

Here is the demo project: https://gofile.io/?c=j9qqLn

from textfieldeffects.

DieGlueckswurst avatar DieGlueckswurst commented on July 18, 2024

any idea why that happens?

from textfieldeffects.

raulriera avatar raulriera commented on July 18, 2024

Sorry, when I mentioned demo project I mean the one that comes with the library

from textfieldeffects.

DieGlueckswurst avatar DieGlueckswurst commented on July 18, 2024

sorry I am not quite following you there, don't know too much about git. Could you just use my demoproject? Or maybe try it out yourself in one of your projects? If it is working for you then I know that I messed up myself :)

from textfieldeffects.

DieGlueckswurst avatar DieGlueckswurst commented on July 18, 2024

any Updates on this?

from textfieldeffects.

DieGlueckswurst avatar DieGlueckswurst commented on July 18, 2024

any updates on this?

from textfieldeffects.

raulriera avatar raulriera commented on July 18, 2024

Hey, no... you haven't done what I requested. #198 (comment) this library comes with a demo project, can you please reproduce the problem there?

from textfieldeffects.

DieGlueckswurst avatar DieGlueckswurst commented on July 18, 2024

alright, I reproduced the problem and uploaded it :) You can also very easily try it yourself by just calling "becomeFirstResponder" inside "viewDidLoad". Like I said in the comments above, calling it inside viewWillAppear is not solving the problem :/

from textfieldeffects.

DieGlueckswurst avatar DieGlueckswurst commented on July 18, 2024

did you see what I uploaded ?

from textfieldeffects.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.