forked from organicmaps/organicmaps
[ios] iOS 5 NSAttributedString bug fix
This commit is contained in:
parent
8d746e292d
commit
dd08b2e04f
2 changed files with 4 additions and 7 deletions
|
@ -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;
|
||||
|
|
|
@ -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];
|
||||
|
|
Loading…
Add table
Reference in a new issue