|
@@ -33,11 +33,23 @@
|
|
|
- (void)viewDidLoad
|
|
|
{
|
|
|
[super viewDidLoad];
|
|
|
-
|
|
|
+ if (@available(iOS 12.0, *)) {
|
|
|
+ BOOL isDark = (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark);
|
|
|
+ if(isDark){
|
|
|
+ self.view.backgroundColor = [UIColor blackColor];
|
|
|
+ }else{
|
|
|
+ self.view.backgroundColor = [UIColor colorWithRed:240/255. green:240/255. blue:240/255. alpha:1.];
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // Fallback on earlier versions
|
|
|
+ self.view.backgroundColor = [UIColor colorWithRed:240/255. green:240/255. blue:240/255. alpha:1.];
|
|
|
+ }
|
|
|
+
|
|
|
self.title = NSLocalizedString(@"File Info",nil);
|
|
|
[self loadDocumentInfo];
|
|
|
|
|
|
[self.view addSubview:self.curTableView];
|
|
|
+
|
|
|
}
|
|
|
|
|
|
- (void)viewWillAppear:(BOOL)animated
|
|
@@ -47,6 +59,13 @@
|
|
|
[self updateInterfaceOrientation:[[UIApplication sharedApplication] statusBarOrientation]];
|
|
|
}
|
|
|
|
|
|
+-(void)viewWillDisappear:(BOOL)animated
|
|
|
+{
|
|
|
+ [super viewWillDisappear:animated];
|
|
|
+ if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
- (void)updateInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
|
|
|
{
|
|
|
int inset = 0;
|
|
@@ -57,17 +76,19 @@
|
|
|
#pragma mark - getter && setter
|
|
|
|
|
|
- (UITableView*) curTableView {
|
|
|
+
|
|
|
if (!_curTableView) {
|
|
|
_curTableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
|
|
|
_curTableView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
|
|
|
_curTableView.delegate = self;
|
|
|
_curTableView.dataSource = self;
|
|
|
_curTableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
|
|
|
- _curTableView.tableFooterView = [[UIView alloc] init];
|
|
|
+ _curTableView.backgroundColor = [UIColor clearColor];
|
|
|
}
|
|
|
return _curTableView;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
#pragma mark - private method
|
|
|
|
|
|
- (NSString *)fileSizeStr {
|
|
@@ -150,6 +171,7 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
if (documentAttributes[CPDFDocumentModificationDateAttribute]){
|
|
|
NSMutableString* mSting = [NSMutableString string];
|
|
|
NSString* tstring = [NSString stringWithFormat:@"%@",documentAttributes[CPDFDocumentModificationDateAttribute]];
|
|
@@ -234,9 +256,6 @@
|
|
|
return 35;
|
|
|
}
|
|
|
|
|
|
-- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
|
|
|
- return 30.0;
|
|
|
-}
|
|
|
|
|
|
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
|
|
{
|