首页 > 代码库 > UIActionSheet 这样写为什么显示为空白
UIActionSheet 这样写为什么显示为空白
func pickePhotoFromSheet()
{
var sheet:UIActionSheet = UIActionSheet()
var button = UIButton.buttonWithType(.Custom) as UIButton
button.frame = CGRectMake(0,0,GETSCREENWIDTH,30)
button.backgroundColor = DefaultWhiteColor
button.setTitle("相册",forState:UIControlState.Normal)
button.setTitleColor(COLORWITHRGB(73,73,73), forState: UIControlState.Normal)
button.setImage(UIImage(named:"icon_album_normal.png"), forState: UIControlState.Normal)
button.setImage(UIImage(named:"icon_album_active.png"), forState: UIControlState.Highlighted)
// button.addTarget(self,action:"photoChoose:",forControlEvents:UIControlEvents.TouchUpInside)
sheet.addSubview(button)
sheet.actionSheetStyle = UIActionSheetStyle.BlackOpaque
sheet.showInView(self.view)
}
UIActionSheet 这样写为什么显示为空白