session-ios/Signal/src/util/UIUtil.m
Frederic Jacobs 402df72306 Attachments handling
- Sends image rotated
- If message is delete, delete the attachment db object and file
- Delete attachment from detail view
2015-01-04 11:30:26 +01:00

20 lines
616 B
Objective-C

#import "UIUtil.h"
#define CONTACT_PICTURE_VIEW_BORDER_WIDTH 0.5f
@implementation UIUtil
+ (void)applyRoundedBorderToImageView:(UIImageView *__strong*)imageView {
[[*imageView layer] setBorderWidth:CONTACT_PICTURE_VIEW_BORDER_WIDTH];
[[*imageView layer] setBorderColor:[[UIColor lightGrayColor] CGColor]];
[[*imageView layer] setCornerRadius:CGRectGetWidth([*imageView frame])/2];
[[*imageView layer] setMasksToBounds:YES];
}
+ (void)removeRoundedBorderToImageView:(UIImageView *__strong*)imageView {
[[*imageView layer] setBorderWidth:0];
[[*imageView layer] setCornerRadius:0];
}
@end