Last active
June 23, 2022 11:00
-
-
Save mazharulbelal/2f8b29865e77a2095ffadc256c2cab0e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension Array { | |
func transtionDoctorTitle() -> String { | |
let titles = self.map {changeLanguage.key(key: doctorData[$0 as! String] ?? changeLanguage.key(key: notGivenKey))} | |
return titles.joined(separator: ", ") | |
} | |
} | |
// DOWNLOAD IMAGE FROM URL | |
extension UIImageView { | |
func downloadImg(_ url: String) { | |
let afterRemovedSpaceImgPath = url.replacingOccurrences(of: " ", with: "%20", options: .literal, range: nil) | |
self.sd_imageIndicator = SDWebImageActivityIndicator.gray | |
self.sd_setImage(with: URL(string: afterRemovedSpaceImgPath), placeholderImage: UIImage(named: "PlaceHolder")) | |
} | |
} | |
// IMAGE VIEW MAKE CIRCLE | |
extension UIImageView { | |
public func makeCircle() { | |
self.contentMode = UIView.ContentMode.scaleAspectFill | |
self.layer.cornerRadius = self.frame.height / 2 | |
self.layer.masksToBounds = false | |
self.clipsToBounds = true | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment