V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
lcl22hope
V2EX  ›  程序员

请问 ios 上多看,ibook 这种 app,是如何修改阅读时的背景颜色的呢?应该不是改了某个 view 的 backgroundColor 吧?

  •  
  •   lcl22hope · Aug 17, 2014 · 5415 views
    This topic created in 4274 days ago, the information mentioned may be changed or developed.
    5 replies    2014-08-19 23:46:49 +08:00
    lcl22hope
        1
    lcl22hope  
    OP
       Aug 18, 2014
    自问自答,原来不是要更改webview的背景色,它只是一个载体,加载文档的颜色来源于html文档本身,因此要想改变颜色,有两种方式1.修改html文档渲染颜色,也就是修改css,然后用javascript在加载document之前调用,2.比较简单的方式,仍然是设置webview的背景色,但是要将webview的opaque属性设置为NO,也就是透明,就可以了
    joeytat
        2
    joeytat  
       Aug 18, 2014
    我脚着 iBook 肯定不是用 webView 写的
    lcl22hope
        3
    lcl22hope  
    OP
       Aug 19, 2014
    @joeytat 那你觉得是什么控件?
    joeytat
        4
    joeytat  
       Aug 19, 2014
    @lcl22hope CoreText
    Azone
        5
    Azone  
       Aug 19, 2014
    WebView性能有影响,加载的也很慢,应该是用CoreText
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2430 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 01:10 · PVG 09:10 · LAX 18:10 · JFK 21:10
    ♥ Do have faith in what you're doing.