Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > Mac OS X Development Forums > Objective-C, Python, Ruby Development

Reply
 
LinkBack Thread Tools Display Modes
Old 03-01-2010, 08:07 AM   #1 (permalink)
Registered Member
 
Join Date: Nov 2009
Posts: 37
Default UITableViewCell

Hi,

- (UITableViewCell *)tableViewUITableView *)ttableView cellForRowAtIndexPathNSIndexPath *)indexPath{
// Temporary - should get all details from xml
static NSString *CellIdentifier = @"CellIdentifier";
// If a cell with this identifier is already created then it will be reused
UITableViewCell *cell = (UITableViewCell *)[ttableView dequeueReusableCellWithIdentifier:CellIdentifier];
if(cell==nil){
// If a cell with this identifier isn't already created then it will be created and assigned an identifier
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
UITextView *tmpTxtView = [[UITextView alloc] initWithFrame:CGRectMake(97, 30, 80, 40)];
[tmpTxtView setUserInteractionEnabled:NO];
[tmpTxtView setBackgroundColor:[UIColor clearColor]];
[tmpTxtView setTextColor:[UIColor whiteColor]];
[tmpTxtView setFont:[UIFont fontWithName:@"Arial" size:16]];
[tmpTxtView setFont:[UIFont boldSystemFontOfSize:16]];
[tmpTxtView setTextAlignment:UITextAlignmentLeft];
[tmpTxtView setTag:kfeeTag];
[self setFee:tmpTxtView];
[tmpTxtView release];
[cell.contentView addSubview:fee];
}else{
fee = (UITextView *)[cell.contentView viewWithTag:kfeeTag]; // // Returns UIView instead of UITextView!
}
[fee setText:@"A"];
return cell;
}

this line: fee = (UITextView *)[cell.contentView viewWithTag:kfeeTag];
returns a UIView instead of a UITextView and i don't understand why.

Thanks.
yaniv92648 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 326
21 members and 305 guests
@sandris, ADY, dacapo, Dani77, djohnson, dre, HDshot, HemiMG, JasonR, MarkC, mer10, nibeck, prchn4christ, ryandb2, spiderguy84, themathminister, timle8n1, tomtom100, vogueestylee, vvenkatachallam
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,883
Threads: 89,229
Posts: 380,763
Top Poster: BrianSlick (7,129)
Welcome to our newest member, vvenkatachallam
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:07 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0