Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
- static NSString *MyIdentifier = @"MyIdentifier";
- UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier];
- if (cell == nil)
- {
- cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:MyIdentifier];
- }
- // Set up the cell
- int storyIndex = [indexPath indexAtPosition: [indexPath length] - 1];
- NSString *temp = [[NSString alloc] initWithString:[[stories objectAtIndex: storyIndex] objectForKey: @"title"]];
- cell.textLabel.text = temp;
- [[cell textLabel] setTextColor:[UIColor colorWithRed:154.0/255.0 green:14.0/255.0 blue:2.0/255.0 alpha:1]];
- [[cell textLabel] setFont:[UIFont systemFontOfSize:12.0]];
- return cell;
- }
- - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
- }
- -(UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
- static NSString *cellString = @"cell";
- UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellString];
- if(cell == nil){
- cell = [[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:cellString];
- }
- cell.textLabel.text = values;
- cell.textLabel.textColor = [UIColor colorWithRed:154.0/255.0 green:14.0/255.0 blue:2.0/255.0 alpha:1];
- cell.textLabel.font = [UIFont systemFontOfSize:12.0];
- return cell;
- }
- cell.textLabel.font = [UIFont systemFontOfSize:12.0];
- cell.detailTextLabel.font = [UIFont systemFontOfSize:10.0];
- - (void)configureCell:(UITableViewCell *)cell atIndexPath:(NSIndexPath *)indexPath
- {
- cell.textLabel.textColor = [UIColor grayColor]; //redColor greenColor etc.
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement