Skip to content

Instantly share code, notes, and snippets.

@a2
Created November 3, 2011 02:11
Show Gist options
  • Save a2/1335594 to your computer and use it in GitHub Desktop.
Save a2/1335594 to your computer and use it in GitHub Desktop.
Private (i.e., non-public) `UIActivityIndicatorView` style constants
// NB: Using undefined constants can not only make the indicator appear blank,
// but it can also run a slew of nasty NSLog statements about missing image files.
// That being said, the following constants are guaranteed to work on the
// latest builds of iOS 4 and iOS 5 as indicated by the pragma directive.
enum {
UIActivityIndicatorViewStyleWhiteSmall = 3, // small network activity indicator glyph
UIActivityIndicatorViewStyleGraySmall = 4 // same as '3' but white color on black status bar
#ifdef __IPHONE_5_0
,
UIActivityIndicatorViewStyleSyncWhite = 6, // small syncing-with-iTunes glyph
UIActivityIndicatorViewStyleSyncGray = 7, // same as '6' but white color
UIActivityIndicatorViewStyleWhiteSmallShadowed = 11, // same as '3' but w/shadow for Notification Center status bar
UIActivityIndicatorViewStyleSyncWhiteShadowed = 12 // same as '6' but w/shadow
#endif
};
// Since you can't create a `typedef` extension, you could create constant global
// `const UIActivityIndicatorViewStyle`s if you want that level of type unambiguity.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment