Giter VIP home page Giter VIP logo

Comments (4)

LanceSamaria avatar LanceSamaria commented on September 22, 2024 1

@Adarkas2302 Yeah I noticed the same thing, it worked fine for iOS 11.

Try something like this:

let systemVersion = UIDevice.current.systemVersion

if systemVersion.contains("12.") {
    button.setTitle(" Sale", for: .normal) // there are 4 spaces for iOS 12 or greater
} else {
    button.setTitle("Sale", for: .normal) // this is how it should normally work
}

Of course if there is anyVersionLessThenTwelve.12.x this will be true

from dlradiobutton.

LanceSamaria avatar LanceSamaria commented on September 22, 2024

This is a choppy fix but it works for because everything else I tried didn't work. Inside the saleButton closure, I had to add 4 empty spaces before I set the string for the title:

I changed this:

button.setTitle("Sale", for: .normal)

to this and the spacing is now correct

button.setTitle(" Sale", for: .normal) // there are 4 spaces

screen shot 2018-12-18 at 8 32 00 pm

from dlradiobutton.

Adarkas2302 avatar Adarkas2302 commented on September 22, 2024

I have the same problem. It seems that it is not influenced by the version of DLRadioButton but by the iOS Version. With the same build in iOS 11, the marginWidth seems to work correctly.

from dlradiobutton.

Adarkas2302 avatar Adarkas2302 commented on September 22, 2024

Thanks for the help, I did it like this already.

from dlradiobutton.

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.