TakeScoop / SwiftyButton

Simple and customizable button in Swift
MIT License
551 stars 43 forks source link

Flat button not visible on iPhone 5 #11

Closed erhiesfeka closed 7 years ago

erhiesfeka commented 7 years ago

Awesome Library! Thanks. It looks like the Button disappears when launched on an iPhone 5/5s. Is this a bug of some kind? Or am I doing something wrong. Works well on iPhone 6 and greater.

erhiesfeka commented 7 years ago

@ldiqual could you let me know if you have any idea about what's going on here?

ldiqual commented 7 years ago

@erhiesfeka Can you share a project example, or some code, or a screenshot? Thanks!

erhiesfeka commented 7 years ago

@ldiqual Sure! I've attached the zipped project. When you unzip it, you can install the 'SwiftyButton' pod if you haven't already and run the project on the iPhone simulator. You will notice that the green button is NOT visible or clickable on the iphone 5 Simulator, but it is visible and clickable on the iPhone 6 simulator. I've tested on real devices as well and got the same results. Thanks!! SwiftyButtom.zip

ldiqual commented 7 years ago

@erhiesfeka This is because of your button vertical constraints which compress its height down to 0.

image

Try to change the constraints so that the button aligns vertically instead:

image

erhiesfeka commented 7 years ago

@ldiqual Thanks a lot. That was the issue exactly. I'll go ahead and close the issue.