UITextview clear when we select value from another viewcontroller in iPhone

Posted on 2012-09-01
Last Modified: 2012-09-21

        We are facing one problem, please make me nice solutions.....

        we have developed one form in iPhone for registration

        1) First Name
        2) Last Name
        3) Address
        4) Country
        5) State

       all above we take UITextview Control, When you Select Country and State then it goes new viewcontroller and select over the value from UITableView and return on registration page

     Problem: When we select value from next viewcontroller then come back on registration page then all First Name , Last Name and Address are clear

     Why it clear?? How to stable fill the value and we can easy select country and state??

     Please give me solutions how to store the value, after selecting country and state value??

     Thank you.....
Question by:citadelind
    LVL 14

    Expert Comment

    by:Hamidreza Vakilian
    That's probably because you are creating a new instance of the viewcontroller which contains the first name, last name, etc. fields. Instead of creating a new instance you should display the instance of viewcontroller which was shown before.

    Now I can help you even further if you upload your project somewhere; I can fix the things and explain the details for you.

    Author Comment

    Please give me proper solution.

    Thank you...
    LVL 14

    Accepted Solution

    How do you display country and state view controllers?
    a quick solution is to use presentModalViewController:

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

         Intro      In this article, I will show you how to parse a JSON in Swift using an open source library called SwiftyJSON ( If you haven't heard of a JSON before, it stands for JavaScript Object Notation…
    There is a security feature on iOS devices that is nearly impenetrable when it has been activated.  This article will provide some possible solutions as well as necessary steps to take to ensure you do not end up with a locked device.
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now