2011-06-17 53 views

回答

4

這是你需要做的就是像什麼,

CGRect faxImageRect = CGRectZero; 
CGRect signatureRect = CGRectZero; 

faxImageRect.size = faxImage.size; 
signatureRect.size = signature.size; 

// Adjust the signature's location within the fax image 
signatureRect.origin = desirableLocation; 

UIGraphicsBeginImageContext(faxImage.size); 
[faxImage drawInRect:faxImageRect]; 
[signature drawInRect:signatureRect]; 
image = UIGraphicsGetImageFromCurrentImageContext(); 
UIGraphicsEndImageContext(); 

截至去年底image將包含你要發送的圖像。

此示例使用其圖像的真實大小。你可以改變它,儘管它們可能會受到拉伸。

+0

我會試試這個,讓你知道。非常感謝 – milof

0

嗯,我可以建議一個解決方法。 :) 實際上,因爲iOS正在處理視圖,您可以創建自己的2個UIImageView並添加一個作爲另一個的子視圖。 如果您對底層繪圖內容感興趣,請閱讀 Quartz 2D

+0

不錯的建議,但我確實需要保存最終的UiImage,然後傳輸它。 – milof