<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>网络APP实验室 &#124; NET APP LAB &#187; MAC APP</title>
	<atom:link href="http://www.netapplab.com/?cat=8&#038;feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.netapplab.com</link>
	<description>专注APP虚拟化及云计算</description>
	<lastBuildDate>Wed, 30 Jan 2013 06:18:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Objective-C中回调的写法</title>
		<link>http://www.netapplab.com/?p=125</link>
		<comments>http://www.netapplab.com/?p=125#comments</comments>
		<pubDate>Mon, 14 Nov 2011 04:13:42 +0000</pubDate>
		<dc:creator>admin_yan</dc:creator>
				<category><![CDATA[iPhone APP]]></category>
		<category><![CDATA[MAC APP]]></category>

		<guid isPermaLink="false">http://www.netapplab.com/?p=125</guid>
		<description><![CDATA[在ObjectiveC中，所有的回调都是通过Delegate实现的，例子如下: 并且，实际上更加标准的写法应该是用协议的概念来实现，具体的方法是在需要回调函数来处理的类中增加一个Protocol，在这个Protocol中定义回调的方法，同时在类的成员中增加一个Protocol类型变量作为委托的对象。 激发委托的时候，通过调用类的Protocol成员的回调方法来实现。具体的写法举例在这里省略。]]></description>
			<content:encoded><![CDATA[<p>在ObjectiveC中，所有的回调都是通过Delegate实现的，例子如下:</p>
<pre class="brush: objc; title: ; notranslate">
/// Header File
@interface MyClass : NSObject {
    id delegate;
}
- (void)setDelegate:(id)delegate;
- (void)doSomething;
@end

@interface NSObject(MyDelegateMethods)
- (void)myClassWillDoSomething:(MyClass *)myClass;
- (void)myClassDidDoSomething:(MyClass *)myClass;
@end

/// Message (.m) File
@implementation MyClass
- (void)setDelegate:(id)aDelegate {
    delegate = aDelegate; /// Not retained
}

- (void)doSomething {
    [delegate myClassWillDoSomething:self];
    /* DO SOMETHING */
    [delegate myClassDidDoSomething:self];
}
@end
</pre>
<p>并且，实际上更加标准的写法应该是用协议的概念来实现，具体的方法是在需要回调函数来处理的类中增加一个Protocol，在这个Protocol中定义回调的方法，同时在类的成员中增加一个Protocol类型变量作为委托的对象。</p>
<p>激发委托的时候，通过调用类的Protocol成员的回调方法来实现。具体的写法举例在这里省略。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.netapplab.com/?feed=rss2&#038;p=125</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ToDO类 APP Remember</title>
		<link>http://www.netapplab.com/?p=91</link>
		<comments>http://www.netapplab.com/?p=91#comments</comments>
		<pubDate>Sat, 12 Nov 2011 12:30:11 +0000</pubDate>
		<dc:creator>admin_yan</dc:creator>
				<category><![CDATA[MAC APP]]></category>

		<guid isPermaLink="false">http://www.netapplab.com/?p=91</guid>
		<description><![CDATA[一直以来都希望能有一个好用Todo类的软件，iCal上的确实不够好，用起来怎么都觉得别扭 今天碰到了这个还不错，叫做Remember 怎么说缩进了状态栏让我觉得非常清爽 下面是两张截图，需要就赶紧去下载Remember吧]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.netapplab.com/wp-content/uploads/2011/11/remember_128x128.png" alt="" title="remember_128x128" width="128" height="128" class="alignleft size-full wp-image-92" />一直以来都希望能有一个好用Todo类的软件，iCal上的确实不够好，用起来怎么都觉得别扭</p>
<p>今天碰到了这个还不错，叫做<a href="http://lightheadsw.com/">Remember</a></p>
<p>怎么说缩进了状态栏让我觉得非常清爽</p>
<p>下面是两张截图，需要就赶紧去下载<a href="http://lightheadsw.com/">Remember</a>吧 <img src='http://www.netapplab.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><img src="http://www.netapplab.com/wp-content/uploads/2011/11/6.png" alt="" title="6" width="191" height="182" class="alignleft size-full wp-image-93" /></p>
<p><img src="http://www.netapplab.com/wp-content/uploads/2011/11/5-300x182.png" alt="" title="5" width="300" height="182" class="alignleft size-medium wp-image-94" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.netapplab.com/?feed=rss2&#038;p=91</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
