Giter Site home page Giter Site logo

关于像素重绘问题 about zen HOT 9 CLOSED

100mango avatar 100mango commented on July 24, 2024
关于像素重绘问题

from zen.

Comments (9)

100mango avatar 100mango commented on July 24, 2024

不好意思,这个问题我没遇到过。不过一般来说,对于UILabel这种常用的系统控件,苹果会帮我们处理好性能问题,因此一般情况可以不需要刻意去改变设置,这样子虽然有可能会对性能有略微损耗,但是避免了我们自己过于Hacking的优化方法造成图像绘制有偏差的情况。

from zen.

IOSDelpan avatar IOSDelpan commented on July 24, 2024

我测试与了解到的情况是,如果不做处理,列表会变得很卡。我有测过微信,微信一样对UILabel作了性能的处理,所以划起来的帧数才能达到55帧左右,如果不处理,大概只能到48帧左右。我测试到,UILabel在iOS8下所关联的图层不再是CALayer,而是UILabelLayer,所以绘制才发生了变化。

from zen.

100mango avatar 100mango commented on July 24, 2024

感谢提供资讯。在网上没有查找到UILabelLayer的相关信息。有无开启UILabel的opaque。

If set to YES, the drawing system treats the view as fully opaque, which allows the drawing system to optimize some drawing operations and improve performance.

from zen.

IOSDelpan avatar IOSDelpan commented on July 24, 2024

有开启,我也试过不开启,但结果是一样的。UILabelLayer是私有的,应该查不到。

from zen.

100mango avatar 100mango commented on July 24, 2024

这样子。按照官方文档标注,开启后应该就不会造成Blending。如果是iOS8才开始有的话,可能还需要进一步查正一下原因。我在网上帮你查了一下,好像没有关于iOS8下UILabel出现问题的报告。

from zen.

IOSDelpan avatar IOSDelpan commented on July 24, 2024

是这样的,我下了最新的微信,他们一样没作iOS8本文的处理,至于为什么,不清楚。我现在的做法只是,遇到会出现横线的,我就不加背景色,但出现横线的机率并不高

from zen.

100mango avatar 100mango commented on July 24, 2024

嗯。也可能是苹果官方的bug。可以尝试去StackOverFlow提个问题。希望找到结果之后给大家分享一下。感谢。抱歉没能帮你解决这个问题。

from zen.

IOSDelpan avatar IOSDelpan commented on July 24, 2024

我一会把问题提上去,之前我也写了一些关于图形性能这方面的东西,打算发的,哈哈,你已经发布了,看到就想跟你交流一下。

from zen.

100mango avatar 100mango commented on July 24, 2024

哈哈。我也是入门选手。以后多多交流。

from zen.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.