Simple UIView's category that calculates and resizes subclasses (UIButton, UILabel, UITextField) to its given content size.
Clone this repo and copy the folder Bounds into your Xcode project.
- (void)resizeAndSetText:(NSString *)text;
- (void)resizeAndSetText:(NSString *)text forMasterView:(ETFlowView *)masterView;
- (void)resizeAndSetText:(NSString *)text forMasterView:(ETFlowView *)masterView withMinimumHeight:(CGFloat)mininumHeight;
- (CGFloat)getProbableHeightForText:(NSString *)text;
- (CGFloat)getProbableHeightForText:(NSString *)text withMinimumHeight:(CGFloat)mininumHeight;
- (void)resizeAndSetAttributedText:(NSAttributedString *)text;
- (void)resizeAndSetAttributedText:(NSAttributedString *)text forMasterView:(ETFlowView *)masterView;
- (void)resizeAndSetAttributedText:(NSAttributedString *)text forMasterView:(ETFlowView *)masterView withMinimumHeight:(CGFloat)mininumHeight;
- (CGFloat)getProbableHeightForAttributedText:(NSAttributedString *)text;
- (CGFloat)getProbableHeightForAttributedText:(NSAttributedString *)text withMinimumHeight:(CGFloat)mininumHeight;
Just open an issue on Github and we'll get to it as soon as possible.
UIView+Bounds is brought to you by InEvent.