public static UIImage GetImage(string path, UIColor mask = null) { if (path.IsNullOrEmtpy()) { return(null); } var image = new UIImage(); var targetKey = GetImageKey(path, mask); if (_cache.TryGetValue(targetKey, out image)) { return(image); } image = path.LoadFromFile(); if (image == null) { return(new UIImage()); } if (mask == UIColor.Clear) { return(image); } if (mask != null) { image = image.ApplyColorMask(mask); } _cache.Add(targetKey, image); return(image); }