TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: I want to make a native UI for macOS. What do I use?

18 点作者 throwaddzuzxd大约 3 年前
I don't want to use C, C++ or Objective-C. What do I use to make a native UI for macOS? Is SwiftUI the only proper solution?

5 条评论

finiteseries大约 3 年前
From a UX standpoint, Swift &amp; AppKit is the only “proper” way to make a native UI for macOS at this current time.<p>SwiftUI is a mobile focused framework still being adapted to macOS, I think it’s just gotten tables this year? And even the best Catalyst app in the world (craft.do) will sit somewhere in between Electron and uncanny valley at times when it comes to things as simple as a button.<p>I would highly recommend using AppKit if the app is even slightly nontrivial and fit and finish is a goal.<p>If it’s a simple app and you’re ok with visual hitches and oddities but would like a native macOS “skin”, SwiftUI.<p>If fit and finish isn’t important, just use Electron.
评论 #30910757 未加载
评论 #30910579 未加载
antomeie大约 3 年前
In my native Mac Swift projects typically just generate all the UIKit elements in code and lay them out using NSLayoutConstraints. Once you get a feel for it it is really simple and scales well to different screen dimensions.<p>I gave up using Storyboards a long time ago.
tannedNerd大约 3 年前
Swift UI is the way forward but still not fully developed<p>Mac Catalyst is the current probable best way, but is looking long in tooth as SwiftUI gets all the love<p>AppKit is the old way but unless you want to relearn a bunch I wouldn&#x27;t recommend it
tr3ntg大约 3 年前
It&#x27;d help to know what your UI will do.<p>For most applications, I&#x27;d suggest SwiftUI. That&#x27;s because most UIs are for straightforward CRUD apps. Because everyone else here makes great points. There are lots of reasons to avoid SwiftUI at the moment.<p>However, I&#x27;ve made a handful of SwiftUI apps for macOS that were more than simple. It works well.
olliej大约 3 年前
You can use cocoa from swift without a problem. That would be what I would be inclined to use.
评论 #30910153 未加载