Size of icon image for UIActivity in ios?

1.1k views Asked by At

I am creating a custom UIActivity.Image. What size should return by function activityImage?

Currently I have implemented it like this.

override func activityImage()-> UIImage {
   return UIImage(named: "[email protected]")!
}
1

There are 1 answers

0
Ely On

In case you use a SF Symbol image, you must use a .large scale format in order to get an image with the same size as system UIActivity items:

override var activityImage: UIImage? {
    return UIImage(systemName: "safari", withConfiguration: UIImage.SymbolConfiguration(scale: .large))
}