Skip to content

attributedTitle not visible in ios5 #10

@javalnanda

Description

@javalnanda

Hi,
I am adding refresh control as subview to table as follows

self.refreshControl = [[ISRefreshControl alloc] initWithFrame:tableView.frame];
[refreshControl addTarget:self action:@selector(handleRefresh:) forControlEvents:UIControlEventValueChanged];
[tableView addSubview:refreshControl];

And, setting the attribute title as follows:

self.refreshControl.attributedTitle = [[NSAttributedString alloc]initWithString:@"Refreshing the TableView"];
//set the date and time of refreshing
NSDateFormatter *formattedDate = [[NSDateFormatter alloc]init];
[formattedDate setDateFormat:@"MMM d, h:mm a"];
NSString *lastupdated = [NSString stringWithFormat:@"Last Updated on %@",[formattedDate stringFromDate:[NSDate date]]];
self.refreshControl.attributedTitle = [[NSAttributedString alloc]initWithString:lastupdated];

[self.refreshControl endRefreshing];

It , is working fine in ios6 but in iOS 5 attribute title is not visible only the indicator is visible.
Also, when we set the attribute the stretch animation of bubble is not shown and directly the refreshing is triggered in ios 6.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions