Sounds pretty basic, and it is, but like many things there are lots of ways to do it. This is my new favorite:

1
u_int32_t arc4random_uniform(u_int32_t /*upper_bound*/) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);

Based on discussions on StackOverflow and my own testing.

This assumes you’re on iOS 4.3 or later, however.