0
我試圖添加一個UIImage到HTML
電子郵件,但是我遇到問題。我環顧了很多其他職位,他們都聲明我需要將我的NSData
轉換爲base64
,但是他們都建議的方法似乎不再存在(除非我錯過了某些東西?!)。如何將NSData編碼爲base64? (iPhone/iPad)
這裏是我到目前爲止的代碼:
UIImage *mapImage = [mapViewController convertMapToImage];
NSData *imageData = [NSData dataWithData:UIImagePNGRepresentation(mapImage)];
NSString *base64String = // [imageData base64EncodedString]; --- this method isn't recognised
請有人可以幫我嗎?