This question is related to an existing one, but I do not understand the differece of execution.
Myproject development environment is XCode 8.3, Swift 3 and Bridging Objc, iOS 9.0 upper.
I want to display activity image in second row.
When UIActivity's category is action in Swift, activity icon is problem.
Case1. Swift CustomActivity, category type is action.
This isn't displaying image.
override class var activityCategory: UIActivityCategory {
return .action
}
override var activityImage: UIImage? {
return UIImage(named: "ic_facebook")
}
Case2. Swift CustomActivity, category type is share.
This is displaying image.
override class var activityCategory: UIActivityCategory {
return .share
}
override var activityImage: UIImage? {
return UIImage(named: "ic_facebook")
}
Case3. Objective-C CustomActivity
In Objc, override instance variable is correct execute.
+ (UIActivityCategory) activityCategory
{
return UIActivityCategoryAction;
}
- (UIImage *) _activityImage
{
return [UIImage imageNamed:@"ic_facebook"];
}
I don't understand, why Objective-C instance parameter is correct execute?
In Swift, Is this inavaliable implements?
What's difference??