Circular UIImageView in UITableView without performance hit?

前端 未结 14 2623
失恋的感觉
失恋的感觉 2020-12-12 09:50

I have a UIImageView on each of my UITableView cells, that display a remote image (using SDWebImage). I\'ve done some QuartzCore

相关标签:
14条回答
  • 2020-12-12 10:21

    Creating circular image view and thats quite easy with the below SO link, just have custom cells for your table view instead of allocating every thing in your cellForRowAtIndexPath method.

    how to make button round with image background in IPhone?

    The above link gives you example for buttons just use it for your image views.

    0 讨论(0)
  • 2020-12-12 10:30

    To Add border

    self.ImageView.layer.borderWidth = 3.0f;
    
    self.ImageView.layer.borderColor = [UIColor whiteColor].CGColor;
    

    For Circular Shape

    self.ImageView.layer.cornerRadius = self.ImageView.frame.size.width / 2;
    self.ImageView.clipsToBounds = YES;
    

    Refer this link

    http://www.appcoda.com/ios-programming-circular-image-calayer/

    0 讨论(0)
提交回复
热议问题