博客园 - 裸奔的小鸟uuid:24b78886-0ed1-41c2-8670-e3f31dcf42c4;id=1741402021-08-04T09:14:32Z裸奔的小鸟https://www.cnblogs.com/streakingBird/feed.cnblogs.comhttps://www.cnblogs.com/streakingBird/p/12622593.htmlSwift 面向协议编程的一点见解 - 裸奔的小鸟都说Swift与Objective C最大的区别就是面向协议编程, 这个话要这么理解,到底什么场景下需要用到协议呢? 下面举个例子来说说我个人对于这个问题的一些看法 假如现在有一个页面需要弹出一个弹框, 弹框有很多不同的形式. 带"确认"和"取消"两个按钮的弹框 右上角有个"X"的关闭按钮的弹框 带2020-04-03T01:29:00Z2020-04-03T01:29:00Z裸奔的小鸟https://www.cnblogs.com/streakingBird/【摘要】都说Swift与Objective C最大的区别就是面向协议编程, 这个话要这么理解,到底什么场景下需要用到协议呢? 下面举个例子来说说我个人对于这个问题的一些看法 假如现在有一个页面需要弹出一个弹框, 弹框有很多不同的形式. 带"确认"和"取消"两个按钮的弹框 右上角有个"X"的关闭按钮的弹框 带 <a href="https://www.cnblogs.com/streakingBird/p/12622593.html" target="_blank">阅读全文</a>https://www.cnblogs.com/streakingBird/p/12614913.htmlSwift 项目中添加main方法 - 裸奔的小鸟接上一篇文章 Swift 模块化框架的实现以及模块之间的解藕 之后, 我们近一步让app在启动之前就调用ModuleManager的初始化方法. 在OC中是有一个main.m文件以及一个main函数的,但是在swift中被去掉了,取而代之的是在AppDelegate.m中使用 @UIApplicat2020-04-01T11:13:00Z2020-04-01T11:13:00Z裸奔的小鸟https://www.cnblogs.com/streakingBird/【摘要】接上一篇文章 Swift 模块化框架的实现以及模块之间的解藕 之后, 我们近一步让app在启动之前就调用ModuleManager的初始化方法. 在OC中是有一个main.m文件以及一个main函数的,但是在swift中被去掉了,取而代之的是在AppDelegate.m中使用 @UIApplicat <a href="https://www.cnblogs.com/streakingBird/p/12614913.html" target="_blank">阅读全文</a>https://www.cnblogs.com/streakingBird/p/12613563.htmlSwift 模块化框架的实现以及模块之间的解藕 - 裸奔的小鸟一般比较大的项目都会使用到模块化的方式来管理各个组件, 这样每个模块的owner只需要专注于该模块的开发,而不需要关心其他模块. 于是本文简单介绍一下Swift模块化框架的简单实现. 模块化实现 整体思路是这样的, app启动后先初始化一个模块管理类ModuleManager, 然后由ModuleM2020-04-01T08:36:00Z2020-04-01T08:36:00Z裸奔的小鸟https://www.cnblogs.com/streakingBird/【摘要】一般比较大的项目都会使用到模块化的方式来管理各个组件, 这样每个模块的owner只需要专注于该模块的开发,而不需要关心其他模块. 于是本文简单介绍一下Swift模块化框架的简单实现. 模块化实现 整体思路是这样的, app启动后先初始化一个模块管理类ModuleManager, 然后由ModuleM <a href="https://www.cnblogs.com/streakingBird/p/12613563.html" target="_blank">阅读全文</a>https://www.cnblogs.com/streakingBird/p/12605343.htmlSwift 简单工厂模式、工厂方法模式、抽象工厂模式解析 - 裸奔的小鸟1. 简单工厂模式 一个工厂类 内部用 switch case 创建不同对象 1 import UIKit 2 3 protocol Service { 4 var url: URL { get } 5 } 6 7 // dev阶段 8 class StagingService: Service {2020-03-31T07:07:00Z2020-03-31T07:07:00Z裸奔的小鸟https://www.cnblogs.com/streakingBird/【摘要】1. 简单工厂模式 一个工厂类 内部用 switch case 创建不同对象 1 import UIKit 2 3 protocol Service { 4 var url: URL { get } 5 } 6 7 // dev阶段 8 class StagingService: Service { <a href="https://www.cnblogs.com/streakingBird/p/12605343.html" target="_blank">阅读全文</a>https://www.cnblogs.com/streakingBird/p/10524135.htmlScriptToApp FAQ - 裸奔的小鸟Due to the limitations of the app store, it is currently only supported to create an app for a script file. And when the script file is updated, you n2019-03-13T08:38:00Z2019-03-13T08:38:00Z裸奔的小鸟https://www.cnblogs.com/streakingBird/【摘要】Due to the limitations of the app store, it is currently only supported to create an app for a script file. And when the script file is updated, you n <a href="https://www.cnblogs.com/streakingBird/p/10524135.html" target="_blank">阅读全文</a>https://www.cnblogs.com/streakingBird/p/10301303.htmlEye Protection FAQ - 裸奔的小鸟Q: Why does smart protection not work? A: Please make sure the checkbox "Eye Protection" is on, app activated is not in the exception list and the cur2019-01-21T14:09:00Z2019-01-21T14:09:00Z裸奔的小鸟https://www.cnblogs.com/streakingBird/【摘要】Q: Why does smart protection not work? A: Please make sure the checkbox "Eye Protection" is on, app activated is not in the exception list and the cur <a href="https://www.cnblogs.com/streakingBird/p/10301303.html" target="_blank">阅读全文</a>https://www.cnblogs.com/streakingBird/p/10150723.htmlLive Score FAQ - 裸奔的小鸟Q: Why doesn't the selected game go to top? A: The game which include your favorite team will be always at top, your selected game will be the top #2.2018-12-20T09:29:00Z2018-12-20T09:29:00Z裸奔的小鸟https://www.cnblogs.com/streakingBird/【摘要】Q: Why doesn't the selected game go to top? A: The game which include your favorite team will be always at top, your selected game will be the top #2. <a href="https://www.cnblogs.com/streakingBird/p/10150723.html" target="_blank">阅读全文</a>https://www.cnblogs.com/streakingBird/p/9947897.htmlQuick Search FAQ - 裸奔的小鸟Q: Why does it jump to an incorrect page? A: Some categories, such as twitter, may need to log in in advance. Q: Which languages does Google Transla2018-11-12T09:36:00Z2018-11-12T09:36:00Z裸奔的小鸟https://www.cnblogs.com/streakingBird/【摘要】Q: Why does it jump to an incorrect page? A: Some categories, such as twitter, may need to log in in advance. Q: Which languages does Google Transla <a href="https://www.cnblogs.com/streakingBird/p/9947897.html" target="_blank">阅读全文</a>https://www.cnblogs.com/streakingBird/p/9884046.htmliPhone Screen FAQ - 裸奔的小鸟Q: Why is it a blank window after openning the app and connect mobile device? A: Please make sure that the screen of your mobile device is unlocked. Q2018-10-31T08:34:00Z2018-10-31T08:34:00Z裸奔的小鸟https://www.cnblogs.com/streakingBird/【摘要】Q: Why is it a blank window after openning the app and connect mobile device? A: Please make sure that the screen of your mobile device is unlocked. Q <a href="https://www.cnblogs.com/streakingBird/p/9884046.html" target="_blank">阅读全文</a>https://www.cnblogs.com/streakingBird/p/9817432.htmlQuick Launcher FAQ - 裸奔的小鸟Q: Which category can be previewed and selected in Finder? A: All the categories can be selected in Finder, and the "Files" and be previewed. Q: What 2018-10-19T08:55:00Z2018-10-19T08:55:00Z裸奔的小鸟https://www.cnblogs.com/streakingBird/【摘要】Q: Which category can be previewed and selected in Finder? A: All the categories can be selected in Finder, and the "Files" and be previewed. Q: What <a href="https://www.cnblogs.com/streakingBird/p/9817432.html" target="_blank">阅读全文</a>https://www.cnblogs.com/streakingBird/p/9733659.htmlZoom Me FAQ - 裸奔的小鸟Q: How to config custom shortcuts? A: Enter the preferences setting window from menu bar "Preferences" and then set the shortcuts, the shortcuts are a2018-09-30T14:58:00Z2018-09-30T14:58:00Z裸奔的小鸟https://www.cnblogs.com/streakingBird/【摘要】Q: How to config custom shortcuts? A: Enter the preferences setting window from menu bar "Preferences" and then set the shortcuts, the shortcuts are a <a href="https://www.cnblogs.com/streakingBird/p/9733659.html" target="_blank">阅读全文</a>https://www.cnblogs.com/streakingBird/p/9669481.htmlShow Desktop Pro FAQ - 裸奔的小鸟Q. Will the desktop background image be restored after quit? A: Yes. Right now, "Hide icons" and "Change desktop background" features are both tempora2018-09-18T08:04:00Z2018-09-18T08:04:00Z裸奔的小鸟https://www.cnblogs.com/streakingBird/【摘要】Q. Will the desktop background image be restored after quit? A: Yes. Right now, "Hide icons" and "Change desktop background" features are both tempora <a href="https://www.cnblogs.com/streakingBird/p/9669481.html" target="_blank">阅读全文</a>https://www.cnblogs.com/streakingBird/p/9560497.htmlThe Startup Manager FAQ - 裸奔的小鸟Main Features: 1. Login Items: Manageable list of applications that are launched automatically every time you log in.2. Launch Agents: Some applicatio2018-08-30T07:32:00Z2018-08-30T07:32:00Z裸奔的小鸟https://www.cnblogs.com/streakingBird/【摘要】Main Features: 1. Login Items: Manageable list of applications that are launched automatically every time you log in.2. Launch Agents: Some applicatio <a href="https://www.cnblogs.com/streakingBird/p/9560497.html" target="_blank">阅读全文</a>https://www.cnblogs.com/streakingBird/p/9402320.htmlFinder Quick Menu FAQ - 裸奔的小鸟How to use Finder Quick Menur: 1. Start Finder Quick Menu.2. Open "System Preferences -> Extension" to enable "Finder Quick Menu Extension".3. Go to F2018-08-01T09:03:00Z2018-08-01T09:03:00Z裸奔的小鸟https://www.cnblogs.com/streakingBird/【摘要】How to use Finder Quick Menur: 1. Start Finder Quick Menu.2. Open "System Preferences -> Extension" to enable "Finder Quick Menu Extension".3. Go to F <a href="https://www.cnblogs.com/streakingBird/p/9402320.html" target="_blank">阅读全文</a>https://www.cnblogs.com/streakingBird/p/9369907.htmlThe App Locker FAQ - 裸奔的小鸟How to use The App Locker: 1. Start The App Locker, create a password.2. In the main console, click "+" and select the apps you want to lock.3. You ca2018-07-26T01:47:00Z2018-07-26T01:47:00Z裸奔的小鸟https://www.cnblogs.com/streakingBird/【摘要】How to use The App Locker: 1. Start The App Locker, create a password.2. In the main console, click "+" and select the apps you want to lock.3. You ca <a href="https://www.cnblogs.com/streakingBird/p/9369907.html" target="_blank">阅读全文</a>https://www.cnblogs.com/streakingBird/p/4281553.html【转载】在block中使用weakSelf/strongSelf - 裸奔的小鸟http://blog.lessfun.com/blog/2014/11/22/when-should-use-weakself-and-strongself-in-objc-block/2015-02-09T06:44:00Z2015-02-09T06:44:00Z裸奔的小鸟https://www.cnblogs.com/streakingBird/【摘要】http://blog.lessfun.com/blog/2014/11/22/when-should-use-weakself-and-strongself-in-objc-block/ <a href="https://www.cnblogs.com/streakingBird/p/4281553.html" target="_blank">阅读全文</a>https://www.cnblogs.com/streakingBird/p/4178466.html【转载】User notification 的实现方法 - 裸奔的小鸟原帖请看:http://cocoathings.blogspot.com/2013/01/introduction-to-user-notifications-in.html想要实现如图这样的notification popup弹出notification的代码如下NSUserNotificatio...2014-12-22T08:25:00Z2014-12-22T08:25:00Z裸奔的小鸟https://www.cnblogs.com/streakingBird/【摘要】原帖请看:http://cocoathings.blogspot.com/2013/01/introduction-to-user-notifications-in.html想要实现如图这样的notification popup弹出notification的代码如下NSUserNotificatio... <a href="https://www.cnblogs.com/streakingBird/p/4178466.html" target="_blank">阅读全文</a>https://www.cnblogs.com/streakingBird/p/4178221.htmlobject c中@property 的使用 - 裸奔的小鸟assign: 对基础的数据类型,比如NSInteger和C数据类型(int,float,char)等copy: 针对NSStringretail: 针对NSObject及其子类nonatomic:单线程,防止在写未完成的时候被另外一个线程读取,造成数据读取错误weak: 它所指向的对象一旦...2014-12-22T06:56:00Z2014-12-22T06:56:00Z裸奔的小鸟https://www.cnblogs.com/streakingBird/【摘要】assign: 对基础的数据类型,比如NSInteger和C数据类型(int,float,char)等copy: 针对NSStringretail: 针对NSObject及其子类nonatomic:单线程,防止在写未完成的时候被另外一个线程读取,造成数据读取错误weak: 它所指向的对象一旦... <a href="https://www.cnblogs.com/streakingBird/p/4178221.html" target="_blank">阅读全文</a>https://www.cnblogs.com/streakingBird/p/4118090.htmlcocoa中获得root权限的几种方法 - 裸奔的小鸟目前我所知道的,在cocoa中获得root权限的方法有3种:1. 通过AuthorizationCopyRights函数2. 在UI上添加一个锁的样子的控件,然后通过开关这个锁来获取root权限3. 直接调用Applescript来以root权限执行脚本其中方法1和2一般用来执行一个shell脚本或...2014-11-24T03:02:00Z2014-11-24T03:02:00Z裸奔的小鸟https://www.cnblogs.com/streakingBird/【摘要】目前我所知道的,在cocoa中获得root权限的方法有3种:1. 通过AuthorizationCopyRights函数2. 在UI上添加一个锁的样子的控件,然后通过开关这个锁来获取root权限3. 直接调用Applescript来以root权限执行脚本其中方法1和2一般用来执行一个shell脚本或... <a href="https://www.cnblogs.com/streakingBird/p/4118090.html" target="_blank">阅读全文</a>https://www.cnblogs.com/streakingBird/p/4103783.htmlcocoa应用程序中NSStatusItem的使用 - 裸奔的小鸟mac上的应用程序除了左上方会有菜单之外,在屏幕的右上方也会有一个图标样的菜单,这个类似于windows上右下角的system tray。本文讲述如何给自己的应用程序添加一个system tray(在mac上应该叫状态栏吧,status item)1. 创建cocoa的application,名字为...2014-11-17T08:08:00Z2014-11-17T08:08:00Z裸奔的小鸟https://www.cnblogs.com/streakingBird/【摘要】mac上的应用程序除了左上方会有菜单之外,在屏幕的右上方也会有一个图标样的菜单,这个类似于windows上右下角的system tray。本文讲述如何给自己的应用程序添加一个system tray(在mac上应该叫状态栏吧,status item)1. 创建cocoa的application,名字为... <a href="https://www.cnblogs.com/streakingBird/p/4103783.html" target="_blank">阅读全文</a>