2014-05-06 19:41:08 +02:00
|
|
|
#import "UIUtil.h"
|
|
|
|
|
2014-10-29 21:58:58 +01:00
|
|
|
#define CONTACT_PICTURE_VIEW_BORDER_WIDTH 0.5f
|
2014-05-06 19:41:08 +02:00
|
|
|
|
|
|
|
@implementation UIUtil
|
|
|
|
|
|
|
|
+ (void)applyRoundedBorderToImageView:(UIImageView *__strong*)imageView {
|
|
|
|
[[*imageView layer] setBorderWidth:CONTACT_PICTURE_VIEW_BORDER_WIDTH];
|
2015-02-07 19:41:13 +01:00
|
|
|
[[*imageView layer] setBorderColor:[[UIColor clearColor] CGColor]];
|
2014-05-06 19:41:08 +02:00
|
|
|
[[*imageView layer] setCornerRadius:CGRectGetWidth([*imageView frame])/2];
|
|
|
|
[[*imageView layer] setMasksToBounds:YES];
|
|
|
|
}
|
|
|
|
|
2015-01-30 04:31:35 +01:00
|
|
|
|
2014-05-06 19:41:08 +02:00
|
|
|
+ (void)removeRoundedBorderToImageView:(UIImageView *__strong*)imageView {
|
|
|
|
[[*imageView layer] setBorderWidth:0];
|
|
|
|
[[*imageView layer] setCornerRadius:0];
|
|
|
|
}
|
|
|
|
|
2015-01-30 09:49:40 +01:00
|
|
|
+ (completionBlock)modalCompletionBlock {
|
|
|
|
completionBlock block = ^void() {
|
|
|
|
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
|
|
|
|
};
|
|
|
|
|
|
|
|
return block;
|
|
|
|
}
|
|
|
|
|
2014-05-06 19:41:08 +02:00
|
|
|
@end
|