Toggle navigation
Toggle navigation
This project
Loading...
Sign in
ios
/
YH_Explorer
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
朱小军
8 years ago
Commit
668bec6a60c378e5096157892f78ca50ea771424
1 parent
c418e2e5
新增一个- (void)loadHTMLString:(NSString *)html baseURL:(nullable NSURL *)baseURL方法 review by 海子
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
0 deletions
YHExplorer/YHExplorerView.m
YHExplorer/YHExplorerViewController.h
YHExplorer/YHExplorerViewController.m
YHExplorer/YHExplorerView.m
View file @
668bec6
...
...
@@ -104,6 +104,13 @@
}
}
-
(
void
)
loadHTMLString
:
(
NSString
*
)
html
baseURL
:
(
nullable
NSURL
*
)
baseURL
{
if
(
self
.
isLoaded
)
{
[
self
.
webViewController
loadHTMLString
:
html
baseURL
:
baseURL
];
}
}
-
(
void
)
setProgressBarColor
:
(
UIColor
*
)
color
{
[
self
.
webViewController
setProgressBarColor
:
color
];
...
...
YHExplorer/YHExplorerViewController.h
View file @
668bec6
...
...
@@ -28,6 +28,8 @@
* @param html 网页内容
*/
-
(
void
)
loadHTMLString
:(
NSString
*
_Nonnull
)
html
;
-
(
void
)
loadHTMLString
:(
NSString
*
)
html
baseURL
:(
nullable
NSURL
*
)
baseURL
;
/**
* 设置进度条的颜色
*
...
...
YHExplorer/YHExplorerViewController.m
View file @
668bec6
...
...
@@ -221,6 +221,11 @@ static float kprogressViewRadius = 2.0f;
[
self
.
webView
loadHTMLString
:
html
baseURL
:[[
NSBundle
mainBundle
]
bundleURL
]];
}
-
(
void
)
loadHTMLString
:
(
NSString
*
)
html
baseURL
:
(
nullable
NSURL
*
)
baseURL
{
[
self
.
webView
loadHTMLString
:
html
baseURL
:
baseURL
];
}
-
(
void
)
setProgressBarColor
:
(
UIColor
*
)
color
{
if
(
self
.
progressBar
)
{
...
...
Please
register
or
login
to post a comment