我已经实现了把一个UIView直接生成图片。UIGraphicsBeginImageContext(myView.bounds.size);[myView.layerrenderInContext:UIGraphicsGetCurrentContext()];UIImage*viewImage=UIGraphicsGetImageFromCurrentImageContext();UIGraphicsEndImageContext();但是,我需要截取这个UIView的一部分,比如中间100个像素,怎么实现呢?
烙印99
芜湖不芜
相关分类