10 2022 档案

iOS MacOS 系统时间(时间戳)格式化
摘要:#pragma mark -原始数据是20220608155116,加工成2022/06/08 15:51:16 -(NSString *)timeString:(NSString *)toIndexstring{ NSMutableArray *arr = [NSMutableArray arra 阅读全文

posted @ 2022-10-31 17:45 高彰 阅读(149) 评论(0) 推荐(0) 编辑

macOS NSScrollView简单使用
摘要:先看图片 这里是NSScrollView配合其他控件使用,我们这里只讲NSScrollView。 复制以下代码即可以运行 @interface ViewControl () /** 滚动显示 */ @property (nonatomic, strong) NSScrollView *scrollV 阅读全文

posted @ 2022-10-17 15:20 高彰 阅读(829) 评论(0) 推荐(0) 编辑

macOS NSCollectionView简单操作
摘要:先看效果 最简单的两份文件,复制-生产即可运行 第一份(主要) ViewController.h #import <Cocoa/Cocoa.h> @interface ViewController : NSViewController @end ViewController.m @interface 阅读全文

posted @ 2022-10-14 15:31 高彰 阅读(490) 评论(1) 推荐(0) 编辑

播放器m3u8
摘要:https://www.m3u8play.com/ 阅读全文

posted @ 2022-10-12 15:55 高彰 阅读(92) 评论(0) 推荐(0) 编辑

macOS 为什么我的NSView委托(delegate)方法没有被调用?
摘要:现在,方法未被调用,我在做什么错? 最佳答案 如果希望NSView子类接受事件,则必须实现: - (BOOL)acceptsFirstResponder { return YES; } 阅读全文

posted @ 2022-10-11 13:49 高彰 阅读(38) 评论(0) 推荐(0) 编辑

iOS macOS代理传值
摘要:说明:代理传值一般在反向传值中使用。 本贴的例子是:有A和B两个界面,要实现的效果就是先让A跳转到B,然后B中有个颜色的参数,当B跳转到A时,把这个颜色的参数传递给A,在A中利用这个颜色改变自己界面的颜色。 第1步:在发送者(界面B)中,制定协议(在.h头文件中声明) // @protocol协议名 阅读全文

posted @ 2022-10-11 11:21 高彰 阅读(53) 评论(0) 推荐(0) 编辑

macOS开发 NSSegmentedControl
摘要:先看效果 直接复制代码运行 #import "ViewController.h" @interface ViewController () ///分段控制器 @property (nonatomic, strong) NSSegmentedControl *MenuViewSegment; @end 阅读全文

posted @ 2022-10-11 09:58 高彰 阅读(163) 评论(0) 推荐(0) 编辑

macOS UI颜色
摘要:NSButton if (@available(macOS 10.14, *)) { _btnLeadershipRisingPlate.contentTintColor = NSColorFromName(@"g-appColor"); } else { NSMutableAttributedSt 阅读全文

posted @ 2022-10-10 15:13 高彰 阅读(74) 评论(0) 推荐(0) 编辑

iOS macOS 倒计时计时动作事件
摘要:/* 计时刷新数据 **/ @property (nonatomic, weak) NSTimer *timer; /* 计时 **/ @property (nonatomic, assign) int timerCount; //////////////////////////////////// 阅读全文

posted @ 2022-10-10 10:27 高彰 阅读(47) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示