You can download the AutoScrollLabel files from this link http://stormyprods.com/sampleCode/AutoScrollLabel.zip
Then add these files in to your project
Import this class in your custom cell class, #import "AutoScrollLabel.h"
@interface YourCustomCell : UITableViewCell
@property(nonatomic,strong)IBOutlet AutoScrollLabel *textLabel;
@property(nonatomic,strong)IBOutlet AutoScrollLabel *detailLabel;
@end
and connect those labels outlets in YourCustomCell.xib
file.
In your viewController cellForRowIndexPath method,
-(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *cellIdentifier = @"Cell";
YourCustomCell *cell= (answerCustomCell*)[tableView dequeueReusableCellWithIdentifier:cellIdentifier];
if(cell == nil)
{
NSArray *topLevelObjects = [[NSBundle mainBundle]loadNibNamed:@"YourCustomCell" owner:self options:nil];
for(id currrentObject in topLevelObjects)
{
if([currrentObject isKindOfClass:[UITableViewCell class]])
{
cell = (YourCustomCell*)currrentObject;
break;
}
}
}
cell.textLabel.text = @"Your text";
cell.detailLabel.text = @"Your text";
return cell;
}