08 2023 档案

macOS 获取系统设置外观获取系统深色模式皮肤
摘要:#import "ViewController.h" - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. //控件布局 [self layoutSubViews]; 阅读全文

posted @ 2023-08-30 11:16 高彰 阅读(81) 评论(0) 推荐(0)

maoOS NSViewController窗口禁止拖动拉宽拉高NSViewController禁用调整大小
摘要:self.view.frame = CGRectMake(420, 300, 1000, 800); self.preferredContentSize = NSMakeSize(self.view.frame.size.width, self.view.frame.size.height); // 阅读全文

posted @ 2023-08-25 16:22 高彰 阅读(92) 评论(0) 推荐(0)

iOS macOS中的三大计时器(NStimer、CADisplayLink、dispatch_source_set_timer)
摘要:一、介绍 在iOS macOS中,计时器是比较常用的,用于统计累加数据或者倒计时等,例如手机号获取验证码。计时器大概有那么三种,分别是:NSTimer、CADisplayLink、dispatch_source_set_timer 二、使用 @property (strong,nonatomic)N 阅读全文

posted @ 2023-08-24 15:46 高彰 阅读(415) 评论(0) 推荐(0)

Mac OS 开发中监听键盘事件
摘要:在iOS开发中,监听键盘比较好找。但是在Mac开发中监听键盘事件比较难找到相应的方法。下面的两个方法就是Mac开发中常用的监听键盘的方法。 //键盘按下时 - (void)keyDown:(NSEvent *)event{ } //键盘弹起时 - (void)keyUp:(NSEvent *)eve 阅读全文

posted @ 2023-08-10 10:44 高彰 阅读(219) 评论(0) 推荐(0)

iOS macOS URL编码和解码过程(UrlEncode)
摘要:字符串URL编码实现 NSString *urlStr = @"你好0123456789abcxyzABCXYZ-_.~&!*'();:@&=+$,/?#[]% "; //方式一编码对比 NSString *encodingString = [urlStr stringByAddingPercent 阅读全文

posted @ 2023-08-01 16:45 高彰 阅读(678) 评论(0) 推荐(0)

导航