You know in Cocoa there is this thing, for example you can create a UIView and do:
UIView
view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIV
Useful function you can use for bitmask checking to improve readability.
BOOL bitmaskContains(NSUInteger bitmask, NSUInteger contains) { return (bitmask & contains) != 0; }