mirror of
https://github.com/zhigang1992/RETableViewManager.git
synced 2026-06-11 16:30:26 +08:00
Upcoming OS fix
This commit is contained in:
@@ -8,6 +8,16 @@
|
||||
|
||||
#import "StylingViewController.h"
|
||||
|
||||
NSUInteger DeviceSystemMajorVersion();
|
||||
NSUInteger DeviceSystemMajorVersion() {
|
||||
static NSUInteger _deviceSystemMajorVersion = -1;
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
_deviceSystemMajorVersion = [[[[[UIDevice currentDevice] systemVersion] componentsSeparatedByString:@"."] objectAtIndex:0] intValue];
|
||||
});
|
||||
return _deviceSystemMajorVersion;
|
||||
}
|
||||
|
||||
@interface StylingViewController ()
|
||||
|
||||
@end
|
||||
@@ -35,8 +45,12 @@
|
||||
self.manager.style.cellHeight = 42.0;
|
||||
self.manager.style.textFieldFont = [UIFont fontWithName:@"Avenir-Book" size:16];
|
||||
|
||||
self.manager.style.contentViewMargin = 10;
|
||||
self.manager.style.backgroundImageMargin = 10;
|
||||
// Retain legacy grouped cell style in iOS [redacted]
|
||||
//
|
||||
if (DeviceSystemMajorVersion() >= 7) {
|
||||
self.manager.style.contentViewMargin = 10;
|
||||
self.manager.style.backgroundImageMargin = 10;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
Reference in New Issue
Block a user