我有畫它使用平局矩形內芯圖像一個UIButton:更改繪製按鈕的ImageView
我需要用的UIImageView再次重繪註釋後:
func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : AnyObject]) {
if let ImageFromCamera = info[UIImagePickerControllerOriginalImage] as? UIImage {
let ImageView = UIImageView()
ImageView.image=ImageFromCamera
ImageView.frame=personalImage.frame
ImageView.layer.cornerRadius = self.pickedImage.frame.size.width/2
ImageView.clipsToBounds = true
ImageView.layer.borderWidth = 12.0
ImageView.layer.borderColor = UIColor.whiteColor().CGColor
// change the custom drawn button "personalImageButton" to imageView
}
dismissViewControllerAnimated(true, completion: nil)
}
如何刪除以前繪製的按鈕? –