How to prevent iOS Messages app from cropping an inserted image?

I am working on an application that allows people to copy and paste images. The image is copied as follows:

NSString *path =  [[NSBundle mainBundle] pathForResource:@"circle" ofType:@"png"];
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
NSData *data = [NSData dataWithContentsOfFile:path];
[pasteboard setData:data forPasteboardType:@"public.png"];

      

When pasted in a Notes app, the app works fine. However, in the Messages application, it processes the right side of the image. Is there a way to prevent this?

enter image description hereenter image description here

+3


source to share


1 answer


You cannot prevent this as it was the Apple UI idea. Although you can put transparencies in your image so that Message.app clamps the image, the main part of which is still visible.



+5


source







All Articles