I am browsing the UIKit framework header files and I see a lot of instances where an anonymous enum is defined followed by a seemingly related typedef. Can someone explain what is going on here?
Does the UIViewAutoresizing type somehow (implicitly) refer to the enum declared in the previous statement? How would you refer to that enum type?
enum {
UIViewAutoresizingNone = 0,
UIViewAutoresizingFlexibleLeftMargin = 1 << 0,
UIViewAutoresizingFlexibleWidth = 1 << 1,
UIViewAutoresizingFlexibleRightMargin = 1 << 2,
UIViewAutoresizingFlexibleTopMargin = 1 << 3,
UIViewAutoresizingFlexibleHeight = 1 << 4,
UIViewAutoresizingFlexibleBottomMargin = 1 << 5
};
typedef NSUInteger UIViewAutoresizing;