问题描述
我正在尝试为ios 13实现内容菜单。 这是我已经实现的菜单配置
func collectionView(_ collectionView: UICollectionView,contextMenuConfigurationForItemAt indexPath: IndexPath,point: CGPoint) -> uicontextmenuconfiguration? {
return uicontextmenuconfiguration(identifier: identifier,previewProvider: {
let preview = TitlePreviewViewController_v2.create(with: title,moduleId:
self.viewmodel?.getMouleId())
preview.modalPresentationStyle = .overCurrentContext
return preview
},actionProvider: { suggestedActions in
// Create an action for sharing
let share = UIAction(title: "Share",image: UIImage(systemName: "square.and.arrow.up")) { action in
print("Sharing Me")
}
// Create other actions...
return UIMenu(title: "",children: [share])
})
}
我想要的是设置previwe的背景颜色 如透明。但是我做不到。检查屏幕截图。白色背景 我想将其更改为透明。
任何帮助将不胜感激。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)