native.newTextField -> Very Small on iPhone (vs Android)

I’ve created a native.newTextField object - but when it opens on the iPhone, the text field is VERY small, whereas on the Android it is “normal” sized. The first thing one tester said was how small the text field was on the iPhone.

How can I increase the size on the iOS build but leave it alone the Android build?

Thanks.

Seth j hersh

Hi Seth,

The following tutorial is really useful in learning how to use native text input fields, especially in regards to making them “consistent” on devices:

https://coronalabs.com/blog/2014/12/16/tutorial-new-native-text-input-features/

Hope this helps,

Brent

These two Posts might help you:

https://forums.coronalabs.com/topic/59256-newtextfield-positioning-is-wrong-for-ios-iphones-ipads-and-android-fine/

https://forums.coronalabs.com/topic/59257-newtextfield-font-size-for-android-and-ios-not-the-same/

Troy - thanks for this update; I intend to review shortly.

What I have done to resolve this (to this point) is to check if the User is on an Apple device - and if so, dynamically adjust the x,y,height values. This works OK to this point (bad pun).

Seth

Your fix on an Apple device will likely not work on varying iPhones, because a straight-line algebraic equation was needed to make such a fix work on multiple iPhone models. If you want to be sure your code works on iPhone models you don’t presently own or have time to test, observe and resolve, I’ve done the heavy lifting for you here in this article: https://forums.coronalabs.com/topic/59256-newtextfield-positioning-is-wrong-for-ios-iphones-ipads-and-android-fine/

Hi Seth,

The following tutorial is really useful in learning how to use native text input fields, especially in regards to making them “consistent” on devices:

https://coronalabs.com/blog/2014/12/16/tutorial-new-native-text-input-features/

Hope this helps,

Brent

These two Posts might help you:

https://forums.coronalabs.com/topic/59256-newtextfield-positioning-is-wrong-for-ios-iphones-ipads-and-android-fine/

https://forums.coronalabs.com/topic/59257-newtextfield-font-size-for-android-and-ios-not-the-same/

Troy - thanks for this update; I intend to review shortly.

What I have done to resolve this (to this point) is to check if the User is on an Apple device - and if so, dynamically adjust the x,y,height values. This works OK to this point (bad pun).

Seth

Your fix on an Apple device will likely not work on varying iPhones, because a straight-line algebraic equation was needed to make such a fix work on multiple iPhone models. If you want to be sure your code works on iPhone models you don’t presently own or have time to test, observe and resolve, I’ve done the heavy lifting for you here in this article: https://forums.coronalabs.com/topic/59256-newtextfield-positioning-is-wrong-for-ios-iphones-ipads-and-android-fine/