RaviG RaviG - 1 year ago 49
Swift Question

How to find the name/title of a UIImage in swift?

I'm going to find out the name which is stored in Photo Library of a Phone.
or the name of image which comes from Server.

This is the code I have tried:

let x = self.imageView.accessibilityLabel

Answer Source

Unfortunately, that functionality is not built into UIImage because images are not always loaded from files. However, you could create a custom UIImageView subclass to fit your needs.