Search code examples
iphoneipadios6uiimagejpegrepresentation

-base64Encoding return type defaults to id


In my application when i try with following coding i get the warning as

Code

[UIImageJPEGRepresentation(petAvadar.image, 1.0)base64Encoding]

WARNING

Instance method '-base64Encoding' not found (return type defaults to 'id')

How to remove this warning,Please help me to solve.


Solution

  • You need to declare your function in the header file.

    You should add a line like this :

    -(returnType)base64Encoding;
    

    Where returnType is the type returned by your method, like NSString*, NSInteger, void or whatever your method returns.