tonytran
tonytran

Reputation: 73

declare a variable of UIIMage+AFNetWorking

I am downloading an image from a url using UIImage+AFNetworking. How can I declare a variable of type UIImage+AFNetworking? Should it be

UIImage+AFNetworking *myRequest  = [[ UIImage+AFNetworking....] ];

I know it does not make sense when we have a + sign in the middle. Please advice me if you know how to do it.

Upvotes: 1

Views: 761

Answers (1)

cweinberger
cweinberger

Reputation: 3588

I guess this is only a category; by including the headerfile into your class, it will automatically extend the UIImage class with the AFNetworking functionality.

Means:

UIImage *myImage = [[UIImage alloc] init];
[myImage replaceMeWithTheRightMethodCall];

Best, Christian

Upvotes: 4

Related Questions