mirror of
https://github.com/zhigang1992/RETableViewManager.git
synced 2026-06-16 21:21:49 +08:00
Fixes for iOS [redacted]
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
//
|
||||
|
||||
#import "REActionBar.h"
|
||||
#import "RETableViewManager.h"
|
||||
|
||||
@implementation REActionBar
|
||||
|
||||
@@ -33,9 +34,12 @@
|
||||
if (!self)
|
||||
return nil;
|
||||
|
||||
self.translucent = YES;
|
||||
[self sizeToFit];
|
||||
self.barStyle = UIBarStyleBlackTranslucent;
|
||||
|
||||
if (REDeviceSystemMajorVersion() < 7.0) {
|
||||
self.translucent = YES;
|
||||
self.barStyle = UIBarStyleBlackTranslucent;
|
||||
}
|
||||
|
||||
UIBarButtonItem *doneButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Done", @"")
|
||||
style:UIBarButtonItemStyleDone target:self
|
||||
|
||||
@@ -50,6 +50,8 @@
|
||||
|
||||
@protocol RETableViewManagerDelegate;
|
||||
|
||||
NSUInteger REDeviceSystemMajorVersion();
|
||||
|
||||
/**
|
||||
`RETableViewManager` allows to manage content of `UITableView` with ease, both forms and lists. In its core `RETableViewManager` supports reusable cells based on corresponding data object class.
|
||||
|
||||
|
||||
@@ -25,6 +25,15 @@
|
||||
|
||||
#import "RETableViewManager.h"
|
||||
|
||||
NSUInteger REDeviceSystemMajorVersion() {
|
||||
static NSUInteger _deviceSystemMajorVersion = -1;
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
_deviceSystemMajorVersion = [[[[[UIDevice currentDevice] systemVersion] componentsSeparatedByString:@"."] objectAtIndex:0] intValue];
|
||||
});
|
||||
return _deviceSystemMajorVersion;
|
||||
}
|
||||
|
||||
@implementation RETableViewManager
|
||||
|
||||
- (id)init
|
||||
|
||||
@@ -8,16 +8,6 @@
|
||||
|
||||
#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
|
||||
@@ -47,7 +37,7 @@ NSUInteger DeviceSystemMajorVersion() {
|
||||
|
||||
// Retain legacy grouped cell style in iOS [redacted]
|
||||
//
|
||||
if (DeviceSystemMajorVersion() >= 7) {
|
||||
if (REDeviceSystemMajorVersion() >= 7) {
|
||||
self.manager.style.contentViewMargin = 10;
|
||||
self.manager.style.backgroundImageMargin = 10;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user