Giter Club home page Giter Club logo

amxfontautoscale's People

Contributors

alexmx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

amxfontautoscale's Issues

Not working in viewDidAppear method

Hi ,Thank you for this helpful library. I have a problem updating my label which added to my ViewController using xib.

 override func viewDidAppear() {
    super.viewDidAppear()
   myLabel.amx_autoScaleFont(forReferenceScreenSize: .size4Inch)
}

override func viewDidLayoutSubviews() {
 // Here i add my View which includes myLabel using xib
        let startView = UINib(nibName: "StartView", bundle: .main).instantiate(withOwner: self, options: nil).first as! UIView
}

Swift 4: 'amx_autoScaleFont' cannot be used on type

When upgrading to Swift 4, I see the following errors:

Instance member 'amx_autoScaleFont' cannot be used on type 'UILabel'; did you mean to use a value of this type instead?

Instance member 'amx_autoScaleFont' cannot be used on type 'UITextView'; did you mean to use a value of this type instead?

My only AMX code is in my didFinishLaunchingWithOptions:

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

Library not loaded

After pod installing, application not starting

dyld: Library not loaded: @rpath/AMXFontAutoScale.framework/AMXFontAutoScale
Referenced from: /Users//Library/Developer/CoreSimulator/Devices/85D96D3A-239A-4DE6-AA72-1B53E360D852/data/Containers/Bundle/Application/AA7EC658-AFD4-4FD1-BE18-30F5A23CDE22//*
Reason: image not found

Instance Scaling

I m unable to perform instance scaling, Is there any workaround other then your provided code snippet. While global scaling is doing great

Font increased incrementally

I have applied instance auto scaling on textView in viewDidLoad, when pop back to this screen after some navigation font gets increased, applying same steps result in further increment. I ve tried with UILabel, its also resulting same issue. Can you pls see into this?

Attribute text with diferent font

When I use your library, if I have more than one font in my attribute text, only the first font was loaded.

exemple of code, in this case, my text was only with font HoeflerTitling-Light.

`
let lb = UILabel(frame: CGRect(x: 0, y: 0, width: 160, height: 44)) lb.amx_autoScaleFont(forReferenceScreenSize: .size4Inch)
lb.amx_autoScaleEnabled = true
let alight = UIFont(name: "HoeflerTitling-Light", size: 22)!
let alightItalic = UIFont(name: "HoeflerTitling-LightItalic", size: 22)!
let myAttributeLight = [NSFontAttributeName: alight, NSForegroundColorAttributeName: UIColor(rgba: "#ed403d"), NSParagraphStyleAttributeName: paragraph]
let attrString = NSAttributedString(string: "La Guía".localized(), attributes: myAttributeLight)
myString.append(attrString)

let myAttributeLightItalic = [NSFontAttributeName: alightItalic, NSForegroundColorAttributeName: UIColor(rgba: "#ed403d"), NSParagraphStyleAttributeName: paragraph]
let attrStringItalic = NSAttributedString(string: "del Prado".localized(), attributes: myAttributeLightItalic)
myString.append(attrStringItalic)
lb.attributedText = myString
`

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.