objective c - object does not respond to selector -


This can be very basic, but I've done a lot of Googling and can not understand what's wrong. . I am trying to transfer an image from the sandboxed data folder of an iOS app to "Camera Roll"

If I UIImageWriteToSavedPhotosAlbum (img, zero, zero, zero) , It does not make any errors, but also does not save a copy of the image in the photo.

P> To understand why this is unsuccessful, I tried to apply a selector (below), but now it throws an NSInvalidArgumentException because "MyTest". ; The selector does not respond to the image: didFinishSavingWithError: contextInfo: "IMEMage for Microsoft Image: (Image: UIImage *) FinishSavingWithError: (NSError *) Error ReferencesInfo: (Zero *) contextInfo {/ p> // Do log errors or stuff ...} + (zero) driveCurrent roll: (NSString *) path {UIImage * img = [[UIImage imageNamed: path] retain]; UIImageWriteToSavedPhotosAlbum (img, self, @selector (Image: Error saving didFinish: referenceInfo :), zero); } @end

I think this is probably very basic, but I can not find any answer. + moveToCameraRoll: is a class (i.e., static) method, because

self context, the UIImageWriteToSavedPhotosAlbum function MyTest refers to the class selector that you are trying to use is an example method and This is the only example of MyTest , but MyTest is not the same class, it will respond to the selector

To fix this, change your Change image: didFinishSavingWithError: contextInfo: A Method for class method

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -