nicklockwood / layout

A declarative UI framework for iOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UITextField unexpected response issues

sidhenn opened this issue · comments

commented

I have a strange problem I cannot figure out. I have used multiple text fields with Layout (ie; login, create account) that all work with the simulator and actual phones like the following.

Version: 0.6.30

   <!-- email -->
    <UITextField
        outlet="emailTextField"
        placeholder="enter your email"
        text="{email}"
        top="previous.bottom + 20"
        left="50% - width/2"
        width="100% - 40"
        height="46"
        layer.cornerRadius="23"
        backgroundColor="UIColor.cararra"
        textAlignment="center"
    />

But the following text field does not work on an iPhone X. I tap in and the text field does not respond by giving me a cursor. This code and text field works fine on an iPhone 6s. I'll need to test some more simulators for other phones. Any one have an idea why?

    <UITextField
        outlet="timerNameTextField"
        placeholder="enter timer name"
        text="{name}"
        width="80%"
        height="40"
        left="50% - width/2"
        layer.cornerRadius="height/2"
        top="20"
        textAlignment="center"
        textColor="{isTimerRunning ? UIColor.black : UIColor.gray}"
        backgroundColor="{isTimerRunning ? parent.backgroundColor : UIColor.white}"
        font="Avenir Next 18"
    />

@den2k could you submit a simple project demonstrating the issue and I’ll try to figure out what’s happening.

commented

this is the project - the problem still exists. Moved on to other things. but still researching the problem.

https://github.com/den2k/TIMII