Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Can't compile connection ios5

Posted on 2012-03-13
1
Medium Priority
?
897 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:Curtis Long
1 Comment
 

Accepted Solution

by:
Curtis Long 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A brief look into what is, how to use, and how to make GIFs
Email is way too noisy, prone to hiding the important stuff, and really becoming unreliable for critical/timely communications. There are better ways to communicate.
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.
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…

972 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