浏览代码

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 {
     
-    @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.borderWidth = borderWidth
@@ -46,7 +46,7 @@ extension UIImageView {
         
         layer.cornerRadius = 0
         layer.borderWidth = 0
-        layer.borderColor = UIColor.black.cgColor
+        layer.borderColor = nil
         layer.backgroundColor = nil
         
         clipsToBounds = false

+ 1 - 1
iOSClient/Settings/CCManageAccount.m

@@ -62,7 +62,7 @@
             
             avatar = [avatar resizeImageWithSize:CGSizeMake(35, 35) isAspectRation:false];
             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;
             UIGraphicsBeginImageContextWithOptions(imageSize, NO, UIScreen.mainScreen.scale);