Solved

Can't compile connection ios5

Posted on 2012-03-13
1
888 Views
Last Modified: 2012-03-13
On an app I'm working on for the iPhone, it has decided to not compile on me when I ask it to give me an outlet to a label on a prototype table cell. I've gotten outlets for labels before, but I was using either just a standard view or static cells rather than prototype cells. I'm thinking it probably has to do with the fact that the label belongs to a prototype cell and will be duplicated since they all have the same identifier (Cell), but then again I could be off. I'm not sure what to do with this one, if I use just
cell.textLabel.text

Open in new window

then my upload button doesn't show up until after I click on the cell.

The Error:

Couldn't compile connection: <IBCocoaTouchOutletConnection:0x4007cd200  <IBProxyObject: 0x4007de280> => lblServerName2 => <IBUILabel: 0x4009b7d00>>

Open in new window


Does anyone have any suggestions as to how I could go about setting the text on a custom label inside a prototype cell?

For reference, I've uploaded my project here. It's a mess at the moment, but it's currently just a proof on concept kind of thing. I'm going to go through and do clean up once I get it working.

Any suggestions are appreciated.
0
Comment
Question by:HDM
1 Comment
 

Accepted Solution

by:
HDM earned 0 total points
ID: 37717825
I've got it working. When I make the label, I needed to set the tag value. I used 100. Then inside of the cellForRowAtIndexPath method I used this

UILabel *lblServerName = (UILabel*)[cell viewWithTag:100];
lblServerName.text=[server getName];

Open in new window


and now I have my own label running on my own prototype cell with the button showing.
0

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.

Join & Write a Comment

Suggested Solutions

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?
You should read OS supplied guidelines before developing. I can't stress that enough. The guidelines will help you understand the reasons mobile app developers do what they do.  Apple is very particular when they review appstore submissions.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

762 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

26 Experts available now in Live!

Get 1:1 Help Now