Facebook メッセージのような円形の UIView を作成するにはどうすればよいですか。
角が丸い長方形ですか、それとも中央に円形の画像がある長方形ですか?
画像ビュー
は次
のとおりです。カスタム セル クラスの initWithStyle コードは次のとおりです。
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
// Initialization code
[self.userImage setBackgroundColor:[UIColor orangeColor]];
[self.userImage.layer setCornerRadius:32.0f];
}
return self;
}
しかし、私はまだ長方形のイメージビューを取得しています。