ios - Setting Corner Radius on ImageView is imperfect in iPhone 6 and 6 Plus -
i using imageview
s in app set cornerradius
make them circular. works fine, when verify in iphone 6 , 6 plus, parts @ edge seem cut off, eg. top part in image below:
note haven't added 3x launch image, app displayed scaled version of original.
assuming issue happens because of scaling factor. i.e. width specify in code not see in device. also, assume fixed if use autolayout.
are assumptions correct? if not, please provide explanation , solution same. :) !
edit1:
my imageview of 35 x 35
size. set corner radius follows:
[commentcell.profileimageview.layer setcornerradius:17.5]; [commentcell.profileimageview.layer setmaskstobounds:yes];
edit2:
floating points doesn't seem it, because tried same frame size 36 x 36
, corner radius 18
.
your assumptions correct, there solution :
[commentcell.profileimageview.layer setcornerradius:profileimageview.frame.size.width/2];
Comments
Post a Comment