ios - Return a copy of a UIImage instead of change in place -
i'm newbie @ ios development, , have run seems odd me. i've got following method take large image , make smaller version of it, upload both server: - (void)prepareanduploadimages { uiimage *originalimage = self.imageview.image; uiimage *smallerimage = [originalimage resizedimagewithcontentmode:uiviewcontentmodescaleaspectfill bounds:cgsizemake(1024.0, 768.0) interpolationquality:1]; [self uploadimage:originalimage withfilename:@"original.jpg"]; [self uploadimage:smallerimage withfilename:@"smaller.jpg"]; } this uploading images fine, weird thing when land on server "original.jpg" image shrunk version , "smaller.jpg" full-size image. i'm using uiimage resizedimagewithcontentmode: method uiimagecategories , it's return looks this: return [self resizedimage:newsize interpolationquality:quality]; the resizedimage:interpolationquality method it's calling returns this: return [self resizedimage:newsize tra...