Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6f98a54

Browse files
iOS 10 本地文件显示
1 parent 1d45626 commit 6f98a54

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

‎Coding_iOS/Controllers/FileViewController.m‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,10 @@ - (void)showDiskFile:(NSURL *)fileUrl{
143143
QLPreviewController* preview = [[QLPreviewController alloc] init];
144144
preview.dataSource = self;
145145
preview.delegate = self;
146+
if ([[[UIDevice currentDevice] systemVersion] compare:@"10.0" options:NSNumericSearch] != NSOrderedAscending) {
147+
[self addChildViewController:preview];
148+
[preview didMoveToParentViewController:self];
149+
}
146150
[self.view addSubview:preview.view];
147151
[preview.view mas_makeConstraints:^(MASConstraintMaker *make) {
148152
make.top.left.right.equalTo(self.view);

‎Coding_iOS/Controllers/LocalFileViewController.m‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ - (void)showDiskFile:(NSURL *)fileUrl{
119119
QLPreviewController* preview = [[QLPreviewController alloc] init];
120120
preview.dataSource = self;
121121
preview.delegate = self;
122+
if ([[[UIDevice currentDevice] systemVersion] compare:@"10.0" options:NSNumericSearch] != NSOrderedAscending) {
123+
[self addChildViewController:preview];
124+
[preview didMoveToParentViewController:self];
125+
}
122126
[self.view addSubview:preview.view];
123127
[preview.view mas_makeConstraints:^(MASConstraintMaker *make) {
124128
make.top.left.right.bottom.equalTo(self.view);

‎Coding_iOS/Views/Cell/FileListFileCell.m‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ - (void)changeToState:(DownloadState)state{
9696
stateImageName = @"icon_file_state_download";
9797
break;
9898
}
99-
[self setBackgroundColor:(state == DownloadStateDownloaded)? [UIColor colorWithHexString:@"0xf1fcf6"]:[UIColor clearColor]];
99+
[self setBackgroundColor:(state == DownloadStateDownloaded)? [UIColor colorWithHexString:@"0xf1fcf6"]:[UIColor whiteColor]];
100100
[self.progressView setHidden:!(state == DownloadStateDownloading || state == DownloadStatePausing)];
101101

102102
[_stateButton setImage:[UIImage imageNamed:stateImageName] forState:UIControlStateNormal];

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /