Monday 13 October 2014

Circle image View in iOS Objective c & Swift



Objective c


        self.img = [[UIImageView alloc] initWithFrame:CGRectMake(18, 8, 100, 100)];
        self.img.clipsToBounds = YES;
        self.img.layer.cornerRadius = self.img.frame.size.width / 2;
        self.img.clipsToBounds = YES;
        self.img.layer.borderWidth=1.0f;


Swift

        self.img = [[UIImageView allocinitWithFrame:CGRectMake(188100100)];
        self.img.clipsToBounds = YES;
        self.img.layer.cornerRadius = self.img.frame.size.width / 2;
        self.img.clipsToBounds = YES;
        self.img.layer.borderWidth=1.0f;

4 comments:

  1. The iPhone 6 and iPhone 6 Plus have been a critical success, as well as a consumer triumph. . I bought my iPhone a few weeks ago. This change in operating systems has been difficult to me so I started looking for some guide how to set up some settings and stuff. iOS is a very slick, easy to use operating system but it does have advanced features for users to make the most of it. I checked a lot of information and after all I think this guys here http://www.iphone6tutorial.com/ made the best iphone 6 tutorials.

    ReplyDelete
  2. Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here
    Thank you. Your blog was very helpful and efficient For Me,Thanks for Sharing the information Regards Swift Online Course Hyderabad

    ReplyDelete