Comments (4)
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.
This is a problem in Swift 3.2 as well.
from amxfontautoscale.
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.
@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)
- Instance Scaling HOT 6
- Font increased incrementally HOT 3
- Library not loaded HOT 1
- Attribute text with diferent font HOT 1
- AMXFontAutoScale - Landscape Support HOT 2
- Not working in UILabel HOT 1
- Not working in viewDidAppear method HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amxfontautoscale.