Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Xcode array Help

  • 09-07-2014 8:51pm
    #1
    Registered Users, Registered Users 2 Posts: 263 ✭✭


    Hi People, New To IOS Development, Just wondering if you can make an array In the IBOutlet inside the interface of the header file

    For example instead of

    IBOutlet UIButton *Letter1;
    IBOutlet UIButton *Letter2;
    IBOutlet UIButton *Letter3;
    IBOutlet UIButton *Letter4;
    IBOutlet UIButton *Letter5;
    IBOutlet UIButton *Letter6;
    IBOutlet UIButton *Letter7;

    Have something like IBOutlet UIButton *Letter[7];

    Been trying a few different ways and can't seem to find a simple answer?

    Any help is much appreciated

    Dpjmie


Comments

  • Closed Accounts Posts: 3,780 ✭✭✭Frank Lee Midere


    dpjmie wrote: »
    Hi People, New To IOS Development, Just wondering if you can make an array In the IBOutlet inside the interface of the header file

    For example instead of

    IBOutlet UIButton *Letter1;
    IBOutlet UIButton *Letter2;
    IBOutlet UIButton *Letter3;
    IBOutlet UIButton *Letter4;
    IBOutlet UIButton *Letter5;
    IBOutlet UIButton *Letter6;
    IBOutlet UIButton *Letter7;

    Have something like IBOutlet UIButton *Letter[7];

    Been trying a few different ways and can't seem to find a simple answer?

    Any help is much appreciated

    Dpjmie

    No. Those outlets are designed to allow you to connect in the xib or storyboard. So they have to be seperate at nib instantiation.


  • Registered Users, Registered Users 2 Posts: 263 ✭✭dpjmie


    Cheers Frank, Much Appreciated


  • Registered Users, Registered Users 2 Posts: 1,176 ✭✭✭vinnycoyne


    Take a look at the IBOutletCollection section over at http://nshipster.com/ibaction-iboutlet-iboutletcollection/


Advertisement