Note that there are some explanatory texts on larger screens.

plurals
  1. POiPhone: how to dealloc custom cell labels
    text
    copied!<p>hi i am working on UITableView custom cell for twitter, for each cell i am adding UIImageView(userPhoto), UILabel(name), UILabel(tweet), UILabel(Data), This i have to dealloc all elements,</p> <p>please go through the attached Image of INSTRUMENT TOOL alloc screen shot</p> <p>when i run the Instrument tool, it showing some are not dealloc, how to dealloc, this is my code </p> <p>//Customize the appearance of table view cells. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {</p> <pre><code> static NSString *identifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier]; if(!cell) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewStyleGrouped reuseIdentifier:nil]; //cell.selectionStyle = UITableViewCellSelectionStyleNone; UILabel *name = [[UILabel alloc]initWithFrame:CGRectMake(72,3,242,15)] ; name.text = (NSString*)[(Tweet*)[tweetArray objectAtIndex:indexPath.row] userName]; [name setFont:[UIFont fontWithName:@"Helvetica" size:13]]; name.textColor=[UIColor colorWithRed:250 green:250 blue:210 alpha:0.5]; [name setBackgroundColor:[UIColor clearColor]]; UILabel *date = [[[UILabel alloc]initWithFrame:CGRectMake(200,3,130,15)] autorelease]; date.text = (NSString*)[(Tweet*)[tweetArray objectAtIndex:indexPath.row] created_at]; [date setFont:[UIFont fontWithName:@"Helvetica" size:12]]; date.textColor=[UIColor colorWithRed:250 green:250 blue:210 alpha:0.5]; [date setBackgroundColor:[UIColor clearColor]]; UILabel * tweetLabel = [[UILabel alloc]initWithFrame:CGRectMake(72,20,242,60)] ; tweetLabel.text = (NSString*)[(Tweet*)[tweetArray objectAtIndex:indexPath.row] tweet]; tweetLabel.numberOfLines = 3; tweetLabel.textColor=[UIColor colorWithRed:252 green:148 blue:31 alpha:1]; [tweetLabel setFont:[UIFont fontWithName:@"Helvetica" size:12]]; [tweetLabel setBackgroundColor:[UIColor clearColor]]; UIImageView *myImage = [[UIImageView alloc]initWithFrame:CGRectMake(6,10,58,60)] ; NSURL *url = [NSURL URLWithString:[(Tweet*)[tweetArray objectAtIndex:indexPath.row] image_url]]; NSData *data = [NSData dataWithContentsOfURL:url]; [myImage setImage: [UIImage imageWithData:data]]; [cell.contentView addSubview:myImage]; [cell.contentView addSubview:tweetLabel]; [cell.contentView addSubview:name]; [cell.contentView addSubview:date]; </code></pre> <p>[myTweetActivityIndicator stopAnimating]; [myTweetActivityIndicator setHidesWhenStopped:YES];</p> <pre><code>return cell; </code></pre> <p>}</p> <p>please guide me Thank you<img src="https://i.stack.imgur.com/VKYie.png" alt="This image for instrument tools one"></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload