mirror of https://github.com/oxen-io/session-ios
				
				
				
			
			You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
	
	
		
			48 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Matlab
		
	
		
		
			
		
	
	
			48 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Matlab
		
	
| 
											9 years ago
										 | // | ||
| 
											7 years ago
										 | //  Copyright (c) 2018 Open Whisper Systems. All rights reserved. | ||
| 
											9 years ago
										 | // | ||
|  | 
 | ||
| 
											12 years ago
										 | #import "UIUtil.h" | ||
| 
											7 years ago
										 | #import "Theme.h" | ||
| 
											7 years ago
										 | #import "UIColor+OWS.h" | ||
| 
											5 years ago
										 | #import <SessionUtilitiesKit/AppContext.h> | ||
| 
											5 years ago
										 | 
 | ||
| 
											5 years ago
										 | #import <SessionUIKit/SessionUIKit.h> | ||
| 
											12 years ago
										 | 
 | ||
| 
											11 years ago
										 | #define CONTACT_PICTURE_VIEW_BORDER_WIDTH 0.5f | ||
| 
											12 years ago
										 | 
 | ||
|  | @implementation UIUtil | ||
|  | 
 | ||
| 
											9 years ago
										 | + (void)applyRoundedBorderToImageView:(UIImageView *)imageView | ||
|  | { | ||
|  |     imageView.layer.borderWidth = CONTACT_PICTURE_VIEW_BORDER_WIDTH; | ||
|  |     imageView.layer.borderColor = [UIColor clearColor].CGColor; | ||
|  |     imageView.layer.cornerRadius = CGRectGetWidth(imageView.frame) / 2; | ||
|  |     imageView.layer.masksToBounds = YES; | ||
| 
											12 years ago
										 | } | ||
|  | 
 | ||
| 
											8 years ago
										 | + (void)removeRoundedBorderToImageView:(UIImageView *__strong *)imageView | ||
|  | { | ||
| 
											12 years ago
										 |     [[*imageView layer] setBorderWidth:0]; | ||
|  |     [[*imageView layer] setCornerRadius:0]; | ||
|  | } | ||
|  | 
 | ||
| 
											7 years ago
										 | + (void)setupSignalAppearence | ||
| 
											8 years ago
										 | { | ||
| 
											6 years ago
										 |     UINavigationBar.appearance.barTintColor = UIColor.whiteColor; | ||
|  |     UINavigationBar.appearance.translucent = NO; | ||
|  |     UINavigationBar.appearance.tintColor = UIColor.blackColor; | ||
|  |     UIToolbar.appearance.barTintColor = UIColor.blackColor; | ||
|  |     UIToolbar.appearance.translucent = NO; | ||
|  |     UIToolbar.appearance.tintColor = UIColor.whiteColor; | ||
|  |      | ||
|  |     UIBarButtonItem.appearance.tintColor = UIColor.blackColor; | ||
| 
											6 years ago
										 |     [UISwitch.appearance setOnTintColor:LKColors.accent]; | ||
|  |     [UIToolbar.appearance setTintColor:LKColors.accent]; | ||
| 
											7 years ago
										 |      | ||
| 
											9 years ago
										 |     // If we set NSShadowAttributeName, the NSForegroundColorAttributeName value is ignored. | ||
| 
											6 years ago
										 |     UINavigationBar.appearance.titleTextAttributes = @{ NSForegroundColorAttributeName : UIColor.blackColor }; | ||
| 
											9 years ago
										 | } | ||
|  | 
 | ||
| 
											12 years ago
										 | @end |