I'm using setBackgroundImage:forState: to update the background of a UIButton. The background is updated but only after a few seconds. There is obviously some refresh cycle at work here but I can't find exactly what the problem is. I've tried to play with setNeedsRefresh and setNeedsDisplay without any result.
How can I change the UIButton background instantaneously ?
Thanks
Strange delays like this are usually caused when you try and perform UIKit operations on a background thread (e.g. in a delegate callback). Try this: