Advertise here




Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

UITextField -- Loooong delay when first tapped

tawpietawpie Posts: 348Registered Users
edited January 2011 in iPhone SDK Development
It's odd--like something isn't fully loaded or something. And by long, I mean 2-3 seconds. I can tell because I've overridden the textFieldDidBeginEditng method to play a noise when the text field is tapped and it waits and waits to play the noise (and change the placeholder text).

Any clues or this this "normal"?

Once things are tapped one time, they do fine after that. It's just the first tap.

Thanks
Post edited by tawpie on
"Hardware <u>will</u> break. Software comes broken" Unknown<br />
<a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=294438793&mt=8" target="_blank">Calc-12E</a> <-- ditch your old calculator.<br />
<a href="htt
· ·

Replies

  • bytor99999bytor99999 Posts: 611Registered Users
    edited February 2009
    Just out of curiosity, could the time be the time to load the sound the first time? What happens if you load the sound at app startup, then play it when the button is clicked.

    Mark
    Perfect World Programming LLC<br />
    <a href="http://www.perfectworldprogramming.com" target="_blank">http://www.perfectworldprogramming.com</a><br />
    <br />
    Please check out my apps.<br />
    <br />
    TubeOrganizer<br />
    <a href="http://www.spritzlerapps
    · ·
  • tawpietawpie Posts: 348Registered Users
    edited February 2009
    bytor99999 wrote: »
    Just out of curiosity, could the time be the time to load the sound the first time? What happens if you load the sound at app startup, then play it when the button is clicked.

    Mark

    Possible, but before the textField is tapped the sounds are just fine, it is loaded at startup. And the delay is there even if I don't play the sound so I think it's unlikely that the sound is the culprit.

    I guess others aren't having delays with the first tap on a UITextField? I feel so special!
    "Hardware <u>will</u> break. Software comes broken" Unknown<br />
    <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=294438793&mt=8" target="_blank">Calc-12E</a> <-- ditch your old calculator.<br />
    <a href="htt
    · ·
  • not_too_shabbynot_too_shabby Posts: 206Registered Users
    edited February 2009
    tawpie wrote: »
    Possible, but before the textField is tapped the sounds are just fine, it is loaded at startup. And the delay is there even if I don't play the sound so I think it's unlikely that the sound is the culprit.

    I guess others aren't having delays with the first tap on a UITextField? I feel so special!

    I notice this on my apps too. It only does it the first time a textfield is tapped so I figured it has something to do with loading the code for the keyboard.
    · ·
  • bharath2020bharath2020 Posts: 151Registered Users
    edited February 2009
    Just FYI..

    I had faced this kind of slowness in textfields when i loaded the AddressBook UIView controllers..
    Bharath<br />
    iOS Blog : <a href="http://iphone2020.wordpress.com" target="_blank">http://iphone2020.wordpress.com</a>;
    · ·
  • tawpietawpie Posts: 348Registered Users
    edited February 2009
    I notice this on my apps too. It only does it the first time a textfield is tapped so I figured it has something to do with loading the code for the keyboard.

    Ah. The keyboard. Good clue. Now, the only question is what to do about it?

    Thinking caps ON!
    "Hardware <u>will</u> break. Software comes broken" Unknown<br />
    <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=294438793&mt=8" target="_blank">Calc-12E</a> <-- ditch your old calculator.<br />
    <a href="htt
    · ·
  • DevTeamOfOneDevTeamOfOne Posts: 361Registered Users
    edited February 2009
    There's not much you can do.

    Each text field, text view, web view, etc, calls to one keyboard in your app. When it loads, it takes its time a bit. You will also note in Instruments that as you load this keyboard, memory allocations can increase by upwards of 700kb, which doesn't get released when the text view does. This shows it is the keyboards loadup for the app.

    The keyboard is an autoreleased singleton instance for each app. It takes time to load up and there's no way for force it to load up without viewing it the first time, I believe.
    · ·
  • zambonozambono Posts: 50Registered Users @
    edited January 2011
    is there a way of releasing it
    <a href="http://itunes.apple.com/us/app/national-guard-news/id425735964?ls=1&mt=8" target="_blank">National Guard News</a><br />
    <a href="http://itunes.apple.com/us/app/aquaplanner-pro/id411731366?ls=1&mt=8" target="_blank">aquaPlanner</a><br />
    · ·
  • BrandtBrandt Posts: 280Registered Users
    edited January 2011
    I've had slow keyboard/typing when I forgot to commit a view animation. Also, is it running in debug mode or release mode?
    <a href="http://itunes.apple.com/us/app/the-predictor-college-football/id416298819?mt=8" target="_blank"><b>The Predictor: College Football</b></a><br />
    <a href="http://itunes.apple.com/us/app/predictor-college-basketball/id507840596?mt=8" target="_blank><b>The Predictor: College Basketball</b></a>
    · ·
  • tawpietawpie Posts: 348Registered Users
    edited January 2011
    Brandt wrote: »
    I've had slow keyboard/typing when I forgot to commit a view animation. Also, is it running in debug mode or release mode?

    wow -- this is old! I didn't have animations going... and it was running in debug. Never did get a satisfactory solution, just learned to live with the initial delay. Thanks though!
    "Hardware <u>will</u> break. Software comes broken" Unknown<br />
    <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=294438793&mt=8" target="_blank">Calc-12E</a> <-- ditch your old calculator.<br />
    <a href="htt
    · ·
  • Objective ZeroObjective Zero Posts: 1,235Registered Users @ @ @ @
    edited January 2011
    tawpie wrote: »
    wow -- this is old! I didn't have animations going... and it was running in debug. Never did get a satisfactory solution, just learned to live with the initial delay. Thanks though!

    What I think is to make sure you have no memory leaks before you click the keyboard so when you use a lot of memory for the keyboard, you will have the most you can get.
    <a href="http://google.com" target="_blank">Questions?</a><br />
    <br />
    Check out my OCR app!<br />
    <a href="http://itunes.apple.com/app/ocr-pro/id486512712?mt=8" target="_blank">http://itunes.apple.com/app/ocr-pro/id486512712?mt=8</a>;
    · ·
Sign In or Register to comment.