How to access to iPhone view items from Xcode ?

Posted on 2011-10-14
Last Modified: 2012-05-12
Dear Expert:

I'm creating an iPhone application. I'm using Xcode 4.

I created a view and I have added some controls by using the mouse, for example a label or a textbox. Now I want to access to this controls from code. How can I achieve this ?

Thank you.
Question by:gplana
    LVL 19

    Accepted Solution


    Hi gplana

    You could write pages on how to do that and explain it.  There are tutorials with Pictures that do this much better justice.

    If you have any problems with the tutorials in answering your question come back here and ask me and I will try to help you.

    Basically (very basically) Your xib file in Interface Builder needs to know which class is controlling it, and then you need to link up the control in your xib with the objects in your class.   This can be done by dragging things around :-), this is why pictures make it easier to understand.

    Good Tutorial

    I am not sure this is as good especially as it is not xCode 4 but this website generally is great for beginners.
    How to Create a simple Iphone app part 2 View Controllers
    LVL 15

    Author Closing Comment

    You are right. It's just dragging while pressing the Ctrl key. I didn't know this.

    Thank you.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    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.
    Are you having trouble connecting or getting your iPhone / Samsung device(s) to sync with Microsoft Exchange Server?   What have you tried?   What haven't you tried?
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    779 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

    18 Experts available now in Live!

    Get 1:1 Help Now