11 2019 档案
摘要:简述 在Objective-C的类中,有两种方式可以声明变量 @property: // 在 .h文件 @interface Hello : NSObject @property (nonatomic, strong) UIView *view; @end 或者 // 在 .m文件 @interfa
阅读全文
摘要:介绍 有一个序列 abcdefgh, 假如想要让 abc 和 defgh 互换位置, 可以如何做呢? 这里介绍一种比较脑洞的解法. 先翻转子序列 abc → cba; defgh → hgfed; 现在, 整个序列看起来就是这样 cbahgfed. 再翻转整个序列; cbahgfed → defgh
阅读全文