소스 검색

fix avatar

marinofaggiana 4 년 전
부모
커밋
7ce31e9db4
2개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 2
      iOSClient/Extensions/UIImageView+Extensions.swift
  2. 1 1
      iOSClient/Settings/CCManageAccount.m

+ 2 - 2
iOSClient/Extensions/UIImageView+Extensions.swift

@@ -26,7 +26,7 @@ import Foundation
 
 
 extension UIImageView {
 extension UIImageView {
     
     
-    @objc func avatar(roundness: CGFloat = 2, borderWidth: CGFloat = 1, borderColor: UIColor = .lightGray, backgroundColor: UIColor = .clear) {
+    @objc func avatar(roundness: CGFloat = 2, borderWidth: CGFloat = 1, borderColor: UIColor = NCBrandColor.shared.icon, backgroundColor: UIColor = .clear) {
         
         
         layer.cornerRadius = bounds.width / roundness
         layer.cornerRadius = bounds.width / roundness
         layer.borderWidth = borderWidth
         layer.borderWidth = borderWidth
@@ -46,7 +46,7 @@ extension UIImageView {
         
         
         layer.cornerRadius = 0
         layer.cornerRadius = 0
         layer.borderWidth = 0
         layer.borderWidth = 0
-        layer.borderColor = UIColor.black.cgColor
+        layer.borderColor = nil
         layer.backgroundColor = nil
         layer.backgroundColor = nil
         
         
         clipsToBounds = false
         clipsToBounds = false

+ 1 - 1
iOSClient/Settings/CCManageAccount.m

@@ -62,7 +62,7 @@
             
             
             avatar = [avatar resizeImageWithSize:CGSizeMake(35, 35) isAspectRation:false];
             avatar = [avatar resizeImageWithSize:CGSizeMake(35, 35) isAspectRation:false];
             UIImageView *avatarImageView = [[UIImageView alloc] initWithImage:avatar];
             UIImageView *avatarImageView = [[UIImageView alloc] initWithImage:avatar];
-            [avatarImageView avatarWithRoundness:2 borderWidth:1 borderColor:[UIColor lightGrayColor] backgroundColor:[UIColor clearColor]];
+            [avatarImageView avatarWithRoundness:2 borderWidth:1 borderColor:NCBrandColor.shared.icon backgroundColor:[UIColor clearColor]];
             
             
             CGSize imageSize = avatarImageView.bounds.size;
             CGSize imageSize = avatarImageView.bounds.size;
             UIGraphicsBeginImageContextWithOptions(imageSize, NO, UIScreen.mainScreen.scale);
             UIGraphicsBeginImageContextWithOptions(imageSize, NO, UIScreen.mainScreen.scale);