As I understood right we can use function
func saveImage(imageType:imageType, thumb: UIImage, completion: CompletionHandler)
like this:
imageSaver.saveImage(someType, thumb:image) { in
...
}
but actually as from Objective-C I suppose that block is a parameter and maybe should I use it like this:
imageSaver.saveImage(someType, thumb:image, { in
...
})
Also one more that is interesting for me as Objective-C coder it's passing arguments to a function:
so if I want to add some params to savaImage function like this:
func saveImage(someInt:UInt, imageType:imageType, thumb: UIImage, completion: CompletionHandler)
then I should call it with specifying imageType name.
imageSaver.saveImage(10, imageType:someType, thumb:image) { in
...
}
I guess in Swift we have something like skipping definition of function
Objective-C example:
- (void)saveImage:(UIImage *)image withParams:(NSDictionary *)params
So withParams sometimes can be skipped at start of function, as I understood right, which is not quite obvious for me)