我在 IOS 中遇到 UIMenu 问题。菜单反向显示,图标和标题反向
这是我的代码
- (UIContextMenuConfiguration*) tableView : (UITableView*)tableView contextMenuConfigurationForRowAtIndexPath:(NSIndexPath*)indexPath point:(CGPoint)point {
UIContextMenuConfiguration* config = [UIContextMenuConfiguration configurationWithIdentifier:@"ayah-controls"
previewProvider:nil
actionProvider:^UIMenu* _Nullable(NSArray<UIMenuElement*>* _Nonnull suggestedActions) {
NSMutableArray* actions = [[NSMutableArray alloc] init];
[actions addObject:[UIAction actionWithTitle:@"Copy" image:[UIImage systemImageNamed:@"doc.on.doc.fill"] identifier:nil handler:^(__kindof UIAction* _Nonnull action) {
}]];
[actions addObject:[UIAction actionWithTitle:@"مشاركة الاية" image:[UIImage systemImageNamed:@"square.and.arrow.up.fill"] identifier:nil handler:^(__kindof UIAction* _Nonnull action) {
}]];
[actions addObject:[UIAction actionWithTitle:@"حفظ في المفضلة" image:[UIImage systemImageNamed:@"bookmark.fill"] identifier:nil handler:^(__kindof UIAction* _Nonnull action) {
}]];
[actions addObject:[UIAction actionWithTitle:@"إستمع للآية" image:[UIImage systemImageNamed:@"play.fill"] identifier:nil handler:^(__kindof UIAction* _Nonnull action) {
}]];
UIMenu* menu = [UIMenu menuWithChildren:actions];
return menu;
}];
return config;
}