我想使FBSDKProfilePictureView圓形,但我不能。如何製作iOS FBSDKProfilePictureView?
這是我有:
ViewController.h
@property (weak, nonatomic) IBOutlet FBSDKProfilePictureView *fbPhoto;
ViewController.m的viewDidLoad中
self.fbPhoto.layer.cornerRadius = 30.0;
self.fbPhoto.layer.borderColor = [UIColor lightGrayColor].CGColor;
self.fbPhoto.layer.borderWidth = 1.0;
它使一個圓圈中的UIImage的前面,但它不「裁剪」圖像。
我該怎麼辦呢
試試這個self.fbPhoto.layer.clipToBounds = YES;或self.fbPhoto.layer.maskToBounds = YES; –