خرید بک لینک

Vote count: 0

I have a cornerRadius set on a UIView and a UIImageView inside the same UIView. I am calculating the corner radius with RockProfileView.frame.size.height / 2 but the UIView stopped showing in iOS 10.

After further checking i found the value of RockProfileView.frame.size.height / 2 is coming out to be 1000.0 while the width and height constraint is set to 64.0

When I hardcoded the RockProfileView.layer.cornerRadius = 32 to 64/2 it works just fine.

What could be the issue ?

Full code:

    RockProfileView.layer.cornerRadius = RockProfileView.frame.size.height / 2
    RockProfileView.clipsToBounds = true
    RockProgressView.layer.masksToBounds = true

asked 1 min ago

برچسب: cornerradius not working, نویسنده: استخدام کار تاريخ: پنجشنبه 25 شهريور 1395 ساعت: 1:10

صفحه بندی