But this method has a drawback, it takes max 1 argument, and that
argument must be an object. Making it not that useful if you want to
move a UI component using -[UIView setFrame:], since it takes a CGRect
that is a C struct as argument. Even worse for things like -
[UITableView deleteRowsForIndexPaths:withRowAnimation:], that takes
two arguments, the last one being a C primitive.
I have written a blog post, and releases the accompanying code as open
source, for a category on NSInvocation. A category that makes it just
as easy to call any method, on the main thread, regardless of the
number of arguments and/or their types.
http://blog.jayway.com/2010/03/30/performing-any-selector-on-the-main-thread/
regards
Fredrik Olsson