Code Monkey home page Code Monkey logo

Comments (4)

alexmx avatar alexmx commented on September 26, 2024 1

Fixed the issue. Please update to release 1.1.2

The fix is quite weird: 6722672#diff-3666655fb9849b281fc5f9579ad5c9efR38

It seems that the instance method collides with the static (class) method if they have the same name. I've just changed the order in which the methods are declared.
As I said, seems to be the bug in the latest Swift compiler. Will report it in the Swift project JIRA.

Updated:
The Swift JIRA ticket: SR-5959

Regards,
Alex

from amxfontautoscale.

robhunter avatar robhunter commented on September 26, 2024

This is a problem in Swift 3.2 as well.

from amxfontautoscale.

robhunter avatar robhunter commented on September 26, 2024

It looks like under Swift 3.2+ these declarations are broken/not importing correctly:

https://github.com/alexmx/AMXFontAutoScale/blob/master/AMXFontAutoScale/UILabel%2BAMXFontScale.m#L22
https://github.com/alexmx/AMXFontAutoScale/blob/master/AMXFontAutoScale/UITextView%2BAMXFontScale.m#L22

A workaround is to change the following:

UILabel.amx_autoScaleFont(forReferenceScreenSize: .size5p5Inch)
UITextView.amx_autoScaleFont(forReferenceScreenSize: .size5p5Inch)

to this:

UILabel.amx_autoScaleEnabled = true
UILabel.amx_referenceScreenSize = .size5p5Inch
UITextView.amx_autoScaleEnabled = true
UITextView.amx_referenceScreenSize = .size5p5Inch

from amxfontautoscale.

alexmx avatar alexmx commented on September 26, 2024

@robhunter Thanks for reporting this.

It is working fine in Xcode 8.3 but seems broken in Xcode 9.
Will take a look later today, might be a bug in the latest Swift compiler.

from amxfontautoscale.

Related Issues (8)

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.