我想在玩家右键点击控制杆时添加一个事件处理,这意味着激活它。我该怎么做?
答案 0 :(得分:1)
查看Material.LEVER
并检查他点击的内容类型是否等于UIImage *img = ...;
NSError *err;
NSData *imgData = [imageSerialization animatedGIFDataWithImage:img error:&err];
NSLog(@"%@", err);
NSArray *objectsToShare = @[imgData];
UIActivityViewController *avc = [[UIActivityViewController alloc] initWithActivityItems:objectsToShare applicationActivities:nil];
NSArray *excludeActivities = @[UIActivityTypePrint, UIActivityTypeAssignToContact];
avc.excludedActivityTypes = excludeActivities;
[self presentViewController:avc animated:YES completion:nil];