Added: 2 years ago
From: XcodeMod
Views: 4,974
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:
see all

All Comments (17)

Sign In or Sign Up now to post a comment!
  • Question, now that you typed in the text in the alert, how can I access that value now after I hit ok?

  • I'm fairly new to xcode, but you didn't put any of that into the .h file. Is that because you used only the built in methods?

  • @brianmcgoangill putting stuff in the .h file is needed if you need it over several methods

    or if you need to connect it in your interface builder

  • I think you should also release myTextField.

  • What happened when you rotate the simulator.. your code will not work. it tried with iPhone 3.0 version and i managed it once you rotate the simulator then keyboard you can hide by clicking on Done button.. but the same code do not work for iPhoneOS4.0

  • How do you use the text they enter into the textfield?

  • Did you ever get an answer for this?

  • @taimur38 yea... it's a little complicated if you haven't used xcode frequently

  • haha wanna tell me? or link me to where you saw it?

  • Let's say the textfield instide the alert view is named "textfield1". In your original view you have a uilabel named "label1." the code is pretty much: label1.text = textfield.text." place this code where you have the code for when one of the buttons on the alertview is. There are some videos on youtube on how to set the actions of an alertview.

    If this is confusing, I can upload some code that I have and send you the link. Message me if you want me to do this.

  • @iminichrispy then you need to add the definition of a textfield to your .h file, then call it just like you would use it in any other UITextField

  • very useful. Thanks for sharing!

  • Very usefull

  • i have a tutorial with ecact that code

  • Awesome! Thanks a lot. Worked for me. =D

  • Nice Tutorial. :)

  • Comment removed

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more