Make custom item in UIActivityViewController icon brighter?
I am following the steps in How to create a custom UIActivity in iOS? Works as expected. It looks like iOS makes the metallic look and feel of all custom icons as well as its own "bookmarks", "print", etc. Is there anyway to make the icon bright?
+3
source to share
2 answers
On iOS 10, set the class property activityCategory
to .share. This will cause the activity icon to appear in color on the top bar of the UIActivityViewController.
In a subclass of UIActivity:
On iOS 10, set the class property activityCategory
to .share. This will cause the activity icon to appear in color on the top bar of the UIActivityViewController.
In a subclass of UIActivity:
class MyCustomActivity: UIActivity
{
...
override open class var activityCategory: UIActivityCategory
{
get
{
return UIActivityCategory.share;
}
}
...
}
+1
source to share