Note that there are some explanatory texts on larger screens.

plurals
  1. POIFTweetLabel in UITableViewCell Subclass not showing
    primarykey
    data
    text
    <p>Right Now I am making a twitter app and I am Using IFTweetLabel. I made a TableViewCell Subclass but When I Run it the label dosent show up.</p> <p>Here is the .h:</p> <pre><code>#import &lt;UIKit/UIKit.h&gt; #import "IFTweetLabel.h" @interface twitterTextCell : UITableViewCell @property (strong, nonatomic) IFTweetLabel *customtextLabel; @end </code></pre> <p>And here is the implementation:</p> <pre><code>#import "twitterTextCell.h" @implementation twitterTextCell @synthesize customtextLabel; - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; if (self) { // Initialization code customtextLabel.backgroundColor = [UIColor orangeColor]; self.customtextLabel.frame = CGRectMake(240, 60, 345, 109); [self addSubview:customtextLabel]; NSLog(@"Custom Label Text: %@", customtextLabel.text); } return self; } - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; // Configure the view for the selected state } -(UILabel *)textLabel { return nil; } </code></pre> <p>Here is the code that is in the cellforrow in the tableviewdelegate:</p> <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; twitterTextCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[twitterTextCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier]; } NSDictionary *tweet = [self.timeLineData objectAtIndex:indexPath.row]; if ([tweet objectForKey:@"text"] != nil) { NSString *allText = [[tweet objectForKey:@"text"] stringByDecodingHTMLEntities]; cell.customtextLabel.numberOfLines = 4; cell.textLabel.numberOfLines = 4; cell.customtextLabel.text = allText; cell.textLabel.text = allText; cell.customtextLabel.linksEnabled = YES; NSDictionary *whoPostedTweet = [tweet objectForKey:@"user"]; cell.detailTextLabel.text = [whoPostedTweet objectForKey:@"name"]; NSURL *imageURL = [NSURL URLWithString:[NSString stringWithFormat:@"%@", [whoPostedTweet objectForKey:@"profile_image_url"]]]; [cell.imageView setImageWithURL:imageURL placeholderImage:[UIImage imageNamed:@"placeholder.png"]]; cell.backgroundColor = [UIColor clearColor]; [cell.imageView.layer setCornerRadius:7.0f]; [cell.imageView.layer setMasksToBounds:YES]; return cell; } else { [self getTwitterData]; NSLog(@"nil called(else) "); return cell; } return cell; } </code></pre> <p>After all of this only the image and the detailtextview show up. I removing the default textview because If I don't the text shows up normally but it is not the IFTweetLabel. Another thing I have a question about is how do I reposition the detailtextabel so that it is Under the IFTweetLabel. Anything is greatly appreciated, I need help on both of these issues.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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