c# - mono 不能 100% 正确移植 macOS 可可
问题描述
我尝试使用 Visual Studio macOS 开发一个使用 c# 语言的 macOS 应用程序。
但我发现单声道中有很多错误
例如:
UITabView 有属性 'numberOfTabViewItems' 'tabViewItemAtIndex',但在 VS macOS 中它报告了错误。
NSTabView
https://developer.apple.com/documentation/appkit/nstabview?language=objc
using System;
using AppKit;
using Foundation;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
欢迎您的评论
解决方案
Xamarin 将 macOS/iOS API 名称规范化为 C# 样式命名:
所以 ObjCnumberOfTabViewItems
就变成了Items
Xamarin 的 NSTabView 类:https ://docs.microsoft.com/en-us/dotnet/api/appkit.nstabview?view=xamarin-mac-sdk-14
推荐阅读
- .htaccess - 限制对 htaccess 中目录的访问
- javascript - NextJs 中的 Antd 自定义主题
- c++ - 编译器建议类的两个候选人
- python - 卡片元素之间的间隙
- qt - 如何在 TableView QtQuick.Controls 2.4 中实现 TableView QtQuick.Controls 1.4 的 Selectable future
- javascript - 从 ID 数组中查询 firestore 中的文档
- git - ssh 连接超时说明
- wordpress - 在帖子主页中显示自定义字段副标题(主题 Hueman)。-
- c - 如何在linux中一次加载一个ELF文件?
- python - 使用 websocket 的相互 SSL/TLS