哈呜.王

啊,发现一只野生程序员!(๑•̀ㅂ•́)و✧

  • 开发
  • 运维
  • 杂事
  • Me
开发

SwiftUI – 奇怪的 NSColorPanel

哈呜
2020年11月7日
No Comments

Base on macOS 10.15, Xcode 11.7.   1、首先,NSColorPanel 有一个静态“单例”对象:NSColorPanel.shared。我们可以直接使用这个静态对象。这个静态对象也可以被多个组件共…

SwiftUI Read more
开发

SwiftUI Bug – PlainButtonStyle Button 触发次数异常

哈呜
2020年11月3日
No Comments

Base on macOS 10.15, Xcode 11.7. 异常描述 1、当程序运行在非活跃状态时,且 NSWindow 为默认样式(可关闭、缩放、有标题栏等)。 此时如果点击 NSWindow 中的按钮,一般情况下会将该 NSWin…

SwiftUI Read more
开发

Countdown – A countdown task App on macOS 🎉 正式发布 🎉

哈呜
2020年11月2日
No Comments

这两个月初学 SwiftUI,做了一个练手的项目:Countdown。 这是一个运行在 macOS 上的倒计时程序,仿照着 Moment 和 ‎Countdown Timer Plus 这两个程序做的。你可以在列表中管理倒计时任务,可以将倒…

SwiftUI Read more
开发

SwiftUI Bug – NSWindow.setContentSize 获取到错误 size

哈呜
2020年10月26日
No Comments

发现这个问题的起因是我想实现一个 macOS App 的设置窗口,窗口大小自动随内部视图变化尺寸,并且是能平滑地有动画效果的变换尺寸。期望效果如下图所示: 这张 GIF 中的窗口来自 Preferences 。它的底层实现是利用点击 NST…

SwiftUI Read more
开发

SwfitUI 进阶 – View 与 NSView 互相转换

哈呜
2020年10月10日
No Comments

开发环境: macOS 10.15.5 Xcode 11.7 我其实挺喜欢 SwiftUI 的,首先 Swift 语言代码简练,SwfitUI 可以直接用代码进行布局且方便预览,很符合现代开发的习惯。而不是像 Objective-C 那样,…

SwiftUI Read more
开发

SwiftUI 进阶 – 推送消息到通知中心

哈呜
2020年10月3日
No Comments

注意:不管程序是 foreground running, background running 还是 not running,只要在通知中心添加了“推送请求”,那么通知中心就可以到点触发该通知的推送。 1、本地通知 直接上代码吧 impor…

SwiftUI Read more
开发

SwiftUI Bug – onHover() 导致内存泄漏(View 结构体实例不被释放)

哈呜
2020年10月2日
No Comments

环境: macOS 10.15.5 Xcode 11.7 现象: 如果对一个 View 视图使用了 onHover() 修饰器,那么会导致该视图,乃至包裹该视图的最外层视图都不会被释放。 这应该是 SwiftUI 的一个 Bug,但是什么时…

SwiftUI Read more
开发

SwiftUI 进阶 — 计时器 Timer 以及 如何在 View 中监听 NSWindow 事件

哈呜
2020年8月5日
No Comments

Base on macOS 10.15, Xcode 11.7. 一、计时器 Timer 与 TimerPublisher 1.1 Timer 与 TimerPublisher 的基本用法 如果我们想实现一个简单的程序用来显示当前系统时间,…

SwiftUI Read more
开发

SQLite.swift 的类型扩展 — 存储 UUID 的二进制值

哈呜
2020年7月27日
No Comments

首先要知道 SQLite 只支持如下五种存储类型: 存储类 描述 NULL 值是一个 NULL 值。 INTEGER 值是一个带符号的整数,根据值的大小存储在 1、2、3、4、6 或 8 字节中。 REAL 值是一个浮点值,存储为 8 字节…

sqlite swift SwiftUI Read more
开发

NSWindow 无标题栏窗口无法获得焦点与 resize 鼠标指示的解决办法

哈呜
2020年7月26日
No Comments

Base on macOS 10.15, Xcode 11.7. 在 macOS 程序中,对 NSWindow 实例可以通过删除 NSWindow.StyleMask.titled 属性来设置窗口为无标题栏窗口。 // 方法一:实例化时通过…

swift SwiftUI Read more
  • « Previous
  • Next »

近期文章

  • PyQt6 自定义 QTreeView
  • Windows 故障转移群集主机无法 ping 通域控制器的故障排查
  • 在终端会话中设置代理
  • 删除 Windows Server Backup 的历史备份文件
  • IIS 重叠回收可能导致全局的 Application_Start 函数“不触发”
  • CTF 流量分析
  • python 正则匹配任意字符的一个坑
  • Sublime Text 修改插件代码
  • 鼠须管输入法配置
  • SwiftUI – withAnimation 和 AnyTransition. animation() 的区别

.NET backup composer curl dnsmasq freemarker hibernate homebrew http https IIS ios java javascript laravel linux nginx Node.js php pomelo PostgreSQL proxy python qt raspi redis Rime selenium snmp spring sqlite squid stunnel swift SwiftUI vue Windows Wireshark 代理 图像处理 域控 安全 故障转移群集 数据库 爬虫

分类

  • 开发
  • 杂事
  • 运维

标签

.NET backup composer curl dnsmasq freemarker hibernate homebrew http https IIS ios java javascript laravel linux nginx Node.js php pomelo PostgreSQL proxy python qt raspi redis Rime selenium snmp spring sqlite squid stunnel swift SwiftUI vue Windows Wireshark 代理 图像处理 域控 安全 故障转移群集 数据库 爬虫

归档

Copyright © 2023 哈呜.王 | Theme by: Theme Horse | Powered by: WordPress