I am facing a simple problem by i have found a solution to it :).
if we have for example this :
typedef NS_OPTIONS(NSUInteger, UIViewAutoresizing) {
UIViewAutoresizingNone = 0,
UIViewAutoresizingFlexibleLeftMargin = 1 << 0,
UIViewAutoresizingFlexibleWidth = 1 << 1,
UIViewAutoresizingFlexibleRightMargin = 1 << 2,
UIViewAutoresizingFlexibleTopMargin = 1 << 3,
UIViewAutoresizingFlexibleHeight = 1 << 4,
UIViewAutoresizingFlexibleBottomMargin = 1 << 5
};
and a property like this :
@property (nonatomic, assign) UIViewAutoresizing autoresizingMask;
and this :
self.autoresizingMask = UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleWidth ;
The questions is : How to know the number of items (UIViewAutoresizing
values) in the autoresizingMask
property ? ( in my example i have 2)