小知识点

2017-03-22  本文已影响3人  HCong
func longPressGestureAction(gesture:UIGestureRecognizer) {
        
        if gesture.state == .began {
            let alert = UIAlertView(title: "分享到新浪微博", message: NSStringFromClass((gesture.view?.classForCoder)!), delegate: nil, cancelButtonTitle: "确定")
            alert.show()
        }
        
    }
 //NSData转换为UIImage
 NSData *imageData = [NSData dataWithContentsOfFile: imagePath];
 UIImage *image = [UIImage imageWithData: imageData];
 
 //UIImage转换为NSData
 NSData *imageData = UIImagePNGRepresentation(aimae);
上一篇 下一篇

猜你喜欢

热点阅读