ios - Setting Corner Radius on ImageView is imperfect in iPhone 6 and 6 Plus -


i using imageviews 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:

enter image description here

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

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -