Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
ios1x
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cemarose
ios1x
Commits
9f44a471
Commit
9f44a471
authored
Nov 28, 2017
by
lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
u
parent
ea19ed6d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
KWMMidDetailView.m
iCemarose/Class/UI/NewProduct/Cell/KWMMidDetailView.m
+2
-2
No files found.
iCemarose/Class/UI/NewProduct/Cell/KWMMidDetailView.m
View file @
9f44a471
...
...
@@ -93,8 +93,8 @@
if
(
product
&&
product
.
htmlDescription
.
length
){
// self.lbDetail.text = product.htmlDescription;
// NSString *html = [NSString stringWithFormat:@"%@<script type='text/javascript'>window.webkit.messageHandlers.handle.postMessage(document.body.clientHeight)</scriot>",product.htmlDescription];
NSString
*
css
=
[
NSString
stringWithFormat
:
@"p{font-size:12px; }img{width:100%%;}*{padding:0;margin:0;max-width:%f}"
,
UI_SCREEN_WIDTH
];
NSString
*
html
=
[[
NSString
stringWithFormat
:
@"<meta name=
\"
viewport
\"
content=
\"
width=device-width, initial-scale=1.0 user-scalable=yes
\"
/><div id=
\"
container
\"
>%@<div><script type=
\"
text/javascript
\"
>function update() {window.webkit.messageHandlers.handle.postMessage({height:document.body.scrollHeight})} function timer(){ setTimeout(timer,1000); update()} function delay() { setTimeout(update,1000) } window.onload = update</script><style type=
\"
text/css
\"
>%@</style>"
,
product
.
htmlDescription
,
css
]
stringByReplacingOccurrencesOfString
:
@"src=
\"
//cdn.shopify.com"
withString
:
@"src=
\"
https://o42yton8r.qnssl.com"
];
NSString
*
css
=
[
NSString
stringWithFormat
:
@"p
:empty{margin: 0 20px;}p
{font-size:12px; }img{width:100%%;}*{padding:0;margin:0;max-width:%f}"
,
UI_SCREEN_WIDTH
];
NSString
*
html
=
[[
NSString
stringWithFormat
:
@"<meta name=
\"
viewport
\"
content=
\"
width=device-width, initial-scale=1.0 user-scalable=yes
\"
/><div id=
\"
container
\"
>%@<div><script type=
\"
text/javascript
\"
>function update() {window.webkit.messageHandlers.handle.postMessage({height:document.body.scrollHeight})} function timer(){ setTimeout(timer,1000); update()} function delay() { setTimeout(update,1000) } window.onload = update
;for(var e of document.getElementsByTagName('p')) { if(e.getElementsByTagName('img').length==0) e.style.setProperty('margin','0 20px') }
</script><style type=
\"
text/css
\"
>%@</style>"
,
product
.
htmlDescription
,
css
]
stringByReplacingOccurrencesOfString
:
@"src=
\"
//cdn.shopify.com"
withString
:
@"src=
\"
https://o42yton8r.qnssl.com"
];
[
self
.
webView
loadHTMLString
:
html
baseURL
:
nil
];
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment