Solved

Can't compile connection ios5

Posted on 2012-03-13
1
889 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Are you looking to clear some space on your phone for the latest iOS 8 update? Did you switch to Spotify so you no longer need to keep music native on your phone? Run out of space for taking photos while in the middle of vacation? Sometimes the quic…
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.
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…
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…

786 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