[ios] iOS 5 NSAttributedString bug fix

This commit is contained in:
Igor Khmurets 2013-12-09 17:02:51 +03:00 committed by Alex Zolotarev
parent 8d746e292d
commit dd08b2e04f
2 changed files with 4 additions and 7 deletions

View file

@ -50,12 +50,9 @@
_buyButton.titleLabel.textAlignment = NSTextAlignmentCenter;
_buyButton.titleLabel.font = [UIFont fontWithName:@"HelveticaNeue" size:20];
[_buyButton setBackgroundImage:buyImage forState:UIControlStateNormal];
NSString * proText = NSLocalizedString(@"become_a_pro", nil);
NSDictionary * attributes = @{ NSForegroundColorAttributeName : [UIColor whiteColor] };
NSAttributedString * attributedProText = [[NSAttributedString alloc] initWithString:[proText uppercaseString] attributes:attributes];
[_buyButton setAttributedTitle:attributedProText forState:UIControlStateNormal];
NSString * proText = [NSLocalizedString(@"become_a_pro", nil) uppercaseString];
[_buyButton setTitle:proText forState:UIControlStateNormal];
[_buyButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[_buyButton addTarget:self action:@selector(buyButtonPressed:) forControlEvents:UIControlEventTouchUpInside];
}
return _buyButton;

View file

@ -26,7 +26,7 @@
{
if (self.enabled)
{
static NSDate *lastUpdate;
static NSDate * lastUpdate;
if (!lastUpdate || [[NSDate date] timeIntervalSinceDate:lastUpdate] > (60 * 60 * 3))
{
lastUpdate = [NSDate date];