Automatically relayout cells after orientation changed.

This commit is contained in:
Huy Nguyen
2015-08-02 18:01:28 +03:00
parent 8da9ddd884
commit e657bedd40
6 changed files with 122 additions and 0 deletions

View File

@@ -61,3 +61,18 @@ CGFloat ASRoundPixelValue(CGFloat f)
{
return roundf(f * ASScreenScale()) / ASScreenScale();
}
BOOL ASSystemVersionLessThan8()
{
static BOOL lessThan8;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
lessThan8 = ASSystemVersionLessThanVersion(@"8");
});
return lessThan8;
}
BOOL ASSystemVersionLessThanVersion(NSString *version)
{
return [[[UIDevice currentDevice] systemVersion] compare:version options:NSNumericSearch] == NSOrderedAscending;
}