<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[theShifter的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/theShifter</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; theShifter]]></copyright><item><title><![CDATA[iOS中Block完全详解]]></title><link>https://blog.youkuaiyun.com/theShifter/article/details/105372863</link><guid>https://blog.youkuaiyun.com/theShifter/article/details/105372863</guid><author>theShifter</author><pubDate>Tue, 07 Apr 2020 20:27:28 +0800</pubDate><description><![CDATA[欢迎大家关注我的个人博客:https://darkknightkazuma.github.io
#一、Block基础介绍
##1、概念介绍
Block又称为块或块对象,它是苹果在OSX10.6和iOS4.0中新加入的功能,是C语言层面的特性及功能实现,类似其它语言的闭包(closure)功能.当时苹果正使用LLVM的clang作为C语言的编译器来改进C/OC/C++/OC++等的编译处理,Blo...]]></description><category></category></item><item><title><![CDATA[iOS开发中的MVP架构]]></title><link>https://blog.youkuaiyun.com/theShifter/article/details/81054730</link><guid>https://blog.youkuaiyun.com/theShifter/article/details/81054730</guid><author>theShifter</author><pubDate>Sun, 15 Jul 2018 18:39:52 +0800</pubDate><description><![CDATA[由于最近开发的新项目使用了MVP(Model View Presenter)架构，故在此做一些记录。

目前初步的理解MVP为对MVC的进一步的解耦，尤其是对C层进行了很好的瘦身，将任务分摊到了M和P层。

MVP的各个层的作用简单总结一下：

Model：该层和MVC中的Model层相似，但是多了对数据的存储和网络请求的操作。MPV中将网络请求的执行和数据库的操作都放在了Model层，也就是说M...]]></description><category></category></item><item><title><![CDATA[iOS关于property中的atomic和nonatomic]]></title><link>https://blog.youkuaiyun.com/theShifter/article/details/79867332</link><guid>https://blog.youkuaiyun.com/theShifter/article/details/79867332</guid><author>theShifter</author><pubDate>Mon, 09 Apr 2018 16:24:52 +0800</pubDate><description><![CDATA[首先这两个属性特质是为了处理多线程安全问题，那么什么是多线程安全，多线程安全就是多个线程访问同一段代码、指针区域、内存区域的时候出现的异常不安全情况。首先，我们要知道内存的访问时串行的，并不会导致内存数据的错乱或者应用的crash，以及读写的内存长度小于等于地址总线的长度，那么读写的操作是原子的，一次完成。例如BOOL，int，long在64位系统下的单次读写都是原子操作，无需担心线程安全问题。那...]]></description><category></category></item><item><title><![CDATA[iOS手动分配线程栈空间]]></title><link>https://blog.youkuaiyun.com/theShifter/article/details/79248020</link><guid>https://blog.youkuaiyun.com/theShifter/article/details/79248020</guid><author>theShifter</author><pubDate>Sat, 03 Feb 2018 16:52:47 +0800</pubDate><description><![CDATA[+(NSThread *)creatThreadWIthTarget:(id)target selector:(SEL)selector object:(id)argument stackSize:(NSUInteger)size
 {//栈空间的最小值为16kb，且必须为4k倍数

    if ((size % 4096) !=
0) {//不是4kb的倍数则返回nil;

   ]]></description><category></category></item><item><title><![CDATA[iOS耗电优化]]></title><link>https://blog.youkuaiyun.com/theShifter/article/details/79238417</link><guid>https://blog.youkuaiyun.com/theShifter/article/details/79238417</guid><author>theShifter</author><pubDate>Fri, 02 Feb 2018 17:29:38 +0800</pubDate><description><![CDATA[耗电优化代码，根据需要开启关闭一些耗电操作

- (BOOL)shouldproceesdWithMinLevel:(NSUInteger)minLevel{//minLevel1～100

    UIDevice *device = [UIDevicecurrentDevice];

    device.batteryMonitoringEnabled =YES;//开启电量监控]]></description><category></category></item><item><title><![CDATA[unsafe_unretained和weak弱引用避免保留环(循环引用)区别]]></title><link>https://blog.youkuaiyun.com/theShifter/article/details/78815349</link><guid>https://blog.youkuaiyun.com/theShifter/article/details/78815349</guid><author>theShifter</author><pubDate>Fri, 15 Dec 2017 17:51:22 +0800</pubDate><description><![CDATA[unsafe_unretained和weak都可以作为属性特质避免循环引用，他们的区别是：unsafe_unretained所修饰属性是不安全的，而且不归此事例拥有，如果系统已经把属性所指的那个对象回收，那么在回收的对象上调用方法会导致程序崩溃，而weak所修饰属性则会指向nil，这样就不会导致程序崩溃。]]></description><category></category></item></channel></rss>