Solved

Can't compile connection ios5

Posted on 2012-03-13
1
891 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
Set up iPhone and iPad email signatures to always send in high-quality HTML with this step-by step guide.
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.
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…

763 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