<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[lushuner的专栏]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/lushuner</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; lushuner]]></copyright><item><title><![CDATA[MemoryChannel源码分析]]></title><link>https://blog.csdn.net/lushuner/article/details/50245513</link><guid>https://blog.csdn.net/lushuner/article/details/50245513</guid><author>lushuner</author><pubDate>Thu, 10 Dec 2015 09:45:35 +0800</pubDate><description><![CDATA[首先是一张对MemoryChannel源码分析后画出的一张图： 
 
MemoryChannel类中有个内部类，MemoryTransaction。 
它们的继承结构如下： 
 
0. MemoryChannel中的queue是真正存放内存通道event的队列。 
1. batchSize是针对Source和Sink提出的一个概念，它用来限制source和sink对event批量处理的。]]></description><category></category></item><item><title><![CDATA[使用CocoaPods配置第三方类库]]></title><link>https://blog.csdn.net/lushuner/article/details/49333421</link><guid>https://blog.csdn.net/lushuner/article/details/49333421</guid><author>lushuner</author><pubDate>Thu, 22 Oct 2015 14:44:54 +0800</pubDate><description><![CDATA[转自：http://www.it165.net/pro/html/201402/9213.html#printSource前言在iOS项目中使用第三方类库可以说是非常常见的事，但是要正确地配置他们有时候是非常繁琐的事情，幸运的是CocoaPods是一个很好的解决方案。什么是CocoaPodsCocoaPods是OS X和iOS下的一个第三类库管理工具，通过CocoaPods工具我们可以为项目添加被称]]></description><category></category></item><item><title><![CDATA[在Struts2中使用ValueStack、ActionContext、ServletContext、request、session等]]></title><link>https://blog.csdn.net/lushuner/article/details/49153383</link><guid>https://blog.csdn.net/lushuner/article/details/49153383</guid><author>lushuner</author><pubDate>Thu, 15 Oct 2015 15:41:14 +0800</pubDate><description><![CDATA[转自以下链接： 
http://newton449.iteye.com/blog/1423863笔者不知道该用哪个词来形容ValueStack、ActionContext等可以在Struts2中用来存放数据的类。这些类使用的范围不同，得到的方法也不同，下面就来一一介绍。声明：本文参考Struts2版本为2.3.1.2，内容仅供参考，限于笔者水平有限，难免有所疏漏，望您能友善指出。本文发表于ITEYE]]></description><category></category></item><item><title><![CDATA[两张网卡同时上内外网解决方法]]></title><link>https://blog.csdn.net/lushuner/article/details/48652963</link><guid>https://blog.csdn.net/lushuner/article/details/48652963</guid><author>lushuner</author><pubDate>Tue, 22 Sep 2015 13:23:42 +0800</pubDate><description><![CDATA[网上搜到的方法都是添加永久路由，比如内网网段192.168.10.0，外网网段192.168.50.0，然后在命令窗口执行下面语句：route delete 0.0.0.0
route -p add 0.0.0.0 mask 0.0.0.0 192.168.50.1
route -p add 192.168.10.0 mask 255.255.255.0 192.168.10.1网上搜到的方法都是这]]></description><category></category></item><item><title><![CDATA[iOS单例模式简单实现]]></title><link>https://blog.csdn.net/lushuner/article/details/48495271</link><guid>https://blog.csdn.net/lushuner/article/details/48495271</guid><author>lushuner</author><pubDate>Wed, 16 Sep 2015 15:48:35 +0800</pubDate><description><![CDATA[1. 单例模式介绍内存中只有一个对象实例2. 实现思路实现单例模式 
ARC模式： 
            1.遵循协议，重写copyWithZone方法，返回self，防止通过copy来产生新的实例对象。 
            2.重写allocWithZone方法。代码如下。防止通过alloc来生成新的实例对象。 
MRC模式： 
            1.同ARC模式]]></description><category></category></item><item><title><![CDATA[iOS的copy概念详解]]></title><link>https://blog.csdn.net/lushuner/article/details/48494985</link><guid>https://blog.csdn.net/lushuner/article/details/48494985</guid><author>lushuner</author><pubDate>Wed, 16 Sep 2015 15:35:54 +0800</pubDate><description><![CDATA[1. copy概念浅复制与深复制 
copy即复制，有浅复制和深复制两种。浅复制即引用复制，只拷贝对象的引用，不分配新的内存空间，深复制即对象拷贝，会创建一个对象的副本，分配新的内存空间，与原对象独立。 
深复制（深拷贝，内容拷贝，deep copy） 
源对象和副本对象是不同的两个对象 
源对象引用计数器不变, 副本对象计数器为1（因为是新产生的） 
本质是：产生了新的对象浅复制（浅拷贝，指针拷贝]]></description><category></category></item><item><title><![CDATA[iOS集合对象的内存管理]]></title><link>https://blog.csdn.net/lushuner/article/details/48494619</link><guid>https://blog.csdn.net/lushuner/article/details/48494619</guid><author>lushuner</author><pubDate>Wed, 16 Sep 2015 15:19:28 +0800</pubDate><description><![CDATA[1. 概念综述Person *p, NSMutableArray *arr 
    数组中存放一个对象，实际上存的是对这个对象的引用，使该对象的retainCount+1，数组中加入两次该对象，则该对象的引用计数加2，当从数组中移除一次，则释放一个引用，当执行[arr release]时，会向数组中的每个对象发送一次release消息。总结一下，数组中存放对象存的是对该对象的引用。 
2. 示例代]]></description><category></category></item><item><title><![CDATA[iOS中NSDate和NSCalendar的简单用法]]></title><link>https://blog.csdn.net/lushuner/article/details/48494509</link><guid>https://blog.csdn.net/lushuner/article/details/48494509</guid><author>lushuner</author><pubDate>Wed, 16 Sep 2015 15:13:54 +0800</pubDate><description><![CDATA[简单，上代码：
#import <Foundation/Foundation.h>
void print(NSObject *object){
    NSLog(@"%@",object);
}void test(){
    NSLog(@"...");
}
void printTime(NSDate *date){
    NSDateFormatter *df = [NSDateFormat]]></description><category></category></item><item><title><![CDATA[iOS中NSNumber和NSValue的简单用法]]></title><link>https://blog.csdn.net/lushuner/article/details/48494493</link><guid>https://blog.csdn.net/lushuner/article/details/48494493</guid><author>lushuner</author><pubDate>Wed, 16 Sep 2015 15:13:03 +0800</pubDate><description><![CDATA[比较简单，直接上代码：
#import <Foundation/Foundation.h>typedef struct {
    int year;
    int month;
    int day;
}MyDate;int main(int argc, const char * argv[]) {
    @autoreleasepool {
        // insert code h]]></description><category></category></item><item><title><![CDATA[iOS中NSFileManager的简单用法]]></title><link>https://blog.csdn.net/lushuner/article/details/48494383</link><guid>https://blog.csdn.net/lushuner/article/details/48494383</guid><author>lushuner</author><pubDate>Wed, 16 Sep 2015 15:06:49 +0800</pubDate><description><![CDATA[示例代码#import <Foundation/Foundation.h>int main(int argc, const char * argv[]) {
    @autoreleasepool {
        // insert code here...
        NSFileManager *fm = [NSFileManager defaultManager];
//]]></description><category></category></item><item><title><![CDATA[iOS中协议（Protocol）的简单用法]]></title><link>https://blog.csdn.net/lushuner/article/details/48494271</link><guid>https://blog.csdn.net/lushuner/article/details/48494271</guid><author>lushuner</author><pubDate>Wed, 16 Sep 2015 15:04:24 +0800</pubDate><description><![CDATA[1. 基本概念一个Protocol是由一系列的方法声明组成的。任何类只要遵守了Protocol, 就相当于拥有了Protocol的所有方法声明。 
协议中有2个关键字可以控制方法是否要实现(默认是@required，在大多数情况下，用途在于程序员之间的交流) 
@required：这种属性的方法必须要实现（若不实现，编译器会发出警告） 
@optional：这种属性的方法不一定要实现。2. 示例代码]]></description><category></category></item><item><title><![CDATA[iOS中Block的简单用法]]></title><link>https://blog.csdn.net/lushuner/article/details/48493453</link><guid>https://blog.csdn.net/lushuner/article/details/48493453</guid><author>lushuner</author><pubDate>Wed, 16 Sep 2015 14:20:43 +0800</pubDate><description><![CDATA[Block作为参数，传递执行语句
void Work(void (^dothings)()){
    NSLog(@"eating...");
    dothings();
    NSLog(@"go home...");
}
void WorkDay(int workday){
    void (^workThing)();
    switch (workday) {
        c]]></description><category></category></item><item><title><![CDATA[iOS分类（Category）和类扩展（Extension）的简单用法]]></title><link>https://blog.csdn.net/lushuner/article/details/48371623</link><guid>https://blog.csdn.net/lushuner/article/details/48371623</guid><author>lushuner</author><pubDate>Fri, 11 Sep 2015 13:35:12 +0800</pubDate><description><![CDATA[一、分类1.1 分类简介•   分类只能增加方法, 不能增加成员变量、@property(可能编译不报错，但是运行有问题) 
•   分类可以访问原来类中的成员变量 
•   如果分类和原来类出现同名的方法, 优先调用分类中的方法, 原来类中的方法会被忽略 
•   方法调用的优先级(从高到低) 
➢   分类(最后参与编译的分类优先)，只要有分类就优先调用分类，不考虑与主类的编译顺序。 
➢]]></description><category></category></item><item><title><![CDATA[ARC内存管理]]></title><link>https://blog.csdn.net/lushuner/article/details/48371537</link><guid>https://blog.csdn.net/lushuner/article/details/48371537</guid><author>lushuner</author><pubDate>Fri, 11 Sep 2015 13:25:20 +0800</pubDate><description><![CDATA[示例代码Dog.h
#import <Foundation/Foundation.h>
@class Person;
@interface Dog : NSObject
@property (nonatomic, strong) Person *owner;
@endDog.m
#import "Dog.h"
@implementation Dog
- (void)dealloc{
    NSLo]]></description><category></category></item><item><title><![CDATA[循环retain导致内存泄露]]></title><link>https://blog.csdn.net/lushuner/article/details/48341131</link><guid>https://blog.csdn.net/lushuner/article/details/48341131</guid><author>lushuner</author><pubDate>Thu, 10 Sep 2015 11:38:43 +0800</pubDate><description><![CDATA[问题描述Dog.h#import <Foundation/Foundation.h>
@class Person;
@interface Dog : NSObject
@property (nonatomic,retain) Person *owner;
@endPerson.h
#import <Foundation/Foundation.h>
@class Dog;
@interface Per]]></description><category></category></item><item><title><![CDATA[@property参数  retain assign copy readonly readwrite atomic nonatomic]]></title><link>https://blog.csdn.net/lushuner/article/details/48339913</link><guid>https://blog.csdn.net/lushuner/article/details/48339913</guid><author>lushuner</author><pubDate>Thu, 10 Sep 2015 10:36:42 +0800</pubDate><description><![CDATA[1. 苹果官方规定的内存管理原则创建谁release : 如果你通过alloc、new或copy、mutableCopy来创建一个对象，那么你必须调用release或autorelease。  
谁retain谁release :只要你调用了retain，就必须调用一次release总结一下就是  
有加就有减 ，曾经让对象的计数器+1，就必须在最后让对象计数器-1  
在自己负责的区域内（某个方法]]></description><category></category></item><item><title><![CDATA[iOS中属性与成员变量的区别]]></title><link>https://blog.csdn.net/lushuner/article/details/48315563</link><guid>https://blog.csdn.net/lushuner/article/details/48315563</guid><author>lushuner</author><pubDate>Wed, 09 Sep 2015 14:22:25 +0800</pubDate><description><![CDATA[转自：http://www.cnblogs.com/ygm900/p/3660364.html一、类Class中的属性property　　在ios第一版中，我们为输出口同时声明了属性和底层实例变量，那时，属性是oc语言的一个新的机制，并且要求你必须声明与之对应的实例变量，例如：@interface MyViewController :UIViewController
{
    UIButton *]]></description><category></category></item><item><title><![CDATA[iOS中nil，Nil，NULL，NSNull的区别]]></title><link>https://blog.csdn.net/lushuner/article/details/48314005</link><guid>https://blog.csdn.net/lushuner/article/details/48314005</guid><author>lushuner</author><pubDate>Wed, 09 Sep 2015 12:01:22 +0800</pubDate><description><![CDATA[nil是给对象复制为空，Nil是给一个类对象复制为空。 
NULL是C语言中的通用指针，就是0. 
 
NSNull 是一个对象，用在不能使用nil的场合。 
比如数组，OC中的数组可以存任何对象，但是不能存基本类型的，如果在数组中放nil就出问题，这时候就应该放NSNull.]]></description><category></category></item><item><title><![CDATA[iOS的KVC编程示例]]></title><link>https://blog.csdn.net/lushuner/article/details/48265875</link><guid>https://blog.csdn.net/lushuner/article/details/48265875</guid><author>lushuner</author><pubDate>Mon, 07 Sep 2015 15:11:02 +0800</pubDate><description><![CDATA[看了传智播客视频简单总结一下：
首先是一个Dog对象：
#import 

@interface Dog : NSObject

@property (nonatomic,copy) NSString *name;

@end

然后是一个Person对象：
#import 
#import "Dog.h"
@interface Person : NSObject

@property (]]></description><category></category></item><item><title><![CDATA[iOS通知使用示例]]></title><link>https://blog.csdn.net/lushuner/article/details/48262517</link><guid>https://blog.csdn.net/lushuner/article/details/48262517</guid><author>lushuner</author><pubDate>Mon, 07 Sep 2015 10:42:18 +0800</pubDate><description><![CDATA[通知机制主要用到两个类：NSNotificationCenter和NSNotification。sender1 和 listener1 分别是自定义的通知发布者和通知监听者，在通知监听者中需要有监听通知的方法。
NSNotificationCenter 实例化一个通知中心类，然后添加通知监听者，并制定监听者所使用的方法。 通知发布者通过NSNotificationCenter的类来发布通知： 移除通]]></description><category></category></item></channel></rss>