Fix placeholder color for iOS7

This commit is contained in:
Guillaume BIENKOWSKI 2013-10-02 14:41:24 +02:00
parent 817f9c35b6
commit 626c280b09

View file

@ -153,6 +153,17 @@ static UICompositeViewDescription *compositeDescription = nil;
[videoCameraSwitch setHidden:TRUE];
}
}
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_6_0 // attributed string only available since iOS6
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {
// fix placeholder bar color in iOS7
UIColor *color = [UIColor grayColor];
addressField.attributedPlaceholder = [[NSAttributedString alloc]
initWithString:addressField.placeholder
attributes:@{NSForegroundColorAttributeName: color}];
}
#endif
}
}