Added support for auto layout by adding the mask on layoutSubviews