mirror of
https://github.com/zhigang1992/GitHawk.git
synced 2026-05-25 18:32:22 +08:00
23 lines
539 B
Swift
23 lines
539 B
Swift
//
|
|
// UIImageView+Avatar.swift
|
|
// Freetime
|
|
//
|
|
// Created by Ryan Nystrom on 11/19/17.
|
|
// Copyright © 2017 Ryan Nystrom. All rights reserved.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
extension UIImageView {
|
|
|
|
func configureForAvatar() {
|
|
contentMode = .scaleAspectFill
|
|
backgroundColor = Styles.Colors.Gray.lighter.color
|
|
layer.cornerRadius = Styles.Sizes.avatarCornerRadius
|
|
layer.borderColor = Styles.Colors.Gray.light.color.cgColor
|
|
layer.borderWidth = 1.0 / UIScreen.main.scale
|
|
clipsToBounds = true
|
|
}
|
|
|
|
}
|