Thanks for the help :)
Post
Replies
Boosts
Views
Activity
Hey, I want to know what .usesFontLeading does, and will it cause any problems if I don't add that as an options?
Right now, If I remove .usesFontLeading, everything works the way I expect it to, the height calculations are accurate, the moment I add the option in, everything just gets weird, inaccurate heights, etc. My concern is, since I'm using a custom font, will it cause any issues in production if I don't add the option?
To add to my question here, I was using boundingRect to calculate the height, but, I realised that the intrinsicContentSize was taking up more space than I asked it to, which gave me an inaccurate height, so, basically I was trying to get the width equal to what I specified and not go over. I feel like the whole number thing really helped me out as Apple documentation doesn't really specify that constraints round up or not.
Thanks for this: "356.25 is getting rounded up to 356.5 since .25 won't address a whole pixel.". Indeed, that was the case. This is how I was calculating that value: UIScreen.main.bounds.width * 0.95, that's how I was getting that value, what I did was: instead of UIScreen.main.bounds.width * 0.95, I used this ceil(UIScreen.main.bounds.width * 0.95), this rounds the value up and I get a value in whole number instead of a decimal value.
Thanks for the help :)