UIImageView中的边框

| 我正在尝试将UIImageView边框如下所示: 我试过使用:
[imageView.layer setBorderColor: [[UIColor whiteColor] CGColor]];
[imageView.layer setBorderWidth: 2.0];
但是您看不到外面的灰色边框。它在外部具有灰色阴影效果。 我该怎么做呢?     
已邀请:
        看一下CALayer的阴影属性。
[imageView.layer setShadowOffset:CGSizeMake(-1.0, -1.0)];
[imageView.layer setShadowOpacity:0.5];
    
        有关向UIImageView添加阴影的问题可能会有所帮助     
        
imageView.layer.shadowOpacity=0.6;
imageView.layer.shadowRadius = 0.0;
imageView.layer.shadowColor = [UIColor grayColor].CGColor;
imageView.layer.shadowOffset = CGSizeMake(-2.0, 1.0);
    

要回复问题请先登录注册