iOS UIImageView hinzufügen Polsterung abgerundete Bildansicht

Ich habe eine RoundImageView erstreckt UIImageView mit der folgenden Funktion, um es rund:

-(void) makeImageViewRounded {
    //set the look of the image
    self.layer.backgroundColor=[[UIColor blackColor] CGColor];
    //self.layer.cornerRadius= self.frame.size.height /2;
    self.clipsToBounds = YES;
    self.layer.masksToBounds = YES;
    self.layer.borderWidth=1.0;
    self.layer.borderColor=[[UIColor grayColor] CGColor];
}

Wie kann ich einen Rand zwischen dem Rahmen und dem eigentlichen Bild (Polsterung)? Ich möchte aufzeigen, die Farbe, die in self.layer.backgroundColor=[[UIColor blackColor] CGColor];

InformationsquelleAutor Asaf Nevo | 2014-08-26
Schreibe einen Kommentar