Wednesday, 15 February 2012

Objective C Method Retrieving Image -



Objective C Method Retrieving Image -

i'm sure easy fix, it's specific don't know find answer... want create method retrieves , uses uiimage object performed on.

here line calls method imageview object.

[self performselector:@selector(method:) withobject:self.imageview afterdelay:0.0];

and method...

- (void) method:(uiimage *) image { if ([image isequal:image1]){ x = 1; } if ([image isequal:image2]){ x = 2; } if ([image isequal:image3]){ x = 3; } if ([image isequal:image4]){ x = 4; } if ([image isequal:image5]){ x = 5; }

...am going in right way? thanks!

to retrive uiimage uiimageview object should use

[self.imageview image];

and if want create method retrieves , uses uiimage object performed on. (i guess using uiimageview object...) should subclass or add together category uiimageview , add together method it

- (void) method { uiimage* image = [self image]; //do whatever want image //... }

as alternative can pass uiimageview method , allow retrieve image , utilize whatever purpose

- (void) method:(uiimageview*)imageview { uiimage* image = [imageview image]; //do whatever want image //... }

objective-c methods uiimageview uiimage

No comments:

Post a Comment