Giter Site home page Giter Site logo

Comments (5)

lixiang1994 avatar lixiang1994 commented on May 20, 2024

OK, 已经复现了, 但是目前我不知道该如何解决, 是Xcode Optimization Level 导致的类型转换失败.

32901665221327_ pic

32921665221424_ pic

唯一能想到的是可以通过将Optimization Level 设置为none 来避免crash.

from attributedstring.

IAFung avatar IAFung commented on May 20, 2024

目前先使用强转规避了崩溃问题😂

get {
            if let temp = objc_getAssociatedObject(self, &UILabelActionsKey) {
                return temp as! [NSRange: Action]
            } else {
                return [:]
            }
        }

from attributedstring.

lixiang1994 avatar lixiang1994 commented on May 20, 2024

???? as! 可以规避吗? 类型应该是 [NSRange: [Action]] 不是 [NSRange: Action]

from attributedstring.

EnjoyWT avatar EnjoyWT commented on May 20, 2024

强转成需要的返回类型就可以了

from attributedstring.

lixiang1994 avatar lixiang1994 commented on May 20, 2024

https://github.com/lixiang1994/AttributedString/releases/tag/3.3.4

as? 在 Xcode14 iOS12 Release Mode 下运行会导致类型转换出现null 导致crash.
已改为as! 绕过这个问题 后续等待苹果解决这个编译优化问题吧

from attributedstring.

Related Issues (20)

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.