﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-一点一滴，编程人生-随笔分类-iphone</title><link>http://www.blogjava.net/writegull/category/50723.html</link><description /><language>zh-cn</language><lastBuildDate>Tue, 24 Dec 2013 18:39:22 GMT</lastBuildDate><pubDate>Tue, 24 Dec 2013 18:39:22 GMT</pubDate><ttl>60</ttl><item><title>禁用UIButton且不会使按钮变得半透明</title><link>http://www.blogjava.net/writegull/archive/2013/12/23/407906.html</link><dc:creator>writegull</dc:creator><author>writegull</author><pubDate>Mon, 23 Dec 2013 02:29:00 GMT</pubDate><guid>http://www.blogjava.net/writegull/archive/2013/12/23/407906.html</guid><wfw:comment>http://www.blogjava.net/writegull/comments/407906.html</wfw:comment><comments>http://www.blogjava.net/writegull/archive/2013/12/23/407906.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/writegull/comments/commentRss/407906.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/writegull/services/trackbacks/407906.html</trackback:ping><description><![CDATA[<span style="color: #454545; font-family: tahoma, helvetica, arial; font-size: 14.399999618530273px; line-height: 16.799999237060547px; background-color: #ffffff;">有时候需要手动地去禁用一个uibutton,使用button.enabled = NO的时候虽然能够达到目的但也会带来副作用，那就是按钮变的半透明了。有时候应用不需要这种副作用，可以尝试使用button.userInteractionEnabled = NO来达到这个目的，在禁用按钮的同时也不会使得按钮变得半透明。</span><img src ="http://www.blogjava.net/writegull/aggbug/407906.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/writegull/" target="_blank">writegull</a> 2013-12-23 10:29 <a href="http://www.blogjava.net/writegull/archive/2013/12/23/407906.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>MFMessageComposeViewController或MFMailComposeViewController 在IOS6下不显示键盘的问题</title><link>http://www.blogjava.net/writegull/archive/2012/10/30/390482.html</link><dc:creator>writegull</dc:creator><author>writegull</author><pubDate>Tue, 30 Oct 2012 13:08:00 GMT</pubDate><guid>http://www.blogjava.net/writegull/archive/2012/10/30/390482.html</guid><wfw:comment>http://www.blogjava.net/writegull/comments/390482.html</wfw:comment><comments>http://www.blogjava.net/writegull/archive/2012/10/30/390482.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/writegull/comments/commentRss/390482.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/writegull/services/trackbacks/390482.html</trackback:ping><description><![CDATA[这个问题似乎只有在手动改变系统状态栏级别的情况才会出现<br /><br />例如：self.window.windowLevel = UIWindowLevelStatusBar+1;<br /><br />这样设置的话相当于影响了弹出短信或邮件控制器页面window的级别，所以造成不显示键盘问题（不过此问题在ios6以下没有）<br /><br />解决方法：在当前视图控制器中加入下面的代码，即可解决<br /><p>- (void) viewDidAppear:(BOOL)animated {</p> <p>&nbsp; &nbsp; [super viewDidAppear:animated];</p> <p>&nbsp; &nbsp; self.window.windowLevel = UIWindowLevelNormal;</p> <p>}</p><img src ="http://www.blogjava.net/writegull/aggbug/390482.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/writegull/" target="_blank">writegull</a> 2012-10-30 21:08 <a href="http://www.blogjava.net/writegull/archive/2012/10/30/390482.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>xcode 4 制作静态库详解</title><link>http://www.blogjava.net/writegull/archive/2012/10/09/389260.html</link><dc:creator>writegull</dc:creator><author>writegull</author><pubDate>Tue, 09 Oct 2012 10:14:00 GMT</pubDate><guid>http://www.blogjava.net/writegull/archive/2012/10/09/389260.html</guid><wfw:comment>http://www.blogjava.net/writegull/comments/389260.html</wfw:comment><comments>http://www.blogjava.net/writegull/archive/2012/10/09/389260.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/writegull/comments/commentRss/389260.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/writegull/services/trackbacks/389260.html</trackback:ping><description><![CDATA[<p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; ">原文地址:<a href="http://blog.csdn.net/pjk1129/article/details/7255163">http://blog.csdn.net/pjk1129/article/details/7255163</a><br /><br />最近在做Apple的IOS开发，有开发静态库的需求，本身IOS的开发，只允许静态库或者Framework。在Xcode上没有找到允许编译，如同Android上的*.so和Win32上的dll这样的说法。不过Framework这样的框架，估计也是类似动态库的实现，不过没有具体研究过，后续继续深入研究。</p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; ">我这个文档的静态库的开发是基于Xcode4.2和iOS SDK5.0编写的。Xcode4跟之前的Xcode3还是有不少的差别的。<br style="line-height: normal; " /><br style="line-height: normal; " />下面就简单写一个静态库和一个调用静态库的例子。<br style="line-height: normal; " /><br style="line-height: normal; " />静态库的编写：<br style="line-height: normal; " /><br style="line-height: normal; " /><span style="font-size: 24px; ">1.静态库工程的建立：</span></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; ">Xcode New一个新的project，选择IOS下面的Framework&amp;Library，下面有一个Cocoa Touch Static Library。直接next去建立一个<span style="font-family: Menlo; color: #ff3f47; ">Print</span>这样的工程。</p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><img src="http://hi.csdn.net/attachment/201202/13/0_1329118362Vtyi.gif" alt="" style="border: none; " /><br /></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><span style="font-size: 24px; ">2.工程建立</span></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; ">我们添加很简单的"- (void)printA;"和"+&nbsp;(void)printB;"的方法，这个方法的实现也是很简单的，在*.m文件中的实现就是一个"NSLog（@&#8220;&#8221;);"这样我们编译出来的libstaticlib就可以被其他的IOS工程进行调用了。这块注意一下，目前我们的<span style="color: #ff6666; ">Print-&gt;iOS Device</span><br /></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><span style="color: #ff6666; "><img src="http://hi.csdn.net/attachment/201202/13/0_13291189031ll1.gif" alt="" style="border: none; " /><br /></span></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><span style="color: #ff6666; "><br /></span></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><span style="font-size: 24px; ">3.编译前准备</span></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; ">这里分release与debug版本，需要设置一下</p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><img src="http://hi.csdn.net/attachment/201202/13/0_1329119666ASG0.gif" alt="" style="border: none; " /><br /></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><span style="font-size: 24px; ">4.OK，编译</span></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; ">我们可以在Products下面找到我们编译生成的libstaticlib.a这个文件。<br /></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; ">注意未编译前为红色：左 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 编译后为黑色：&nbsp;右<br /></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><img src="http://hi.csdn.net/attachment/201202/13/0_13291197545597.gif" alt="" style="border: none; " />&nbsp; &nbsp; &nbsp; &nbsp;<img src="http://hi.csdn.net/attachment/201202/13/0_1329119760thsk.gif" alt="" style="border: none; " /><br /></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "></p><p style="color: #333333; font-family: Arial; background-color: #ffffff; line-height: normal; "><span style="font-size: 24px; ">5.ok</span></p><p style="color: #333333; font-family: Arial; background-color: #ffffff; line-height: normal; ">在右边&nbsp;这个文件上右键Open In Finder。这时候我们打开了一个文件夹，里面有一个<span style="color: #6652cc; ">libPrint.a</span>。后面我们继续编写一个调用这个<span style="color: #6652cc; ">libPrint.a</span>的App。但是这个App在编译时候会出错，通过这个错误的解决，说明Xcode的一些编译相关的东西。这里，我们在command下面根据路径找到这个文件，用这个非常重要的命令查看一下这个lib的信息！</p><p style="color: #333333; font-family: Arial; background-color: #ffffff; line-height: normal; ">打开终端写入如下命令：<span style="color: #ff0000; ">这是什么？这就是所在的路径&nbsp;</span></p><p style="color: #333333; font-family: Arial; background-color: #ffffff; line-height: normal; ">以下均是在自己的mac上的路径。你需要将<span style="color: #0055ff; ">/Users/pjk1129/Library/Developer/Xcode/DerivedData/Print-dgfkluumuexoxhcapzidtsmdgqcj/Build/Products/&nbsp;</span><span style="color: #ff0000; "><span style="color: #000000; ">替换成你的路径。</span></span></p><p style="color: #333333; font-family: Arial; background-color: #ffffff; line-height: normal; "><span style="color: #0055ff; ">cd&nbsp;</span>/Users/pjk1129/Library/Developer/Xcode/DerivedData/Print-dgfkluumuexoxhcapzidtsmdgqcj/Build/Products/&nbsp;&nbsp;</p><p style="color: #333333; font-family: Arial; background-color: #ffffff; line-height: normal; ">我们手动打开这个路径：可以看到如下信息：Release-iphoneos</p><p style="color: #333333; font-family: Arial; background-color: #ffffff; line-height: normal; "><br /></p><p style="color: #333333; font-family: Arial; background-color: #ffffff; line-height: normal; "><span style="color: #6652cc; ">这个是给真机用的，那我们要给模拟器和真机封装的静态库应该都能用才好。这个下面介绍！！！！！ &nbsp;</span><br /></p><p style="color: #333333; font-family: Arial; background-color: #ffffff; line-height: normal; "><span style="color: #6652cc; "><img src="http://hi.csdn.net/attachment/201202/13/0_1329120126mZUU.gif" alt="" style="border: none; " /><br /></span></p><p style="color: #333333; font-family: Arial; background-color: #ffffff; line-height: normal; "></p><p style="font-family: Arial; background-color: #ffffff; color: #6652cc; line-height: normal; ">然后再在终端&nbsp;打开这个文件：<span style="color: #ff0000; ">cd&nbsp;/Users/user/Library/Developer/Xcode/DerivedData/UItab-dbvoszbzpavyglaboxgflvrnzfce/Build/Products/Debug-iphoneos</span></p><p style="font-family: Arial; background-color: #ffffff; color: #6652cc; line-height: normal; ">命令是：lipo -info libPrint.a，可以看到显示的结果是：Arch是&nbsp; Arm7。下面我会具体介绍一下。</p><p style="font-family: Arial; background-color: #ffffff; color: #6652cc; line-height: normal; "><img src="http://hi.csdn.net/attachment/201202/13/0_13291203125yEc.gif" alt="" style="border: none; " /><br /></p><p style="font-family: Arial; background-color: #ffffff; color: #6652cc; line-height: normal; "><span style="font-size: 24px; ">6.建立一个调用这个libPrint.a的应用</span></p><p style="font-family: Arial; background-color: #ffffff; color: #6652cc; line-height: normal; ">应用就很简单了，我们添加刚才libPrint.a的*.h文件。&nbsp;然后在这个工程的Build Phases的Link Binary With Library里面添加我们刚才拷贝出来的那个libPrint.a。<br /></p><p style="font-family: Arial; background-color: #ffffff; color: #6652cc; line-height: normal; "><img src="http://hi.csdn.net/attachment/201202/13/0_1329120524m42u.gif" alt="" style="border: none; " /><br /></p><p style="font-family: Arial; background-color: #ffffff; color: #6652cc; line-height: normal; "><br /></p><p style="font-family: Arial; background-color: #ffffff; color: #6652cc; line-height: normal; "><span style="font-size: 24px; ">7.插入了h和a文件后</span></p><p style="font-family: Arial; background-color: #ffffff; color: #6652cc; line-height: normal; ">我们就可以在control里面调用这个libPrint.a&nbsp;函数了。<br /></p><p style="color: #333333; background-color: #ffffff; margin: 0px; line-height: normal; font-family: Menlo; ">#import "AstroDiskAppDelegate.h"</p><span style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; ">#import "Print.h"</span><p style="color: #333333; font-family: Arial; background-color: #ffffff; line-height: normal; "></p><p style="color: #333333; background-color: #ffffff; margin: 0px; line-height: normal; font-family: Menlo; min-height: 16px; "><br /></p><p style="color: #333333; background-color: #ffffff; margin: 0px; line-height: normal; font-family: Menlo; ">@implementation AstroDiskAppDelegate</p><p style="color: #333333; background-color: #ffffff; margin: 0px; line-height: normal; font-family: Menlo; min-height: 16px; "><br /></p><p style="color: #333333; background-color: #ffffff; margin: 0px; line-height: normal; font-family: Menlo; ">@synthesize window = _window;</p><p style="color: #333333; background-color: #ffffff; margin: 0px; line-height: normal; font-family: Menlo; "><br /></p><p style="color: #333333; background-color: #ffffff; margin: 0px; line-height: normal; font-family: Menlo; ">- (void)dealloc</p><p style="color: #333333; background-color: #ffffff; margin: 0px; line-height: normal; font-family: Menlo; ">{</p><p style="color: #333333; background-color: #ffffff; margin: 0px; line-height: normal; font-family: Menlo; ">&nbsp; &nbsp; [_window release];</p><p style="color: #333333; background-color: #ffffff; margin: 0px; line-height: normal; font-family: Menlo; ">&nbsp; &nbsp; [_viewController release];</p><p style="color: #333333; background-color: #ffffff; margin: 0px; line-height: normal; font-family: Menlo; ">&nbsp; &nbsp; [super dealloc];</p><p style="color: #333333; background-color: #ffffff; margin: 0px; line-height: normal; font-family: Menlo; ">}</p><p style="color: #333333; background-color: #ffffff; margin: 0px; line-height: normal; font-family: Menlo; min-height: 16px; "><br /></p><p style="color: #333333; background-color: #ffffff; margin: 0px; line-height: normal; font-family: Menlo; ">- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions</p><p style="color: #333333; background-color: #ffffff; margin: 0px; line-height: normal; font-family: Menlo; ">{</p><p style="color: #333333; background-color: #ffffff; margin: 0px; line-height: normal; font-family: Menlo; min-height: 16px; ">&nbsp;&nbsp; &nbsp;</p><p style="color: #333333; background-color: #ffffff; margin: 0px; line-height: normal; font-family: Menlo; ">&nbsp; &nbsp; //<span style="font-family: 'Heiti SC Light'; ">调用</span>libPrint.a</p><p style="color: #333333; background-color: #ffffff; margin: 0px; line-height: normal; font-family: Menlo; ">&nbsp; &nbsp; [Print printB];</p><p style="color: #333333; background-color: #ffffff; margin: 0px; line-height: normal; font-family: Menlo; ">&nbsp; &nbsp; Print&nbsp; *print = [[[Print alloc] init] autorelease];</p><p style="color: #333333; background-color: #ffffff; margin: 0px; line-height: normal; font-family: Menlo; ">&nbsp; &nbsp; [print printA];</p><p style="color: #333333; background-color: #ffffff; margin: 0px; line-height: normal; font-family: Menlo; min-height: 16px; "><br /></p><p style="color: #333333; background-color: #ffffff; margin: 0px; line-height: normal; font-family: Menlo; ">&nbsp; &nbsp; self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];</p><p style="color: #333333; background-color: #ffffff; margin: 0px; line-height: normal; font-family: Menlo; ">&nbsp; &nbsp; [self.window makeKeyAndVisible];</p><p style="color: #333333; background-color: #ffffff; margin: 0px; line-height: normal; font-family: Menlo; ">&nbsp; &nbsp; return YES;</p><p style="color: #333333; background-color: #ffffff; margin: 0px; line-height: normal; font-family: Menlo; ">}</p><div style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "></div><br style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; " /><p style="color: #333333; font-family: Arial; background-color: #ffffff; line-height: normal; "><span style="font-size: 24px; "><span style="color: #6652cc; ">8.OK，编译运行这个应用程序。</span></span></p><p style="color: #333333; font-family: Arial; background-color: #ffffff; line-height: normal; "><span style="color: #6652cc; ">编译出现错误了。这个就是这篇文档的关键了。主要就是为了介绍编译静态库相关的东西。<br /></span></p><p style="color: #333333; font-family: Arial; background-color: #ffffff; line-height: normal; "><span style="color: #6652cc; "><img src="http://hi.csdn.net/attachment/201202/13/0_1329120855M0XV.gif" alt="" style="border: none; " /><br /></span></p><p style="color: #333333; font-family: Arial; background-color: #ffffff; line-height: normal; "><span style="color: #6652cc; "><br /></span></p><p style="color: #333333; font-family: Arial; background-color: #ffffff; line-height: normal; "><span style="font-size: 24px; "><span style="color: #6652cc; ">9.可以看到undefine symbols for architecture i386这样的错误。</span></span></p><p style="color: #333333; font-family: Arial; background-color: #ffffff; line-height: normal; "><span style="color: #6652cc; ">其实这个错误原因很简单，就是因为，我们用错了编译出来的libUITab.a&nbsp;lib，在模拟器里面，我们需要的是基于i386构架编译的static lib，但是这个a文件，大家还记得前面说的arm6 arm7构架的么。这个a其实是在iphone这个arm构架上运行的代码。其实show in finder指向的是一个ios device的库，并不是i386模拟器下的库。那如何编译i386的库呢？<span style="color: #0055ff; ">看见第二张图片的Print&gt;IOS Device了么</span>？我们将这个iOS Device修改成iPhone5.0&nbsp;Simulator。在进行编译，这样就可以编译出i386下面的库。这个时候我们show in finder打开的文件夹还是ios device下的库。我们最好自己去那个目录下看一下。这里我们用command去查看了一下目录情况，如下：可以看到一个iphoneos的目录和一个simulator的目录。<br /></span></p><p style="color: #333333; font-family: Arial; background-color: #ffffff; line-height: normal; "><span style="color: #6652cc; "><br /></span></p><p style="color: #333333; font-family: Arial; background-color: #ffffff; line-height: normal; "><span style="color: #6652cc; ">然后我们再看看这个目录与第4条所示的目录有什么不同！ 同样也有一个libPrint.a文件。<br /></span></p><p style="color: #333333; font-family: Arial; background-color: #ffffff; line-height: normal; "><span style="color: #6652cc; "><img src="http://hi.csdn.net/attachment/201202/13/0_1329121014MZzs.gif" alt="" style="border: none; " /><br /></span></p><p style="color: #333333; font-family: Arial; background-color: #ffffff; line-height: normal; "><span style="color: #6652cc; "><br /></span></p><p style="color: #333333; font-family: Arial; background-color: #ffffff; line-height: normal; "><span style="font-size: 24px; "><span style="color: #6652cc; ">10.错误原因分析</span></span></p><p style="color: #333333; font-family: Arial; background-color: #ffffff; line-height: normal; "><span style="color: #6652cc; ">Release-iphoneos里面的是基于arm6 arm7编译出来的库文件。Release-iphonesimulator文件夹下面的是基于i386编译出来的文件。</span></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><span style="font-size: 24px; "><span style="line-height: 20px; "><span style="line-height: normal; ">11.</span>合并.a文件，制作通用静态库</span></span></p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><span style="line-height: 20px; ">这二个库一个是用于真机运行的一个是用于模拟器运行的.<span style="line-height: normal; ">其实我们可以利用lipo将这二个文件打包成一个通用的a文件。命令如下：<br /></span></span></p><p style="color: #333333; font-family: Arial; background-color: #ffffff; line-height: normal; ">将<span style="color: #ff0000; ">/Users/user/Library/Developer/Xcode/DerivedData/UITab-dgfkluumuexoxhcapzidtsmdgqcj/Build/Products<span style="color: #000000; ">替换成你的路径。&nbsp;</span></span></p><p style="color: #333333; font-family: Arial; background-color: #ffffff; line-height: normal; ">将<span style="color: #0055ff; ">/Users/user/Desktop/libPrint.a<span style="color: #000000; ">替换成合并后的路径。&nbsp;</span></span></p><p style="color: #333333; font-family: Arial; background-color: #ffffff; line-height: normal; ">lipo -create /Users/pjk1129/Library/Developer/Xcode/DerivedData/Print-dgfkluumuexoxhcapzidtsmdgqcj/Build/Products/Release-iphonesimulator/libPrint.a &nbsp;/Users/pjk1129/Library/Developer/Xcode/DerivedData/Print-dgfkluumuexoxhcapzidtsmdgqcj/Build/Products/Release-iphoneos/libPrint.a &nbsp;-output /Users/pjk1129/Desktop/libPrint.a</p><br style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; " /><p style="color: #333333; font-family: Arial; background-color: #ffffff; line-height: normal; "><span style="font-size: 24px; ">12.打包以后的库文件，我们查看信息</span></p><p style="color: #333333; font-family: Arial; background-color: #ffffff; line-height: normal; ">然后打入如下命令：lipo -info /Users/pjk1129/Desktop/libPrint.a&nbsp;</p><p style="color: #333333; font-family: Arial; background-color: #ffffff; line-height: normal; ">可以看到如下信息：<br /></p><p style="color: #333333; font-family: Arial; background-color: #ffffff; line-height: normal; "><img src="http://hi.csdn.net/attachment/201202/13/0_1329121555f9hD.gif" alt="" style="border: none; " /><br />如上，你已经看到了，它具备了i386和arm7的条件。&nbsp;现在我们这个静态库，支持的构架已经是armv7 i386了。<br /></p><p style="color: #333333; font-family: Arial; background-color: #ffffff; line-height: normal; "><br /></p><span style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><span style="font-size: 24px; ">13.ok，经过上述步骤后</span></span><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; ">这个通用库生成后，我们将原来，调用这个库进行替换一下，在进行编译，成功编译，运行结果如下所示：</p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; "><img src="http://hi.csdn.net/attachment/201202/13/0_13291217270t2z.gif" alt="" style="border: none; " /><br /></p><div></div><img src ="http://www.blogjava.net/writegull/aggbug/389260.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/writegull/" target="_blank">writegull</a> 2012-10-09 18:14 <a href="http://www.blogjava.net/writegull/archive/2012/10/09/389260.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>three20 Debugging 讲解</title><link>http://www.blogjava.net/writegull/archive/2012/09/27/388664.html</link><dc:creator>writegull</dc:creator><author>writegull</author><pubDate>Thu, 27 Sep 2012 02:30:00 GMT</pubDate><guid>http://www.blogjava.net/writegull/archive/2012/09/27/388664.html</guid><wfw:comment>http://www.blogjava.net/writegull/comments/388664.html</wfw:comment><comments>http://www.blogjava.net/writegull/archive/2012/09/27/388664.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/writegull/comments/commentRss/388664.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/writegull/services/trackbacks/388664.html</trackback:ping><description><![CDATA[three20 wiki 地址:https://github.com/facebook/three20/wiki/Debugging<br /><div id="head" style="margin: 14px 0px 5px; padding-top: 5px; padding-bottom: 5px; border-width: 0px 0px 1px; border-bottom-style: solid; border-bottom-color: #cccccc; overflow: hidden; color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 12px; line-height: 14px; background-color: #ffffff; "><h1>Debugging</h1><ul readability-extra"="" style="margin: 6px 0px 0px; padding: 0px; border: 0px; float: right; list-style-type: none; overflow: hidden; "><li style="margin: 0px 0px 0px 7px; padding: 0px; border: 0px; float: left; "><a href="https://github.com/facebook/three20/wiki/Debugging/_history" bigger=""  action-page-history"="" style="margin: 0px; padding: 0px 10px; border-width: 1px; border-style: solid; border-color: #d4d4d4 #d4d4d4 #bcbcbc; color: #333333; text-decoration: none; position: relative; display: inline-block; font-size: 13px; font-weight: bold; line-height: 24px; white-space: nowrap; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; cursor: pointer; -webkit-user-select: none; text-shadow: #ffffff 0px 1px 0px; background-image: -webkit-linear-gradient(top, #fafafa, #eaeaea); ">Page History</a></li></ul></div><div id="wiki-content" style="margin: 0px; border: 0px; color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 12px; line-height: 14px; background-color: #ffffff; "><div style="margin: 0px; border: 0px; "><div id="wiki-body"  instapaper_body"="" style="margin: 0px; border: 0px; "><div style="margin: 0px; border: 0px; font-size: 14px; line-height: 1.6; "><p style="margin: 0px 0px 15px; padding: 0px; border: 0px; ">You can use Three20's debugging facilities instead of&nbsp;<code style="margin: 0px 2px; padding: 0px 5px; border: 1px solid #eaeaea; font-size: 12px; font-family: Consolas, 'Liberation Mono', Courier, monospace; white-space: nowrap; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; ">NSLog()</code>&nbsp;/&nbsp;<code style="margin: 0px 2px; padding: 0px 5px; border: 1px solid #eaeaea; font-size: 12px; font-family: Consolas, 'Liberation Mono', Courier, monospace; white-space: nowrap; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; ">assert()</code>. This would give you an ability to turn off debugging messages without commenting out all&nbsp;<code style="margin: 0px 2px; padding: 0px 5px; border: 1px solid #eaeaea; font-size: 12px; font-family: Consolas, 'Liberation Mono', Courier, monospace; white-space: nowrap; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; ">NSLog</code>'s, sort log messages by importance (<code style="margin: 0px 2px; padding: 0px 5px; border: 1px solid #eaeaea; font-size: 12px; font-family: Consolas, 'Liberation Mono', Courier, monospace; white-space: nowrap; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; ">error</code>,&nbsp;<code style="margin: 0px 2px; padding: 0px 5px; border: 1px solid #eaeaea; font-size: 12px; font-family: Consolas, 'Liberation Mono', Courier, monospace; white-space: nowrap; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; ">warning</code>,&nbsp;<code style="margin: 0px 2px; padding: 0px 5px; border: 1px solid #eaeaea; font-size: 12px; font-family: Consolas, 'Liberation Mono', Courier, monospace; white-space: nowrap; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; ">info</code>).</p><h1>Turn on debugging（打开调试）</h1><p style="margin: 0px 0px 15px; padding: 0px; border: 0px; ">These instructions are for Xcode 3:</p><ul style="margin: 15px 0px; padding: 0px 0px 0px 30px; border: 0px; "><li style="margin: 0px; padding: 0px; border: 0px; ">Right-click on project, choose "Get Info".</li><li style="margin: 0px; padding: 0px; border: 0px; ">In the "Build" tab, choose "Configuration =&gt; Debug" (you probably want to enable this only for debug builds)</li><li style="margin: 0px; padding: 0px; border: 0px; ">While in the "Build" tab, search for "Preprocessor Macros" under the "GCC 4.2 - Preprocessing" section.<ul style="margin: 0px; padding: 0px 0px 0px 30px; border: 0px; "><li style="margin: 0px; padding: 0px; border: 0px; ">Add a declaration that reads&nbsp;<code style="margin: 0px 2px; padding: 0px 5px; border: 1px solid #eaeaea; font-size: 12px; font-family: Consolas, 'Liberation Mono', Courier, monospace; white-space: nowrap; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; ">DEBUG</code>. That way you enable debugging in general.</li><li style="margin: 0px; padding: 0px; border: 0px; ">Add a declaration that reads&nbsp;<code style="margin: 0px 2px; padding: 0px 5px; border: 1px solid #eaeaea; font-size: 12px; font-family: Consolas, 'Liberation Mono', Courier, monospace; white-space: nowrap; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; ">TTMAXLOGLEVEL=TTLOGLEVEL_INFO</code>. By doing this, you set the default debugging output to be<code style="margin: 0px 2px; padding: 0px 5px; border: 1px solid #eaeaea; font-size: 12px; font-family: Consolas, 'Liberation Mono', Courier, monospace; white-space: nowrap; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; ">TTLOGLEVEL_INFO</code>, the most descriptive one.</li></ul></li></ul><p style="margin: 15px 0px; padding: 0px; border: 0px; "><img src="https://a248.e.akamai.net/camo.github.com/48dde704cd3a001e4dbc35dca4f24727f28d84e6/687474703a2f2f692e696d6775722e636f6d2f52697154412e706e67" alt="Debugging preprocessor macro" style="margin: 0px; padding: 0px; border: 0px; max-width: 100%; " /></p><h1>Use debugging</h1><h2>Logging</h2><p style="margin: 0px 0px 15px; padding: 0px; border: 0px; ">Use these instead of&nbsp;<code style="margin: 0px 2px; padding: 0px 5px; border: 1px solid #eaeaea; font-size: 12px; font-family: Consolas, 'Liberation Mono', Courier, monospace; white-space: nowrap; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; ">NSLog()</code>. Which level gets printed to the console and which doesn't depends on what's set in preprocessor macros as<code style="margin: 0px 2px; padding: 0px 5px; border: 1px solid #eaeaea; font-size: 12px; font-family: Consolas, 'Liberation Mono', Courier, monospace; white-space: nowrap; background-color: #f8f8f8; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; ">TTMAXLOGLEVEL</code>&nbsp;(see above).</p><div style="margin: 0px; border: 0px; "><pre style="margin-top: 15px; margin-bottom: 15px; padding: 6px 10px; border: 1px solid #cccccc; font-size: 13px; font-family: Consolas, 'Liberation Mono', Courier, monospace; background-color: #f8f8f8; line-height: 19px; overflow: auto; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; "><span style="margin: 0px; padding: 0px; border: 0px; ">TTDERROR</span><span style="margin: 0px; padding: 0px; border: 0px; ">(</span><span style="margin: 0px; padding: 0px; border: 0px; ">text</span><span style="margin: 0px; padding: 0px; border: 0px; ">,</span> <span style="margin: 0px; padding: 0px; border: 0px; ">...)</span>    <span style="margin: 0px; padding: 0px; border: 0px; font-weight: bold; ">//</span> <span style="margin: 0px; padding: 0px; border: 0px; ">Log</span> <span style="margin: 0px; padding: 0px; border: 0px; ">level</span> 1 <span style="margin: 0px; padding: 0px; border: 0px; ">TTDWARNING</span><span style="margin: 0px; padding: 0px; border: 0px; ">(</span><span style="margin: 0px; padding: 0px; border: 0px; ">text</span><span style="margin: 0px; padding: 0px; border: 0px; ">,</span> <span style="margin: 0px; padding: 0px; border: 0px; ">...)</span>  <span style="margin: 0px; padding: 0px; border: 0px; font-weight: bold; ">//</span> <span style="margin: 0px; padding: 0px; border: 0px; ">Log</span> <span style="margin: 0px; padding: 0px; border: 0px; ">level</span> 3 <span style="margin: 0px; padding: 0px; border: 0px; ">TTDINFO</span><span style="margin: 0px; padding: 0px; border: 0px; ">(</span><span style="margin: 0px; padding: 0px; border: 0px; ">text</span><span style="margin: 0px; padding: 0px; border: 0px; ">,</span> <span style="margin: 0px; padding: 0px; border: 0px; ">...)</span>     <span style="margin: 0px; padding: 0px; border: 0px; font-weight: bold; ">//</span> <span style="margin: 0px; padding: 0px; border: 0px; ">Log</span> <span style="margin: 0px; padding: 0px; border: 0px; ">level</span> 5 <span style="margin: 0px; padding: 0px; border: 0px; ">TTDPRINT</span><span style="margin: 0px; padding: 0px; border: 0px; ">(</span><span style="margin: 0px; padding: 0px; border: 0px; ">text</span><span style="margin: 0px; padding: 0px; border: 0px; ">,</span> <span style="margin: 0px; padding: 0px; border: 0px; ">...)</span> </pre></div><h3>Example</h3><p style="margin: 0px 0px 15px; padding: 0px; border: 0px; ">If I got this in&nbsp;<em style="margin: 0px; padding: 0px; border: 0px; ">AppDelegate.m</em>&nbsp;of my project&nbsp;<em style="margin: 0px; padding: 0px; border: 0px; ">HelloWorld</em>:</p><div style="margin: 0px; border: 0px; "><pre style="margin-top: 15px; margin-bottom: 15px; padding: 6px 10px; border: 1px solid #cccccc; font-size: 13px; font-family: Consolas, 'Liberation Mono', Courier, monospace; background-color: #f8f8f8; line-height: 19px; overflow: auto; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; "><span style="margin: 0px; padding: 0px; border: 0px; font-weight: bold; ">-</span> <span style="margin: 0px; padding: 0px; border: 0px; ">(</span><span style="margin: 0px; padding: 0px; border: 0px; color: #445588; font-weight: bold; ">void</span><span style="margin: 0px; padding: 0px; border: 0px; ">)</span><span style="margin: 0px; padding: 0px; border: 0px; color: #990000; font-weight: bold; ">applicationDidFinishLaunching:</span><span style="margin: 0px; padding: 0px; border: 0px; ">(</span><span style="margin: 0px; padding: 0px; border: 0px; ">UIApplication</span> <span style="margin: 0px; padding: 0px; border: 0px; font-weight: bold; ">*</span><span style="margin: 0px; padding: 0px; border: 0px; ">)</span><span style="margin: 0px; padding: 0px; border: 0px; color: #008080; ">application</span> <span style="margin: 0px; padding: 0px; border: 0px; ">{</span>	     <span style="margin: 0px; padding: 0px; border: 0px; ">TTDINFO</span><span style="margin: 0px; padding: 0px; border: 0px; ">(</span><span style="margin: 0px; padding: 0px; border: 0px; color: #dd1144; ">@"Hello!"</span><span style="margin: 0px; padding: 0px; border: 0px; ">);</span> <span style="margin: 0px; padding: 0px; border: 0px; ">}</span> </pre></div><p style="margin: 15px 0px; padding: 0px; border: 0px; ">...the console output would look like this:</p><pre style="margin-top: 15px; margin-bottom: 15px; padding: 6px 10px; border: 1px solid #cccccc; font-size: 13px; font-family: Consolas, 'Liberation Mono', Courier, monospace; background-color: #f8f8f8; line-height: 19px; overflow: auto; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; "><code style="margin: 0px; padding: 0px; border: none; font-size: 12px; font-family: Consolas, 'Liberation Mono', Courier, monospace; background-color: transparent; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; ">2010-05-15 01:04:20.107 HelloWorld[65222:207] -[AppDelegate applicationDidFinishLaunching:](22): Hello! </code></pre><h2>Conditional logging</h2><p style="margin: 0px 0px 15px; padding: 0px; border: 0px; ">This is a type of logging facility which only outputs something if a particular condition is met:</p><div style="margin: 0px; border: 0px; "><pre style="margin-top: 15px; margin-bottom: 15px; padding: 6px 10px; border: 1px solid #cccccc; font-size: 13px; font-family: Consolas, 'Liberation Mono', Courier, monospace; background-color: #f8f8f8; line-height: 19px; overflow: auto; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; "><span style="margin: 0px; padding: 0px; border: 0px; ">TTDCONDITIONLOG</span><span style="margin: 0px; padding: 0px; border: 0px; ">(</span><span style="margin: 0px; padding: 0px; border: 0px; ">condition</span><span style="margin: 0px; padding: 0px; border: 0px; ">,</span> <span style="margin: 0px; padding: 0px; border: 0px; ">text</span><span style="margin: 0px; padding: 0px; border: 0px; ">,</span> <span style="margin: 0px; padding: 0px; border: 0px; ">...);</span> </pre></div><h3>Example</h3><div style="margin: 0px; border: 0px; "><pre style="margin-top: 15px; margin-bottom: 15px; padding: 6px 10px; border: 1px solid #cccccc; font-size: 13px; font-family: Consolas, 'Liberation Mono', Courier, monospace; background-color: #f8f8f8; line-height: 19px; overflow: auto; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; "><span style="margin: 0px; padding: 0px; border: 0px; ">TTDCONDITIONLOG</span><span style="margin: 0px; padding: 0px; border: 0px; ">(</span><span style="margin: 0px; padding: 0px; border: 0px; ">TTDFLAG_URLREQUEST</span><span style="margin: 0px; padding: 0px; border: 0px; ">,</span> <span style="margin: 0px; padding: 0px; border: 0px; color: #dd1144; ">@"Request parameters: %@"</span><span style="margin: 0px; padding: 0px; border: 0px; ">,</span> <span style="margin: 0px; padding: 0px; border: 0px; ">request</span><span style="margin: 0px; padding: 0px; border: 0px; ">.</span><span style="margin: 0px; padding: 0px; border: 0px; ">parameters</span><span style="margin: 0px; padding: 0px; border: 0px; ">);</span> </pre></div><h2>Debug-only assertions</h2><p style="margin: 0px 0px 15px; padding: 0px; border: 0px; ">Three20 also provides support for assertions which only work in the debug build.</p><div style="margin: 0px; border: 0px; "><pre style="margin-top: 15px; margin-bottom: 15px; padding: 6px 10px; border: 1px solid #cccccc; font-size: 13px; font-family: Consolas, 'Liberation Mono', Courier, monospace; background-color: #f8f8f8; line-height: 19px; overflow: auto; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; "><span style="margin: 0px; padding: 0px; border: 0px; ">TTDASSERT</span><span style="margin: 0px; padding: 0px; border: 0px; ">(</span><span style="margin: 0px; padding: 0px; border: 0px; ">condition_which_would_lead_to_application_termination_when_true</span><span style="margin: 0px; padding: 0px; border: 0px; ">);</span> </pre></div><h3>Example</h3><div style="margin: 0px; border: 0px; "><pre style="margin-top: 15px; margin-bottom: 15px; padding: 6px 10px; border: 1px solid #cccccc; font-size: 13px; font-family: Consolas, 'Liberation Mono', Courier, monospace; background-color: #f8f8f8; line-height: 19px; overflow: auto; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; "><span style="margin: 0px; padding: 0px; border: 0px; color: #999988; font-style: italic; ">// Not that implementing safeAddSubview: is a good idea</span> <span style="margin: 0px; padding: 0px; border: 0px; font-weight: bold; ">-</span> <span style="margin: 0px; padding: 0px; border: 0px; ">(</span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: bold; ">void</span><span style="margin: 0px; padding: 0px; border: 0px; ">)</span><span style="margin: 0px; padding: 0px; border: 0px; ">safeAddSubview:</span><span style="margin: 0px; padding: 0px; border: 0px; ">(</span><span style="margin: 0px; padding: 0px; border: 0px; ">UIView</span><span style="margin: 0px; padding: 0px; border: 0px; font-weight: bold; ">*</span><span style="margin: 0px; padding: 0px; border: 0px; ">)</span><span style="margin: 0px; padding: 0px; border: 0px; ">view</span> <span style="margin: 0px; padding: 0px; border: 0px; ">{</span>     <span style="margin: 0px; padding: 0px; border: 0px; color: #008080; ">TTDASSERT</span><span style="margin: 0px; padding: 0px; border: 0px; ">(</span><span style="margin: 0px; padding: 0px; border: 0px; ">nil</span> <span style="margin: 0px; padding: 0px; border: 0px; font-weight: bold; ">!=</span> <span style="margin: 0px; padding: 0px; border: 0px; ">view</span><span style="margin: 0px; padding: 0px; border: 0px; ">);</span>     <span style="margin: 0px; padding: 0px; border: 0px; font-weight: bold; ">if</span> <span style="margin: 0px; padding: 0px; border: 0px; ">(</span><span style="margin: 0px; padding: 0px; border: 0px; ">nil</span> <span style="margin: 0px; padding: 0px; border: 0px; font-weight: bold; ">==</span> <span style="margin: 0px; padding: 0px; border: 0px; ">view</span><span style="margin: 0px; padding: 0px; border: 0px; ">)</span> <span style="margin: 0px; padding: 0px; border: 0px; ">{</span>         <span style="margin: 0px; padding: 0px; border: 0px; font-weight: bold; ">return</span><span style="margin: 0px; padding: 0px; border: 0px; ">;</span>     <span style="margin: 0px; padding: 0px; border: 0px; ">}</span>     <span style="margin: 0px; padding: 0px; border: 0px; ">[</span><span style="margin: 0px; padding: 0px; border: 0px; ">self</span> <span style="margin: 0px; padding: 0px; border: 0px; ">addSubview:</span><span style="margin: 0px; padding: 0px; border: 0px; ">view</span><span style="margin: 0px; padding: 0px; border: 0px; ">];</span> <span style="margin: 0px; padding: 0px; border: 0px; ">}</span> </pre></div><h1>See also</h1><ul style="margin: 15px 0px; padding: 0px 0px 0px 30px; border: 0px; "><li style="margin: 0px; padding: 0px; border: 0px; "><a href="https://github.com/facebook/three20/blob/master/src/Three20Core/Headers/TTDebug.h" style="margin: 0px; padding: 0px; border: 0px; color: #4183c4; text-decoration: none; ">Three20Core/Headers/TTDebug.h</a></li><li style="margin: 0px; padding: 0px; border: 0px; "><a href="https://github.com/facebook/three20/blob/master/src/Three20Core/Headers/TTDebugFlags.h" style="margin: 0px; padding: 0px; border: 0px; color: #4183c4; text-decoration: none; ">Three20Core/Headers/TTDebugFlags.h</a></li></ul><h1>Links</h1><ul style="margin-top: 15px; margin-right: 0px; margin-bottom: 0px !important; margin-left: 0px; padding: 0px 0px 0px 30px; border: 0px; "><li style="margin: 0px; padding: 0px; border: 0px; "><a href="http://three20.info/article/2010-10-07-Debugging-With-Three20" style="margin: 0px; padding: 0px; border: 0px; color: #4183c4; text-decoration: none; ">Debugging on three20.info</a></li></ul></div></div></div></div><img src ="http://www.blogjava.net/writegull/aggbug/388664.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/writegull/" target="_blank">writegull</a> 2012-09-27 10:30 <a href="http://www.blogjava.net/writegull/archive/2012/09/27/388664.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>将旧的推送通知从通知中心移除掉</title><link>http://www.blogjava.net/writegull/archive/2012/09/14/387745.html</link><dc:creator>writegull</dc:creator><author>writegull</author><pubDate>Fri, 14 Sep 2012 09:51:00 GMT</pubDate><guid>http://www.blogjava.net/writegull/archive/2012/09/14/387745.html</guid><wfw:comment>http://www.blogjava.net/writegull/comments/387745.html</wfw:comment><comments>http://www.blogjava.net/writegull/archive/2012/09/14/387745.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/writegull/comments/commentRss/387745.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/writegull/services/trackbacks/387745.html</trackback:ping><description><![CDATA[<p style="background-color: #fef3dd; border: 0px; margin: 0px 0px 24px; padding: 0px; vertical-align: baseline; color: #292929; font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; line-height: 17px; ">翻译:http://www.joshsunshine.me.uk/2012/02/29/ios-development-remove-old-notifications-from-notification-center.html</p><p style="background-color: #fef3dd; border: 0px; margin: 0px 0px 24px; padding: 0px; vertical-align: baseline; color: #292929; font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; line-height: 17px; ">不逐字翻译了，只是大体说一下。<br />看作者的意思，应该是他经常收到N多通知，而通过其中一条通知打开一个app以后，发现那个app的其它通知还在通知中心。作者不喜欢这样的情况。我以为我也存在的这样的情况，马上检查了一下，发现没有。看来是少数app的问题。但是也记录一下。作者总结的从通知中心移除通知的三种方法：<br />1.将app的BadgeNumber设为0，就是app图标右上角那个</p><div text=""  default"="" style="background-color: #f1f1f1; border: 1px solid #9f9f9f; margin: 0px 0px 10px; vertical-align: baseline; font-size: 13px; line-height: 1.4em; font-family: Monaco, 'Lucida Console', monospace; overflow: auto; white-space: nowrap; width: 740px; "><div codecolorer"="" style="border: 0px; margin: 0px; padding: 5px; vertical-align: baseline; line-height: 1.4em; ">[[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];</div></div><p style="background-color: #fef3dd; border: 0px; margin: 0px 0px 24px; padding: 0px; vertical-align: baseline; color: #292929; font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; line-height: 17px; "><br />2.如果BadgeNumber本身就是0的情况，可以先将其设1再设置成0</p><div text=""  default"="" style="background-color: #f1f1f1; border: 1px solid #9f9f9f; margin: 0px 0px 10px; vertical-align: baseline; font-size: 13px; line-height: 1.4em; font-family: Monaco, 'Lucida Console', monospace; overflow: auto; white-space: nowrap; width: 740px; "><div codecolorer"="" style="border: 0px; margin: 0px; padding: 5px; vertical-align: baseline; line-height: 1.4em; ">[[UIApplication sharedApplication] setApplicationIconBadgeNumber:1];<br style="line-height: 1.4em; " />[[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];</div></div><p style="background-color: #fef3dd; border: 0px; margin: 0px 0px 24px; padding: 0px; vertical-align: baseline; color: #292929; font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; line-height: 17px; ">3.如果以上的办法都不好使的话，那就用本地通知欺骗一下。</p><div text=""  default"="" style="background-color: #f1f1f1; border: 1px solid #9f9f9f; margin: 0px 0px 10px; vertical-align: baseline; font-size: 13px; line-height: 1.4em; font-family: Monaco, 'Lucida Console', monospace; overflow: auto; white-space: nowrap; width: 740px; "><div codecolorer"="" style="border: 0px; margin: 0px; padding: 5px; vertical-align: baseline; line-height: 1.4em; ">UIApplication* application = [UIApplication sharedApplication];<br style="line-height: 1.4em; " />NSArray* scheduledNotifications = [NSArray arrayWithArray:application.scheduledLocalNotifications];<br style="line-height: 1.4em; " />application.scheduledLocalNotifications = scheduledNotifications;</div></div><p style="background-color: #fef3dd; border: 0px; margin: 0px 0px 24px; padding: 0px; vertical-align: baseline; color: #292929; font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; line-height: 17px; ">就这么多了，我仔细想了一下，为什么我的应用从其中一条通知打开的时候，其它的通知消失掉：<br />因为我在程序启动的时候就执行了第一条:)</p><img src ="http://www.blogjava.net/writegull/aggbug/387745.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/writegull/" target="_blank">writegull</a> 2012-09-14 17:51 <a href="http://www.blogjava.net/writegull/archive/2012/09/14/387745.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>MFMessageComposeViewController 界面语言问题</title><link>http://www.blogjava.net/writegull/archive/2012/09/10/387412.html</link><dc:creator>writegull</dc:creator><author>writegull</author><pubDate>Mon, 10 Sep 2012 10:12:00 GMT</pubDate><guid>http://www.blogjava.net/writegull/archive/2012/09/10/387412.html</guid><wfw:comment>http://www.blogjava.net/writegull/comments/387412.html</wfw:comment><comments>http://www.blogjava.net/writegull/archive/2012/09/10/387412.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/writegull/comments/commentRss/387412.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/writegull/services/trackbacks/387412.html</trackback:ping><description><![CDATA[<span style="font-family: Verdana; font-size: 13px; line-height: normal; background-color: #ffffff; ">使用MFMessageComposeViewController 编写发短信模块时界面是英文的情况下，用下面的方法可以解决问题</span><br /><span style="font-family: Verdana; font-size: 13px; line-height: normal; background-color: #ffffff; "><br />在plist里面Localization native development region 选择 china ，然后Localized resources can be mixed 选 YES，如果没有Localized resources can be mixed，需手动添加</span><img src ="http://www.blogjava.net/writegull/aggbug/387412.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/writegull/" target="_blank">writegull</a> 2012-09-10 18:12 <a href="http://www.blogjava.net/writegull/archive/2012/09/10/387412.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>icon去除光晕、光圈</title><link>http://www.blogjava.net/writegull/archive/2012/07/31/384431.html</link><dc:creator>writegull</dc:creator><author>writegull</author><pubDate>Tue, 31 Jul 2012 06:06:00 GMT</pubDate><guid>http://www.blogjava.net/writegull/archive/2012/07/31/384431.html</guid><wfw:comment>http://www.blogjava.net/writegull/comments/384431.html</wfw:comment><comments>http://www.blogjava.net/writegull/archive/2012/07/31/384431.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/writegull/comments/commentRss/384431.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/writegull/services/trackbacks/384431.html</trackback:ping><description><![CDATA[<blockquote type="cite" style="color: #000000; font-family: 'lucida Grande', Verdana; line-height: normal; background-color: #ffffff; "><p>1.图标的圆角效果是系统自动加上的。</p><p>2.光晕效果虽然也是系统加上的，但可以通过程序中设置参数来去掉内建光晕效果。</p><p>方法：在info.plist里面添加一条记录UIPrerenderedIcon，新版的XCODE 会自动识别为Icon already includes gloss effects 打上勾就OK了。如果没有识别的右边栏写上YES就可以</p></blockquote><img src ="http://www.blogjava.net/writegull/aggbug/384431.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/writegull/" target="_blank">writegull</a> 2012-07-31 14:06 <a href="http://www.blogjava.net/writegull/archive/2012/07/31/384431.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>iphone线程中使用异步网络的悲催经历</title><link>http://www.blogjava.net/writegull/archive/2012/07/25/383926.html</link><dc:creator>writegull</dc:creator><author>writegull</author><pubDate>Wed, 25 Jul 2012 03:14:00 GMT</pubDate><guid>http://www.blogjava.net/writegull/archive/2012/07/25/383926.html</guid><wfw:comment>http://www.blogjava.net/writegull/comments/383926.html</wfw:comment><comments>http://www.blogjava.net/writegull/archive/2012/07/25/383926.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/writegull/comments/commentRss/383926.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/writegull/services/trackbacks/383926.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;<a href='http://www.blogjava.net/writegull/archive/2012/07/25/383926.html'>阅读全文</a><img src ="http://www.blogjava.net/writegull/aggbug/383926.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/writegull/" target="_blank">writegull</a> 2012-07-25 11:14 <a href="http://www.blogjava.net/writegull/archive/2012/07/25/383926.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>iOS内存管理编程技巧</title><link>http://www.blogjava.net/writegull/archive/2012/07/05/382295.html</link><dc:creator>writegull</dc:creator><author>writegull</author><pubDate>Thu, 05 Jul 2012 09:05:00 GMT</pubDate><guid>http://www.blogjava.net/writegull/archive/2012/07/05/382295.html</guid><wfw:comment>http://www.blogjava.net/writegull/comments/382295.html</wfw:comment><comments>http://www.blogjava.net/writegull/archive/2012/07/05/382295.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/writegull/comments/commentRss/382295.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/writegull/services/trackbacks/382295.html</trackback:ping><description><![CDATA[<p style="background-color: #ffffff; border: 0px; margin: 0px 0px 8px; padding: 0px; vertical-align: baseline; font-size: 15px; line-height: 1.7em; color: #333333; font-family: 'Segoe UI', Arial, sans-serif; ">原文地址：<span style="line-height: 1.7em; ">http://blog.itotem.com.cn/?p=22</span><br /><br />- alloc, copy, retain会把引用计数+1</p><p style="background-color: #ffffff; border: 0px; margin: 0px 0px 8px; padding: 0px; vertical-align: baseline; font-size: 15px; line-height: 1.7em; color: #333333; font-family: 'Segoe UI', Arial, sans-serif; ">- release会把引用计数-1</p><p style="background-color: #ffffff; border: 0px; margin: 0px 0px 8px; padding: 0px; vertical-align: baseline; font-size: 15px; line-height: 1.7em; color: #333333; font-family: 'Segoe UI', Arial, sans-serif; ">- 局部变量如果初始化时不是autorelease的，要及时调用release释放，并且赋值为nil否则引用仍然存在导致下次无法用nil做是否有值的判断</p><p style="background-color: #ffffff; border: 0px; margin: 0px 0px 8px; padding: 0px; vertical-align: baseline; font-size: 15px; line-height: 1.7em; color: #333333; font-family: 'Segoe UI', Arial, sans-serif; ">- 实例变量要在每次赋值时要先释放当前引用的对象再赋值，并retain一下保证引用计数为1</p><p style="background-color: #ffffff; border: 0px; margin: 0px 0px 8px; padding: 0px; vertical-align: baseline; font-size: 15px; line-height: 1.7em; color: #333333; font-family: 'Segoe UI', Arial, sans-serif; ">- 对于有retain参数的property，直接使用&#8221;.&#8221;赋值时系统会自动释放当前引用对象再赋值，并自动retain一下</p><p style="background-color: #ffffff; border: 0px; margin: 0px 0px 8px; padding: 0px; vertical-align: baseline; font-size: 15px; line-height: 1.7em; color: #333333; font-family: 'Segoe UI', Arial, sans-serif; ">- dealloc中要对所有实例变量调用release，对于有retain参数的property只需要调用self.theProperty = nil即可，系统会去做释放</p><p style="background-color: #ffffff; border: 0px; margin: 0px 0px 8px; padding: 0px; vertical-align: baseline; font-size: 15px; line-height: 1.7em; color: #333333; font-family: 'Segoe UI', Arial, sans-serif; ">- delegate的property通常设为assign，如果设为retain的话会有循环引用的问题，比如aView.delegate = self时会把self retain一下，在aView的dealloc中会把delegate release，但是由于self的引用永远不会小于1，所以导致aView和self的dealloc永远都不会被执行，都永远驻留内存造成泄露。所以如果要设为retain的话一定要确保不会造成循环引用问题。</p><p style="background-color: #ffffff; border: 0px; margin: 0px 0px 8px; padding: 0px; vertical-align: baseline; font-size: 15px; line-height: 1.7em; color: #333333; font-family: 'Segoe UI', Arial, sans-serif; ">- 在UIViewController中的viewDidUnload中要释放掉局部变量，调用release并设为nil，有时系统收到内存警告时会自动调用这个函数来释放一些内存空间</p><p style="background-color: #ffffff; border: 0px; margin: 0px 0px 8px; padding: 0px; vertical-align: baseline; font-size: 15px; line-height: 1.7em; color: #333333; font-family: 'Segoe UI', Arial, sans-serif; ">- 系统内存警告的回调中要释放掉内存中的缓存和其他可释放的东西，以免造成crash</p><p style="background-color: #ffffff; border: 0px; margin: 0px 0px 8px; padding: 0px; vertical-align: baseline; font-size: 15px; line-height: 1.7em; color: #333333; font-family: 'Segoe UI', Arial, sans-serif; ">- 使用UITableView时要把cell设置为重用的，并且要确保确实写得是重用的，有的人写完的结果相当于还是每次都重建cell，导致效率低下</p><p style="background-color: #ffffff; border: 0px; margin: 0px 0px 8px; padding: 0px; vertical-align: baseline; font-size: 15px; line-height: 1.7em; color: #333333; font-family: 'Segoe UI', Arial, sans-serif; ">- 使用UIScrollView时要自己控制释放掉目前不显示的内容，尤其是图片，考虑图片大小和浏览效果可以加载当前显示页两边的3-5页内容</p><p style="background-color: #ffffff; border: 0px; margin: 0px 0px 8px; padding: 0px; vertical-align: baseline; font-size: 15px; line-height: 1.7em; color: #333333; font-family: 'Segoe UI', Arial, sans-serif; ">- 图片需要做缓存，尤其是本地文件系统缓存，可以放到Library/Cache目录中，这个目录系统有专用的常量来获取，比如：<br /><br /></p><p style="background-color: #ffffff; border: 0px; margin: 0px 0px 8px; padding: 0px; vertical-align: baseline; font-size: 15px; line-height: 1.7em; color: #333333; font-family: 'Segoe UI', Arial, sans-serif; ">这里是一个小例子阐释前几条基本原则：</p><div id="crayon-4ff5423edf1a7" crayon-theme-classic=""  crayon-font-monaco"="" crayon-os="mac" settings=" scroll-mouseover" style="background-color: #fdfdfd !important; border: 1px solid #999999 !important; margin: 12px 0px; vertical-align: baseline; overflow: hidden !important; position: relative !important; text-shadow: none !important; color: #333333; font-family: 'Segoe UI', Arial, sans-serif; font-size: 16px; line-height: 24px; float: none; clear: both; "><div settings=" mouseover overlay hide delay" style="background-color: #dddddd !important; border-bottom-width: 1px !important; border-bottom-style: solid !important; border-bottom-color: #bbbbbb !important; margin: 0px; vertical-align: baseline; font-family: Monaco, MonacoRegular, 'Courier New', monospace !important; font-size: 12px; line-height: 20px; text-align: left; width: 768px; position: absolute; overflow: hidden; height: 20px; z-index: 2; border-top-width: 2px; border-right-width: 2px; border-left-width: 2px; border-top-style: solid; border-right-style: solid; border-left-style: solid; border-top-color: #0099ff; border-right-color: #0099ff; border-left-color: #0099ff; "><div style="background-image: none; border: none; margin: 0px; padding-right: 2px !important; vertical-align: baseline; height: 20px; float: right !important; "><a crayon-button=""  crayon-pressed"="" title="Toggle Line Numbers" style="background-image: url(http://blog.itotem.com.cn/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/nums_light.png); background-color: #bbbbbb; border: none; margin: 2px !important; padding: 0px; vertical-align: baseline; color: #ffffff; line-height: 16px; height: 16px; display: inline; float: left !important; min-width: 20px; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; background-position: 50% 50%; background-repeat: no-repeat no-repeat; "></a><a crayon-button"="" title="Copy Plain Code" style="background-image: url(http://blog.itotem.com.cn/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/copy_dark.png); background-color: transparent; border: none; margin: 2px !important; padding: 0px; vertical-align: baseline; color: #0d85cc !important; line-height: 16px; height: 16px; display: inline; float: left !important; min-width: 20px; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; background-position: 50% 50%; background-repeat: no-repeat no-repeat; "></a><a crayon-button"="" title="Open Code in Window" style="background-image: url(http://blog.itotem.com.cn/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/popup_dark.png); background-color: transparent; border: none; margin: 2px !important; padding: 0px; vertical-align: baseline; color: #0d85cc !important; line-height: 16px; height: 16px; display: inline; float: left !important; min-width: 20px; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; background-position: 50% 50%; background-repeat: no-repeat no-repeat; "></a><a crayon-button"="" title="Toggle Plain Code" style="background-image: url(http://blog.itotem.com.cn/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/plain_dark.png); background-color: transparent; border: none; margin: 2px !important; padding: 0px; vertical-align: baseline; color: #0d85cc !important; line-height: 16px; height: 16px; display: inline; float: left !important; min-width: 20px; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; background-position: 50% 50%; background-repeat: no-repeat no-repeat; "></a></div></div><div style="background-image: none; border: none; margin: 0px; vertical-align: baseline; font-family: Monaco, MonacoRegular, 'Courier New', monospace !important; font-size: 12px; line-height: 16px; text-align: left; "><textarea settings="dblclick" readonly="" wrap="off" style="color: #333333; line-height: 16px !important; background-color: #ffffff; border-style: none; box-shadow: none; -webkit-box-shadow: none; padding: 0px 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; width: 768px; overflow: auto; margin: 0px; height: 560px; position: absolute; opacity: 0; white-space: pre; resize: none; z-index: 0; "></textarea></div><div style="background-image: none; margin: 0px; vertical-align: baseline; font-family: Monaco, MonacoRegular, 'Courier New', monospace !important; font-size: 12px; line-height: 16px; text-align: left; width: 768px; overflow: auto; position: relative; z-index: 1; height: 560px; "><table cellpadding="0" cellspacing="0" style="background-image: none !important; border-style: solid; border-color: #e7e7e7; margin: 0px -1px 24px 0px; padding: 0px !important; border-collapse: collapse; border-spacing: 0px; font-size: 12px; line-height: 16px; width: 1482px; text-align: left; "><tbody style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; "><tr style="background-image: none; border: 0px; margin: 0px; padding: 0px; "><td "="" settings="show" style="background-color: #dfefff !important; border-top-style: solid; border-right-style: solid !important; border-bottom-style: none !important; border-left-style: none !important; border-top-color: #e7e7e7; border-right-color: #b3d3f3 !important; margin: 0px !important; padding: 6px 24px; vertical-align: top !important; color: #5499de !important; "><div style="background-image: none; border: none; margin: 0px; vertical-align: baseline; "><div style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; text-align: center; height: 16px; ">1</div><div crayon-striped-num"="" style="background-color: #c8e1fa !important; border: 1px #cccccc !important; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; text-align: center; height: 16px; color: #317cc5 !important; ">2</div><div style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; text-align: center; height: 16px; ">3</div><div crayon-striped-num"="" style="background-color: #c8e1fa !important; border: 1px #cccccc !important; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; text-align: center; height: 16px; color: #317cc5 !important; ">4</div><div style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; text-align: center; height: 16px; ">5</div><div crayon-striped-num"="" style="background-color: #c8e1fa !important; border: 1px #cccccc !important; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; text-align: center; height: 16px; color: #317cc5 !important; ">6</div><div style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; text-align: center; height: 16px; ">7</div><div crayon-striped-num"="" style="background-color: #c8e1fa !important; border: 1px #cccccc !important; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; text-align: center; height: 16px; color: #317cc5 !important; ">8</div><div style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; text-align: center; height: 16px; ">9</div><div crayon-striped-num"="" style="background-color: #c8e1fa !important; border: 1px #cccccc !important; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; text-align: center; height: 16px; color: #317cc5 !important; ">10</div><div style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; text-align: center; height: 16px; ">11</div><div crayon-striped-num"="" style="background-color: #c8e1fa !important; border: 1px #cccccc !important; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; text-align: center; height: 16px; color: #317cc5 !important; ">12</div><div style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; text-align: center; height: 16px; ">13</div><div crayon-striped-num"="" style="background-color: #c8e1fa !important; border: 1px #cccccc !important; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; text-align: center; height: 16px; color: #317cc5 !important; ">14</div><div style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; text-align: center; height: 16px; ">15</div><div crayon-striped-num"="" style="background-color: #c8e1fa !important; border: 1px #cccccc !important; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; text-align: center; height: 16px; color: #317cc5 !important; ">16</div><div style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; text-align: center; height: 16px; ">17</div><div crayon-striped-num"="" style="background-color: #c8e1fa !important; border: 1px #cccccc !important; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; text-align: center; height: 16px; color: #317cc5 !important; ">18</div><div style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; text-align: center; height: 16px; ">19</div><div crayon-striped-num"="" style="background-color: #c8e1fa !important; border: 1px #cccccc !important; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; text-align: center; height: 16px; color: #317cc5 !important; ">20</div><div style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; text-align: center; height: 16px; ">21</div><div crayon-striped-num"="" style="background-color: #c8e1fa !important; border: 1px #cccccc !important; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; text-align: center; height: 16px; color: #317cc5 !important; ">22</div><div style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; text-align: center; height: 16px; ">23</div><div crayon-striped-num"="" style="background-color: #c8e1fa !important; border: 1px #cccccc !important; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; text-align: center; height: 16px; color: #317cc5 !important; ">24</div><div style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; text-align: center; height: 16px; ">25</div><div crayon-striped-num"="" style="background-color: #c8e1fa !important; border: 1px #cccccc !important; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; text-align: center; height: 16px; color: #317cc5 !important; ">26</div><div style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; text-align: center; height: 16px; ">27</div><div crayon-striped-num"="" style="background-color: #c8e1fa !important; border: 1px #cccccc !important; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; text-align: center; height: 16px; color: #317cc5 !important; ">28</div><div style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; text-align: center; height: 16px; ">29</div><div crayon-striped-num"="" style="background-color: #c8e1fa !important; border: 1px #cccccc !important; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; text-align: center; height: 16px; color: #317cc5 !important; ">30</div><div style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; text-align: center; height: 16px; ">31</div><div crayon-striped-num"="" style="background-color: #c8e1fa !important; border: 1px #cccccc !important; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; text-align: center; height: 16px; color: #317cc5 !important; ">32</div><div style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; text-align: center; height: 16px; ">33</div><div crayon-striped-num"="" style="background-color: #c8e1fa !important; border: 1px #cccccc !important; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; text-align: center; height: 16px; color: #317cc5 !important; ">34</div><div style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; text-align: center; height: 16px; ">35</div></div></td><td style="background-image: none !important; border-top-style: solid; border-right-style: none !important; border-bottom-style: none !important; border-left-style: none !important; border-top-color: #e7e7e7; margin: 0px !important; padding: 6px 24px; vertical-align: top !important; width: 1457px; "><div style="background-image: none !important; border: none !important; margin: 0px; vertical-align: baseline; white-space: pre; overflow: visible; "><div id="line-1" style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; height: 16px; "><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #006fe0 !important; ">-</span> <span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #333333 !important; ">(</span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #800080 !important; ">void</span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #333333 !important; ">)</span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #004ed0 !important; ">aFunction</span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #333333 !important; ">{</span> </div><div crayon-striped-line"="" id="line-2" style="background-color: #f7f7f7 !important; border: 1px #cccccc !important; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; height: 16px; "> </div><div id="line-3" style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; height: 16px; "><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #ff8000 !important; ">//创建一个局部变量view </span></div><div crayon-striped-line"="" id="line-4" style="background-color: #f7f7f7 !important; border: 1px #cccccc !important; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; height: 16px; "> </div><div id="line-5" style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; height: 16px; "><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #004ed0 !important; ">UIView *</span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; ">view</span> <span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #006fe0 !important; ">=</span> <span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #333333 !important; ">[</span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #333333 !important; ">[</span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #004ed0 !important; ">UIView </span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; ">alloc</span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #333333 !important; ">]</span> <span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; ">init</span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #333333 !important; ">]</span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #333333 !important; ">;</span> </div><div crayon-striped-line"="" id="line-6" style="background-color: #f7f7f7 !important; border: 1px #cccccc !important; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; height: 16px; "> </div><div id="line-7" style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; height: 16px; "><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #ff8000 !important; ">// 赋值给实例变量theView </span></div><div crayon-striped-line"="" id="line-8" style="background-color: #f7f7f7 !important; border: 1px #cccccc !important; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; height: 16px; "> </div><div id="line-9" style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; height: 16px; "><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #333333 !important; ">[</span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #004ed0 !important; ">theView </span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; ">release</span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #333333 !important; ">]</span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #333333 !important; ">;</span> <span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #ff8000 !important; ">//先释放一下当前引用的变量 </span></div><div crayon-striped-line"="" id="line-10" style="background-color: #f7f7f7 !important; border: 1px #cccccc !important; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; height: 16px; "> </div><div id="line-11" style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; height: 16px; "><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; ">theView</span> <span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #006fe0 !important; ">=</span> <span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #333333 !important; ">[</span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #004ed0 !important; ">view </span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; ">retain</span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #333333 !important; ">]</span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #333333 !important; ">;</span> <span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #ff8000 !important; ">//给实例变量赋值时需要retain一下 </span></div><div crayon-striped-line"="" id="line-12" style="background-color: #f7f7f7 !important; border: 1px #cccccc !important; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; height: 16px; "> </div><div id="line-13" style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; height: 16px; "><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #ff8000 !important; ">// 如果theView是一个有retain属性的property </span></div><div crayon-striped-line"="" id="line-14" style="background-color: #f7f7f7 !important; border: 1px #cccccc !important; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; height: 16px; "> </div><div id="line-15" style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; height: 16px; "><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; ">self</span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #333333 !important; ">.</span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #002d7a !important; ">theView</span> <span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #006fe0 !important; ">=</span> <span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; ">view</span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #333333 !important; ">;</span> <span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #ff8000 !important; ">//不需要先释放，也不需要调用retain，系统会自动做，所以一定不能这样写self.view = [[UIView alloc] init];，这样的话创建的view会被retain两次，造成泄露，对于这种可以先创建一个局部变量，给self.view赋值后再释放 </span></div><div crayon-striped-line"="" id="line-16" style="background-color: #f7f7f7 !important; border: 1px #cccccc !important; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; height: 16px; "> </div><div id="line-17" style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; height: 16px; "><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #333333 !important; ">[</span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #004ed0 !important; ">view </span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; ">release</span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #333333 !important; ">]</span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #333333 !important; ">;</span> <span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #ff8000 !important; ">//要及时释放局部变量 </span></div><div crayon-striped-line"="" id="line-18" style="background-color: #f7f7f7 !important; border: 1px #cccccc !important; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; height: 16px; "> </div><div id="line-19" style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; height: 16px; "><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #333333 !important; ">}</span> </div><div crayon-striped-line"="" id="line-20" style="background-color: #f7f7f7 !important; border: 1px #cccccc !important; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; height: 16px; "> </div><div id="line-21" style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; height: 16px; ">  </div><div crayon-striped-line"="" id="line-22" style="background-color: #f7f7f7 !important; border: 1px #cccccc !important; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; height: 16px; "> </div><div id="line-23" style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; height: 16px; "><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #006fe0 !important; ">-</span> <span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #333333 !important; ">(</span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #800080 !important; ">void</span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #333333 !important; ">)</span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #004ed0 !important; ">dealloc</span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #333333 !important; ">{</span> </div><div crayon-striped-line"="" id="line-24" style="background-color: #f7f7f7 !important; border: 1px #cccccc !important; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; height: 16px; "> </div><div id="line-25" style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; height: 16px; "><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #ff8000 !important; ">//释放局部变量 </span></div><div crayon-striped-line"="" id="line-26" style="background-color: #f7f7f7 !important; border: 1px #cccccc !important; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; height: 16px; "> </div><div id="line-27" style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; height: 16px; "><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #333333 !important; ">[</span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #004ed0 !important; ">theView </span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; ">release</span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #333333 !important; ">]</span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #333333 !important; ">;</span> </div><div crayon-striped-line"="" id="line-28" style="background-color: #f7f7f7 !important; border: 1px #cccccc !important; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; height: 16px; "> </div><div id="line-29" style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; height: 16px; "><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #ff8000 !important; ">//如果theView是一个有retain属性的property，也可以这样写 </span></div><div crayon-striped-line"="" id="line-30" style="background-color: #f7f7f7 !important; border: 1px #cccccc !important; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; height: 16px; "> </div><div id="line-31" style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; height: 16px; "><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; ">self</span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #333333 !important; ">.</span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #002d7a !important; ">theView</span> <span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #006fe0 !important; ">=</span> <span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; ">nil</span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #333333 !important; ">;</span> </div><div crayon-striped-line"="" id="line-32" style="background-color: #f7f7f7 !important; border: 1px #cccccc !important; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; height: 16px; "> </div><div id="line-33" style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; height: 16px; "><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #333333 !important; ">[</span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #800080 !important; ">super</span> <span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; ">dealloc</span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #333333 !important; ">]</span><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #333333 !important; ">;</span> </div><div crayon-striped-line"="" id="line-34" style="background-color: #f7f7f7 !important; border: 1px #cccccc !important; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; height: 16px; "> </div><div id="line-35" style="background-image: none; border: none; margin: 0px; padding-right: 5px; padding-left: 5px; vertical-align: baseline; height: 16px; "><span "="" style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; color: #333333 !important; ">}</span></div></div></td></tr></tbody></table></div></div><img src ="http://www.blogjava.net/writegull/aggbug/382295.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/writegull/" target="_blank">writegull</a> 2012-07-05 17:05 <a href="http://www.blogjava.net/writegull/archive/2012/07/05/382295.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Iphone程序中显示应用图片icon文件不正常</title><link>http://www.blogjava.net/writegull/archive/2012/06/26/381521.html</link><dc:creator>writegull</dc:creator><author>writegull</author><pubDate>Tue, 26 Jun 2012 08:10:00 GMT</pubDate><guid>http://www.blogjava.net/writegull/archive/2012/06/26/381521.html</guid><wfw:comment>http://www.blogjava.net/writegull/comments/381521.html</wfw:comment><comments>http://www.blogjava.net/writegull/archive/2012/06/26/381521.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/writegull/comments/commentRss/381521.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/writegull/services/trackbacks/381521.html</trackback:ping><description><![CDATA[今天测试程序时发现一个奇怪的现象，我在关于页面中想显示图片icon文件，可是怎么调试都不显示。后来加载其它图片则显示正常。<br /><br />我分析原因是苹果对程序访问icon文件做了限制，所以不能正常显示<br /><br />解决方案：把icon文件复制一份，改成其它名字，加载改名字的文件，问题成功解决！<img src ="http://www.blogjava.net/writegull/aggbug/381521.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/writegull/" target="_blank">writegull</a> 2012-06-26 16:10 <a href="http://www.blogjava.net/writegull/archive/2012/06/26/381521.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>iphone调用系统电话、短信、浏览器、地图、邮件等</title><link>http://www.blogjava.net/writegull/archive/2012/06/13/380701.html</link><dc:creator>writegull</dc:creator><author>writegull</author><pubDate>Wed, 13 Jun 2012 09:09:00 GMT</pubDate><guid>http://www.blogjava.net/writegull/archive/2012/06/13/380701.html</guid><wfw:comment>http://www.blogjava.net/writegull/comments/380701.html</wfw:comment><comments>http://www.blogjava.net/writegull/archive/2012/06/13/380701.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/writegull/comments/commentRss/380701.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/writegull/services/trackbacks/380701.html</trackback:ping><description><![CDATA[<p style="margin: 0.5em 0px; padding: 0px; color: #444444; font-family: 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; font-size: 13px; line-height: 20px; text-align: left; background-color: #eceef0; "><span style="margin: 0px; padding: 0px; ">openURL的使用方法：[[UIApplication sharedApplication] openURL:[NSURL URLWithString:appString]];<br />其中系统的appString有：<br />1.Map http://maps.google.com/maps?q=Shanghai&nbsp;<br />2.Email mailto://myname@google.com&nbsp;<br />3.Tel tel://10086&nbsp;<br />4.Msg sms://10086&nbsp;</span><br /><br /><span style="margin: 0px; padding: 0px; ">openURL能帮助你运行Maps，SMS，Browser,Phone甚至其他的应用程序。这是iPhone开发中我经常需要用到的一段代码，它仅仅只有一行而已。<br /><br /><span style="margin: 0px; padding: 0px; ">//打开地图</span></span></p><p style="margin: 0.5em 0px; padding: 0px; text-align: left; color: #444444; font-family: 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; font-size: 13px; line-height: 20px; background-color: #eceef0; "><span style="margin: 0px; padding: 0px; ">- (IBAction)openMaps {<br />NSString*addressText = @"beijing"; //@"1Infinite Loop, Cupertino, CA 95014";&nbsp;<br />addressText =[addressText stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding];&nbsp;<br />NSString*urlText = [NSString stringWithFormat:@"http://maps.google.com/maps?q=%@",addressText];&nbsp;<br />NSLog(@"urlText=============== %@", urlText);&nbsp;<br />[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlText]];<br />}<br /></span></p><span style="margin: 0px; padding: 0px; color: #444444; font-family: 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; font-size: 13px; line-height: 20px; text-align: left; background-color: #eceef0; "><span style="margin: 0px; padding: 0px; ">//打开mail</span><br /></span><p style="margin: 0.5em 0px; padding: 0px; text-align: left; color: #444444; font-family: 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; font-size: 13px; line-height: 20px; background-color: #eceef0; "><span style="margin: 0px; padding: 0px; ">- (IBAction)openEmail {&nbsp;</span></p><p style="margin: 0.5em 0px; padding: 0px; text-align: left; color: #444444; font-family: 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; font-size: 13px; line-height: 20px; background-color: #eceef0; "><span style="margin: 0px; padding: 0px; ">[[UIApplication sharedApplication]openURL:[NSURL URLWithString:@"mailto://devprograms@apple.com"]];</span></p><p style="margin: 0.5em 0px; padding: 0px; text-align: left; color: #444444; font-family: 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; font-size: 13px; line-height: 20px; background-color: #eceef0; "><span style="margin: 0px; padding: 0px; ">&nbsp;}</span></p><p style="margin: 0.5em 0px; padding: 0px; text-align: left; color: #444444; font-family: 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; font-size: 13px; line-height: 20px; background-color: #eceef0; "><span style="margin: 0px; padding: 0px; "><br /></span></p><span style="margin: 0px; padding: 0px; color: #444444; font-family: 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; font-size: 13px; line-height: 20px; text-align: left; background-color: #eceef0; ">//拨打电话</span>&nbsp;<br style="text-align: left; color: #444444; font-family: 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; font-size: 13px; line-height: 20px; background-color: #eceef0; " /><p style="margin: 0.5em 0px; padding: 0px; text-align: left; color: #444444; font-family: 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; font-size: 13px; line-height: 20px; background-color: #eceef0; "><span style="margin: 0px; padding: 0px; ">- (IBAction)openPhone {</span></p><p style="margin: 0.5em 0px; padding: 0px; text-align: left; color: #444444; font-family: 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; font-size: 13px; line-height: 20px; background-color: #eceef0; "><span style="margin: 0px; padding: 0px; ">&nbsp;[[UIApplication sharedApplication] openURL:[NSURLURLWithString:@"tel://8004664411"]];&nbsp;</span></p><p style="margin: 0.5em 0px; padding: 0px; text-align: left; color: #444444; font-family: 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; font-size: 13px; line-height: 20px; background-color: #eceef0; "><span style="margin: 0px; padding: 0px; ">}<br /><p style="word-wrap: break-word; word-break: break-all; margin: 0px 0px 10px; padding: 0px; text-indent: 27px; color: #000000; font-family: Arial, Helvetica, 宋体; font-size: 14px; line-height: 23px; ">使用这种方式拨打电话时，当用户结束通话后，iphone界面会停留在电话界面。<br style="word-wrap: break-word; word-break: break-all; " />用如下方式，可以使得用户结束通话后自动返回到应用：<br style="word-wrap: break-word; word-break: break-all; " />UIWebView*callWebview =[[UIWebView alloc] init];<br style="word-wrap: break-word; word-break: break-all; " />NSURL *telURL =[NSURL URLWithString:@"tel:10086"];// 貌似tel:// 或者 tel: 都行<br style="word-wrap: break-word; word-break: break-all; " />[callWebview loadRequest:[NSURLRequest requestWithURL:telURL]];<br style="word-wrap: break-word; word-break: break-all; " />//记得添加到view上<br style="word-wrap: break-word; word-break: break-all; " />[self.view addSubview:callWebview];</p><p style="word-wrap: break-word; word-break: break-all; margin: 0px 0px 10px; padding: 0px; text-indent: 27px; color: #000000; font-family: Arial, Helvetica, 宋体; font-size: 14px; line-height: 23px; ">　还有一种私有方法：（可能不能通过审核）<br style="word-wrap: break-word; word-break: break-all; " />[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"telprompt://10086"]];</p></span></p><p style="margin: 0.5em 0px; padding: 0px; text-align: left; color: #444444; font-family: 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; font-size: 13px; line-height: 20px; background-color: #eceef0; "><span style="margin: 0px; padding: 0px; "><br /></span></p><span style="margin: 0px; padding: 0px; color: #444444; font-family: 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; font-size: 13px; line-height: 20px; text-align: left; background-color: #eceef0; "><span style="margin: 0px; padding: 0px; ">//打开短信</span><br /></span><p style="margin: 0.5em 0px; padding: 0px; text-align: left; color: #444444; font-family: 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; font-size: 13px; line-height: 20px; background-color: #eceef0; "><span style="margin: 0px; padding: 0px; ">- (IBAction)openSms {&nbsp;</span></p><p style="margin: 0.5em 0px; padding: 0px; text-align: left; color: #444444; font-family: 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; font-size: 13px; line-height: 20px; background-color: #eceef0; "><span style="margin: 0px; padding: 0px; ">[[UIApplication sharedApplication] openURL:[NSURLURLWithString:@"sms://466453"]];</span></p><p style="margin: 0.5em 0px; padding: 0px; text-align: left; color: #444444; font-family: 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; font-size: 13px; line-height: 20px; background-color: #eceef0; "><span style="margin: 0px; padding: 0px; ">}</span></p><span style="margin: 0px; padding: 0px; color: #444444; font-family: 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; font-size: 13px; line-height: 20px; text-align: left; background-color: #eceef0; "><br /><span style="margin: 0px; padding: 0px; ">//打开浏览器</span><br /></span><p style="margin: 0.5em 0px; padding: 0px; text-align: left; color: #444444; font-family: 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; font-size: 13px; line-height: 20px; background-color: #eceef0; "><span style="margin: 0px; padding: 0px; ">-(IBAction)openBrowser {&nbsp;</span></p><p style="margin: 0.5em 0px; padding: 0px; text-align: left; color: #444444; font-family: 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; font-size: 13px; line-height: 20px; background-color: #eceef0; "><span style="margin: 0px; padding: 0px; ">[[UIApplication sharedApplication] openURL:[NSURLURLWithString:@"http://itunesconnect.apple.com"]];&nbsp;</span></p><p style="margin: 0.5em 0px; padding: 0px; text-align: left; color: #444444; font-family: 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; font-size: 13px; line-height: 20px; background-color: #eceef0; "><span style="margin: 0px; padding: 0px; ">}</span></p><img src ="http://www.blogjava.net/writegull/aggbug/380701.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/writegull/" target="_blank">writegull</a> 2012-06-13 17:09 <a href="http://www.blogjava.net/writegull/archive/2012/06/13/380701.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>苹果面试应聘人员的15道最趣味性题目</title><link>http://www.blogjava.net/writegull/archive/2012/06/09/380401.html</link><dc:creator>writegull</dc:creator><author>writegull</author><pubDate>Sat, 09 Jun 2012 06:23:00 GMT</pubDate><guid>http://www.blogjava.net/writegull/archive/2012/06/09/380401.html</guid><wfw:comment>http://www.blogjava.net/writegull/comments/380401.html</wfw:comment><comments>http://www.blogjava.net/writegull/archive/2012/06/09/380401.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/writegull/comments/commentRss/380401.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/writegull/services/trackbacks/380401.html</trackback:ping><description><![CDATA[<h3><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-align: left; background-color: #e5ecf4; "></p><div><span style="font-size: 14px; font-weight: normal;">北京时间6月9日消息，据外国媒体报道，谷歌在招聘员工和工程师时，往往会问应聘者有关技术方面的问题。苹果却大不相同，总是会司会问一些脑筋急转弯风格的问题，提出一些与硬件规格相关的问题，此举似乎更多的是希望从潜在的员工身上挖掘更多的创造力。苹果的这些问题不仅针对技术人员，甚至还针对销售人员和其他特殊人员。以下就是美国网站GlassDoor提供的苹果在面试应聘人员的最有趣味性的15道题目：</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　1、桌上放置了一部旧iPhone，你能看到哪些材料？</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　招聘职位：产品设计工程师。</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　在苹果公司工作的多数员工，都会了解供应链的成本事务，以确保尽可能地减少生产手机的产品成本。苹果手机是极具价格竞争优势的产品，所以你必须知道如何从事控制成本相关的工作。因此，具备专业的材料及其属性相关的经验将有助于你在生产手机设备时降低成本。</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　2、描述使用苹果产品的情况</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　招聘职位：销售员。</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　如果你想销售苹果产品，最好已经是苹果用户。无论如何，苹果不会聘用一个从未使用苹果iPhone手机的人来担任公司的销售员工。</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　3、如果测试部门否决了500台洗衣机，那么你将如何查找根源并找到解决之道？</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　招聘职位：产品质量工程师。如果在生产中发生了故障，就可能会导致数百部iPhone手机受损，甚至也可能会此起成千上万的收入受损。如果你想管理产品质量，那么就必须确保你能够发现所有产生的问题，特别是那些在供应链初期阶段就出现的问题。</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　4、你如何在资源非常有限的环境下将处理网络、文件系统、用户界面系统等的线程模型转化成用户空间框架？</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　招聘职位：软件工程师。</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　编写运营程序的代码较为容易，但是要让它有效的工作就会很难了，特别是当你为手机设计软件时，你必须依赖低功率的芯片来确保电池寿命延长。</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　5、你如何计算来自中国的苹果供应量？</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　招聘职位：材料项目经理。</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　他们正在探讨字面意义上的苹果，如你所知，就是水果。不过，这也是一道非常基础的供应问题。如果你负责管理供应链，那么你就需要确切的知道供应 商供应何种产品、以及能够提供什么样的材料。苹果公司几乎为其生产的智能手机购买所有最好的元件，如果你能够充分了解整个供应链，那就能够减少成本。</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　6、使用运营放大器来设计一个LED驱动</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　招聘职位：硬件工程师。</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　通常情况下，产品不会在非常优化的环境下运行。事实上，运行环境要么太热、要么太冷、甚至还会在水中。因此，你必须确保你的产品能够在非最优化的环境下运行。</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　7、如何诊断缓冲溢出问题？</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　招聘职位：软件工程师。</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　通常情况下，确定谁是最有才华工程师的最佳方法就是问他们如何去解决问题。缓冲溢出问题一旦产生，就可能会引发巨大灾难，因此，如果你想测试你的工程师在极端复杂问题面前如何采取什么行动的话，那么这将是值得提问的好问题。</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　8、你有100个编号的灯泡，在第一环节中都打开这些灯泡，然后再换上其它的新灯泡，依次类推，这样100次过后，还有多少个灯泡在亮着？</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　招聘职位：高级软件工程师。</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　实际上，苹果的面试官并不是最传统的人，他们会从Khan Academy网站引用一些脑经急转弯风格的问题，但是，这些问题一般都是涉及一些数学技巧的复杂问题，因此，要想测试一个工程师解决问题的能力，这些问题都将是值得提出的好问题。</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　9、你如何及时地关注科技新闻？</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　招聘职位：Mac人才。</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　如果你想运营苹果零售商店，那么还需要确保你具备一种认知感觉&#8212;&#8212;即了解人们如何从新闻中理解苹果公司。苹果的面试官想以此了解应聘人员是否会浏览TechCrunch、heck或Business Insider之类的网站。</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　10、你从一个6&#215;6的网格的左上方开始，可以向下或者向右移动，那么你会有多少种方法能够到达网格的右下角？</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　招聘职位：高级软件工程师。</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　这是一个叫作&#8220;路径计算&#8221;的问题，也是最基本的一种脑筋急转弯问题，这样的问题旨在测试应聘人员如何思考问题，以及能否找到解决问题的方法。苹 果会向他们的部分高级软件工程师提出一些更加疯狂的此类问题，这一点也不足为奇。这样的问题也取自于Khan Academy。</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　11、你如何检验表面曲率的连续性？</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　招聘职位：CAD制图员。</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　苹果为自己的设备绘制了大量的原型&#8212;&#8212;例如iPhone和iPad的原型等。那些原型都需要进行测试，因此，你需要让一些人快速的绘制出原型。但是，还要保证与苹果的其它设备保持一致，因此，你需要确保你的制图员和设计师具备完美的意识，甚至设计玻璃的形状。</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　12、找到链接列表的中间点</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　招聘职位：Cocoa camp。</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　苹果会要求他们的软件工程师提供一个更明智的解决方案。例如，你可能会获得两个&#8220;指示器&#8221;，一个指示器在链接列表中每次移动一步，另一个每次移动两步。当另一指示器到达终点时，那么第一个指示器所处的位置就是链接列表的中间点。</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　13、如果你可以带一件科技产品到偏远的地方，那会是什么？</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　招聘职位：专员。</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　这是一个带有&#8220;欺骗性&#8221;的问题，苹果可能是在测试你是否喜欢iPhone手机。在苹果店的销售人员（苹果店专家就是干这个的）必须非常喜欢苹果产品。</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　14、在金属片上打出5个洞眼的方法？</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　招聘职位：产品设计工程师。</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　苹果需要确保其设计师和硬件工程师至少都具备一定的创造力，即使他们必须成为超级技术专家，因此，即使是让你在金属片上打洞这样的简单问题也可能会有很多的解决方法。事实上，苹果是在测试应聘人员的创造力。</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　15、你认为中学里什么样的群体最好或最简单？</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　招聘职位：专员</span></div><div><span style="font-size: 14px; font-weight: normal;"><br /></span></div><div><span style="font-size: 14px; font-weight: normal;">　　如果你想在苹果商店中挑出那些更可能购买苹果产品的专门用户，你就需要具备了解这些用户是什么样的人，无论他们是否购买苹果产品，你都需要作出记号，并尽可能快地区别出来。&nbsp;</span></div><p>&nbsp;</p></h3><img src ="http://www.blogjava.net/writegull/aggbug/380401.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/writegull/" target="_blank">writegull</a> 2012-06-09 14:23 <a href="http://www.blogjava.net/writegull/archive/2012/06/09/380401.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>UISegmentedControl分段按钮的使用  </title><link>http://www.blogjava.net/writegull/archive/2012/05/03/377303.html</link><dc:creator>writegull</dc:creator><author>writegull</author><pubDate>Thu, 03 May 2012 09:34:00 GMT</pubDate><guid>http://www.blogjava.net/writegull/archive/2012/05/03/377303.html</guid><wfw:comment>http://www.blogjava.net/writegull/comments/377303.html</wfw:comment><comments>http://www.blogjava.net/writegull/archive/2012/05/03/377303.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/writegull/comments/commentRss/377303.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/writegull/services/trackbacks/377303.html</trackback:ping><description><![CDATA[<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #222222; font-family: 微软雅黑, Tahoma, Helvetica, Arial, sans-serif; font-size: 12px; text-align: left; background-color: #ffffff; "><a href="http://tiger.easymorse.com/wp-content/uploads/2010/12/2010122710.20.03.png" style="text-decoration: none; color: #685d46; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br style="font-size: 12pt; " /><img src="http://tiger.easymorse.com/wp-content/uploads/2010/12/2010122710.20.03_thumb.png" border="0" alt="屏幕快照 2010-12-27 上午10.20.03" width="244" height="160" style="border-style: initial; border-color: initial; border-image: initial; max-width: 100%; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; display: inline; " /></a></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #222222; font-family: 微软雅黑, Tahoma, Helvetica, Arial, sans-serif; font-size: 12px; text-align: left; background-color: #ffffff; "><span style="font-size: 12pt; ">实现如下代码：</span></p><blockquote style="font-size: 12px; margin-right: 30px; margin-bottom: 0px; margin-left: 10px; color: #222222; font-family: 微软雅黑, Tahoma, Helvetica, Arial, sans-serif; text-align: left; background-color: #ffffff; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; border-left-width: 5px; border-left-color: #cccccc; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 12pt; ">- (void)viewDidLoad {</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">[super viewDidLoad];</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">segmentedControl=[[UISegmentedControl alloc] initWithFrame:CGRectMake(80.0f, 8.0f, 70.0f, 25.0f) ];</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">[segmentedControl insertSegmentWithTitle:@"T+" atIndex:0 animated:YES];</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">[segmentedControl insertSegmentWithTitle:@"T-" atIndex:1 animated:YES];</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">segmentedControl.segmentedControlStyle = UISegmentedControlStyleBar;</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">segmentedControl.momentary = YES;</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">segmentedControl.multipleTouchEnabled=NO;</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">[segmentedControl addTarget:self action:@selector(Selectbutton:) forControlEvents:UIControlEventValueChanged];</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">UIBarButtonItem *segButton = [[UIBarButtonItem alloc] initWithCustomView:segmentedControl];</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">[segmentedControl release];</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">self.navigationItem.rightBarButtonItem = segButton;</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">[segButton release];</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 12pt; ">}</span></p></blockquote><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #222222; font-family: 微软雅黑, Tahoma, Helvetica, Arial, sans-serif; font-size: 12px; text-align: left; background-color: #ffffff; "></p><blockquote style="font-size: 12px; margin-right: 30px; margin-bottom: 0px; margin-left: 10px; color: #222222; font-family: 微软雅黑, Tahoma, Helvetica, Arial, sans-serif; text-align: left; background-color: #ffffff; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; border-left-width: 5px; border-left-color: #cccccc; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 12pt; ">-(void)Selectbutton:(int)sender{</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">UISegmentedControl *myUISegmentedControl=(UISegmentedControl *)sender;</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">NSLog(@&#8221;!!!!!!!!%d&#8221;,myUISegmentedControl.selectedSegmentIndex);</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">switch (myUISegmentedControl.selectedSegmentIndex) {</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">case 1:</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">break;</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">case 0:</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">break;</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">default:</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">break;</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">}</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">}</span></p></blockquote><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #222222; font-family: 微软雅黑, Tahoma, Helvetica, Arial, sans-serif; font-size: 12px; text-align: left; background-color: #ffffff; "><em style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "></em><span style="font-size: 12pt; ">segmentedControl 中的字体也是可以改动的，代码如下：</span></p><blockquote style="font-size: 12px; margin-right: 30px; margin-bottom: 0px; margin-left: 10px; color: #222222; font-family: 微软雅黑, Tahoma, Helvetica, Arial, sans-serif; text-align: left; background-color: #ffffff; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; border-left-width: 5px; border-left-color: #cccccc; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 12pt; ">-(void)ChangeSegmentFont:(UIView *)aView</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">{</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">if ([aView isKindOfClass:[UILabel class]]) {</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">UILabel *lb = (UILabel&nbsp;&nbsp;&nbsp; *)aView;</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">[lb setTextAlignment:UITextAlignmentCenter];</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">[lb setFrame:CGRectMake(0, 0, 80, 25)];</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">[lb setFont:[UIFont systemFontOfSize:18]];</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">}</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">NSArray *na = [aView subviews];</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">NSEnumerator *ne = [na objectEnumerator];</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">UIView *subView;</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">while (subView = [ne nextObject]) {</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">[self ChangeSegmentFont:subView];</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">}</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /><span style="font-size: 12pt; ">}</span></p></blockquote><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #222222; font-family: 微软雅黑, Tahoma, Helvetica, Arial, sans-serif; font-size: 12px; text-align: left; background-color: #ffffff; "><span style="font-size: 12pt; ">在需要调用此方法的地方加入下面方法即可（分段控件中已经有分段按钮时调用）</span></p><blockquote style="font-size: 12px; margin-right: 30px; margin-bottom: 0px; margin-left: 10px; color: #222222; font-family: 微软雅黑, Tahoma, Helvetica, Arial, sans-serif; text-align: left; background-color: #ffffff; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; border-left-width: 5px; border-left-color: #cccccc; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 12pt; ">[self ChangeSegmentFont:UISegmentedControl的对象];</span></p></blockquote><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #222222; font-family: 微软雅黑, Tahoma, Helvetica, Arial, sans-serif; font-size: 12px; text-align: left; background-color: #ffffff; "><span style="font-size: 12pt; ">即可</span></p><img src ="http://www.blogjava.net/writegull/aggbug/377303.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/writegull/" target="_blank">writegull</a> 2012-05-03 17:34 <a href="http://www.blogjava.net/writegull/archive/2012/05/03/377303.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>控件类视图之UIControl的派生控件</title><link>http://www.blogjava.net/writegull/archive/2012/04/28/376983.html</link><dc:creator>writegull</dc:creator><author>writegull</author><pubDate>Sat, 28 Apr 2012 09:21:00 GMT</pubDate><guid>http://www.blogjava.net/writegull/archive/2012/04/28/376983.html</guid><wfw:comment>http://www.blogjava.net/writegull/comments/376983.html</wfw:comment><comments>http://www.blogjava.net/writegull/archive/2012/04/28/376983.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/writegull/comments/commentRss/376983.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/writegull/services/trackbacks/376983.html</trackback:ping><description><![CDATA[<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="color: #ff0000; ">文章出处：</span><a href="http://blog.csdn.net/iukey" target="_blank" style="color: #ff9900; text-decoration: none; ">http://blog.csdn.net/iukey</a><br /><br />UIKit提供了一组控件：UISwitch开关、UIButton按钮、UISegmentedControl分段控件、UISlider滑块、UITextField文本字段控件、UIPageControl分页控件。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; ">控件是对UIView派生类的实用增强及补充，并可以直接附着于导航栏、表格单元，甚至更大的对象。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; ">这些控件的基类均是UIControl，而UIControl派生自UIView类，所以每个控件都有很多视图的特性，包括附着于其他视图的能力。所有控件都拥有一套共同的属性和方法。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; ">所以学习控件，我们先学习UIControl。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>属性</strong></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>enabled</strong></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; ">控件默认是启用的。要禁用控件，可以将enabled属性设置为NO，这将导致控件忽略任何触摸事件。被禁用后，控件还可以用不同的方式显示自己，比如变成灰色不可用。虽然是由控件的子类完成的，这个属性却存在于UIControl中。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>selected</strong></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; ">当用户选中控件时，UIControl类会将其selected属性设置为YES。子类有时使用这个属性来让控件选择自身，或者来表现不同的行为方式。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>contentVerticalAlignment</strong></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; ">控件如何在垂直方向上布置自身的内容。默认是将内容顶端对其，对于文本字段，可能会改成UIControlContentVerticalAlignmentCenter。对于这个字段，可以使用下列诸值：</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "></p><div bg_java"="" style="width: 722px; line-height: 26px; text-align: left; "><div><div style="border-left-color: #999999; "><strong>[java]</strong>&nbsp;<a href="http://blog.csdn.net/iukey/article/details/7300412#" title="view plain">view plain</a><a href="http://blog.csdn.net/iukey/article/details/7300412#" title="copy">copy</a><a href="http://blog.csdn.net/iukey/article/details/7300412#" title="print">print</a><a href="http://blog.csdn.net/iukey/article/details/7300412#" title="?">?</a><div style="position: absolute; left: 403px; top: 932px; width: 22px; height: 12px; z-index: 99; border-image: initial; "><embed id="ZeroClipboardMovie_1" src="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="22" height="12" name="ZeroClipboardMovie_1" align="center" allowscriptaccess="always" allowfullscreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id=1&amp;width=22&amp;height=12" wmode="transparent"></div></div></div><ol start="1"><li style="border-width: initial; border-color: initial; background-color: #f5fae2; line-height: 18px; ">UIControlContentVerticalAlignmentCenter&nbsp;&nbsp;</li><li style="border-width: initial; border-color: initial; background-color: #f5fae2; color: #555555; line-height: 18px; ">UIControlContentVerticalAlignmentTop&nbsp;&nbsp;</li><li style="border-width: initial; border-color: initial; background-color: #f5fae2; line-height: 18px; ">UIControlContentVerticalAlignmentBottom&nbsp;&nbsp;</li><li style="border-width: initial; border-color: initial; background-color: #f5fae2; color: #555555; line-height: 18px; ">UIControlContentVerticalAlignmentFill&nbsp;&nbsp;</li></ol></div><span style="font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; white-space: pre; "> <strong>contentHorizontalAlignment</strong></span><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; ">水平对齐方式，可以只用下列值：</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "></p><div bg_java"="" style="width: 722px; line-height: 26px; text-align: left; "><div><div style="border-left-color: #999999; "><strong>[java]</strong>&nbsp;<a href="http://blog.csdn.net/iukey/article/details/7300412#" title="view plain">view plain</a><a href="http://blog.csdn.net/iukey/article/details/7300412#" title="copy">copy</a><a href="http://blog.csdn.net/iukey/article/details/7300412#" title="print">print</a><a href="http://blog.csdn.net/iukey/article/details/7300412#" title="?">?</a><div style="position: absolute; left: 403px; top: 1115px; width: 22px; height: 12px; z-index: 99; border-image: initial; "><embed id="ZeroClipboardMovie_2" src="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="22" height="12" name="ZeroClipboardMovie_2" align="center" allowscriptaccess="always" allowfullscreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id=2&amp;width=22&amp;height=12" wmode="transparent"></div></div></div><ol start="1"><li style="border-width: initial; border-color: initial; background-color: #f5fae2; line-height: 18px; ">UIControlContentHorizontalAlignmentCenter&nbsp;&nbsp;</li><li style="border-width: initial; border-color: initial; background-color: #f5fae2; color: #555555; line-height: 18px; ">UIControlContentHorizontalAlignmentTop&nbsp;&nbsp;</li><li style="border-width: initial; border-color: initial; background-color: #f5fae2; line-height: 18px; ">UIControlContentHorizontalAlignmentBottom&nbsp;&nbsp;</li><li style="border-width: initial; border-color: initial; background-color: #f5fae2; color: #555555; line-height: 18px; ">UIControlContentHorizontalAlignmentFill&nbsp;&nbsp;</li></ol></div><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>事件通知</strong></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="white-space: pre; "><strong></strong>UIControl类提供了一个标准机制，来进行事件登记和接收。这令你可以指定你的控件在发生特定事件时，通知代理类的一个方法。如果要注册一个事件，可以使用addTarget方法：</span></p><div bg_java"="" style="width: 722px; line-height: 26px; text-align: left; "><div><div style="border-left-color: #999999; "><strong>[java]</strong>&nbsp;<a href="http://blog.csdn.net/iukey/article/details/7300412#" title="view plain">view plain</a><a href="http://blog.csdn.net/iukey/article/details/7300412#" title="copy">copy</a><a href="http://blog.csdn.net/iukey/article/details/7300412#" title="print">print</a><a href="http://blog.csdn.net/iukey/article/details/7300412#" title="?">?</a><div style="position: absolute; left: 403px; top: 1297px; width: 22px; height: 12px; z-index: 99; border-image: initial; "><embed id="ZeroClipboardMovie_3" src="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="22" height="12" name="ZeroClipboardMovie_3" align="center" allowscriptaccess="always" allowfullscreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id=3&amp;width=22&amp;height=12" wmode="transparent"></div></div></div><ol start="1"><li style="border-width: initial; border-color: initial; background-color: #f5fae2; line-height: 18px; ">[&nbsp;myControl&nbsp;addTarget:&nbsp;myDelegate&nbsp;&nbsp;&nbsp;</li><li style="border-width: initial; border-color: initial; background-color: #f5fae2; color: #555555; line-height: 18px; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;action:<span style="color: #646464; ">@selector</span>(myActionmethod:)&nbsp;&nbsp;</li><li style="border-width: initial; border-color: initial; background-color: #f5fae2; line-height: 18px; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;forControlEvents:UIControlEventValueChanged&nbsp;];&nbsp;&nbsp;</li></ol></div><span style="font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; ">事件可以用逻辑OR合并在一起，因此可以再一次单独的addTarget调用中指定多个事件。下列事件为基类UIControl所支持，除非另有说明，也适用于所有控件。</span><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><strong>UIControlEventTouchDown</strong></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; ">单点触摸按下事件：用户点触屏幕，或者又有新手指落下的时候。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><strong><strong>UIControlEventTouchDownRepeat</strong><br /></strong></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; ">多点触摸按下事件，点触计数大于1：用户按下第二、三、或第四根手指的时候。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><strong><strong><span style="white-space: pre; ">UIControlEventTouchDragInside</span></strong></strong></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="white-space: pre; ">当一次触摸在控件窗口内拖动时。</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="font-weight: bold; "><strong><span style="white-space: pre; ">UIControlEventTouchDragOutside</span></strong></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="white-space: pre; "><strong></strong>当一次触摸在控件窗口之外拖动时。</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="font-weight: bold; "><span style="white-space: pre; ">UIControlEventTouchDragEnter</span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="white-space: pre; "><strong></strong>当一次触摸从控件窗口之外拖动到内部时。</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="font-weight: bold; "><span style="white-space: pre; ">UIControlEventTouchDragExit</span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="white-space: pre; "><strong></strong>当一次触摸从控件窗口内部拖动到外部时。<strong><br /> </strong></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="font-weight: bold; "><span style="white-space: pre; ">UIControlEventTouchUpInside</span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="white-space: pre; ">所有在控件之内触摸抬起事件。</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="font-weight: bold; "><span style="white-space: pre; ">UIControlEventTouchUpOutside</span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="white-space: pre; "><strong></strong>所有在控件之外触摸抬起事件(点触必须开始与控件内部才会发送通知)。</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="font-weight: bold; "><span style="white-space: pre; ">UIControlEventTouchCancel</span></span><br /></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="white-space: pre; ">所有触摸取消事件，即一次触摸</span>因为放上了太多手指而被取消，或者被上锁或者电话呼叫打断。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="font-weight: bold; "><span style="white-space: pre; ">UIControlEventTouchChanged</span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="white-space: pre; ">当控件的值发生改变时，发送通知。用于滑块、分段控件、以及其他取值的控件。你可以配置滑块控件何时发送通知，在滑块被放下时发送，或者在被拖动时发送。</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="font-weight: bold; "><span style="white-space: pre; ">UIControlEventEditingDidBegin</span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="white-space: pre; ">当文本控件中开始编辑时发送通知。</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="font-weight: bold; "><span style="white-space: pre; ">UIControlEventEditingChanged</span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="white-space: pre; ">当文本控件中的文本被改变时发送通知。</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="font-weight: bold; "><span style="white-space: pre; ">UIControlEventEditingDidEnd</span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="white-space: pre; "><strong></strong>当文本控件中编辑结束时发送通知。</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="font-weight: bold; "><span style="white-space: pre; ">UIControlEventEditingDidOnExit</span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="white-space: pre; ">当文本控件内通过按下回车键（或等价行为）结束编辑时，发送通知。</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="font-weight: bold; "><span style="white-space: pre; ">UIControlEventAlltouchEvents</span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="white-space: pre; ">通知所有触摸事件。</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="font-weight: bold; "><span style="white-space: pre; ">UIControlEventAllEditingEvents</span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="white-space: pre; ">通知所有关于文本编辑的事件。</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="font-weight: bold; "><span style="white-space: pre; ">UIControlEventAllEvents</span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="white-space: pre; ">通知所有事件。</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="white-space: pre; ">除了默认事件以外，自定义控件类还可以用0x0F00</span>0000到0x0FFFFFFF之间的值，来定义他们自己的时间。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; ">要删除一个或多个事件的相应动作，可以使用UIControl类的removeTarget方法。使用nil值就可以将给定事件目标的所有动作删除：</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "></p><div bg_java"="" style="width: 722px; line-height: 26px; text-align: left; "><div><div style="border-left-color: #999999; "><strong>[java]</strong>&nbsp;<a href="http://blog.csdn.net/iukey/article/details/7300412#" title="view plain">view plain</a><a href="http://blog.csdn.net/iukey/article/details/7300412#" title="copy">copy</a><a href="http://blog.csdn.net/iukey/article/details/7300412#" title="print">print</a><a href="http://blog.csdn.net/iukey/article/details/7300412#" title="?">?</a><div style="position: absolute; left: 403px; top: 2435px; width: 22px; height: 12px; z-index: 99; border-image: initial; "><embed id="ZeroClipboardMovie_4" src="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="22" height="12" name="ZeroClipboardMovie_4" align="center" allowscriptaccess="always" allowfullscreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id=4&amp;width=22&amp;height=12" wmode="transparent"></div></div></div><ol start="1"><li style="border-width: initial; border-color: initial; background-color: #f5fae2; line-height: 18px; ">[&nbsp;myControl&nbsp;removeTarget:myDelegate&nbsp;&nbsp;&nbsp;</li><li style="border-width: initial; border-color: initial; background-color: #f5fae2; color: #555555; line-height: 18px; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;action:nil&nbsp;&nbsp;</li><li style="border-width: initial; border-color: initial; background-color: #f5fae2; line-height: 18px; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;forControlEvents:UIControlEventAllEvents];&nbsp;&nbsp;</li></ol></div><span style="font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; ">要取得关于一个控件所有指定动作的列表，可以使用allTargets方法。这个方法返回一个NSSet，其中包含事件的完整列表：</span><br style="font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; " /><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "></p><div bg_java"="" style="width: 722px; line-height: 26px; text-align: left; "><div><div style="border-left-color: #999999; "><strong>[java]</strong>&nbsp;<a href="http://blog.csdn.net/iukey/article/details/7300412#" title="view plain">view plain</a><a href="http://blog.csdn.net/iukey/article/details/7300412#" title="copy">copy</a><a href="http://blog.csdn.net/iukey/article/details/7300412#" title="print">print</a><a href="http://blog.csdn.net/iukey/article/details/7300412#" title="?">?</a><div style="position: absolute; left: 403px; top: 2600px; width: 22px; height: 12px; z-index: 99; border-image: initial; "><embed id="ZeroClipboardMovie_5" src="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="22" height="12" name="ZeroClipboardMovie_5" align="center" allowscriptaccess="always" allowfullscreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id=5&amp;width=22&amp;height=12" wmode="transparent"></div></div></div><ol start="1"><li style="border-width: initial; border-color: initial; background-color: #f5fae2; line-height: 18px; ">NSSet*&nbsp;myActions&nbsp;=&nbsp;[myConreol&nbsp;allTargets&nbsp;];&nbsp;&nbsp;</li></ol></div> <span style="font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; ">另外，你还可以用actionsForTarget方法，来获取针对某一特定事件目标的全部动作列表：</span><div bg_java"="" style="width: 722px; line-height: 26px; text-align: left; "><div><div style="border-left-color: #999999; "><strong>[java]</strong>&nbsp;<a href="http://blog.csdn.net/iukey/article/details/7300412#" title="view plain">view plain</a><a href="http://blog.csdn.net/iukey/article/details/7300412#" title="copy">copy</a><a href="http://blog.csdn.net/iukey/article/details/7300412#" title="print">print</a><a href="http://blog.csdn.net/iukey/article/details/7300412#" title="?">?</a><div style="position: absolute; left: 403px; top: 2704px; width: 22px; height: 12px; z-index: 99; border-image: initial; "><embed id="ZeroClipboardMovie_6" src="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="22" height="12" name="ZeroClipboardMovie_6" align="center" allowscriptaccess="always" allowfullscreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id=6&amp;width=22&amp;height=12" wmode="transparent"></div></div></div><ol start="1"><li style="border-width: initial; border-color: initial; background-color: #f5fae2; line-height: 18px; ">NSArray*&nbsp;myActions&nbsp;=&nbsp;[&nbsp;myControl&nbsp;actionForTarget:UIControlEventValueChanged&nbsp;];&nbsp;&nbsp;</li></ol></div><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; ">如果设计了一个自定义控件类，可以使用sendActionsForControlEvent方法，为基本的UIControl事件或自己的自定义事件发送通知。例如，如果你的控件值正在发生变化，就可以发送相应通知，通过控件的代码可以指定时间目标，这个通知将被传播到这些指定的目标。例：</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "></p><div bg_java"="" style="width: 722px; line-height: 26px; text-align: left; "><div><div style="border-left-color: #999999; "><strong>[java]</strong>&nbsp;<a href="http://blog.csdn.net/iukey/article/details/7300412#" title="view plain">view plain</a><a href="http://blog.csdn.net/iukey/article/details/7300412#" title="copy">copy</a><a href="http://blog.csdn.net/iukey/article/details/7300412#" title="print">print</a><a href="http://blog.csdn.net/iukey/article/details/7300412#" title="?">?</a><div style="position: absolute; left: 403px; top: 2859px; width: 22px; height: 12px; z-index: 99; border-image: initial; "><embed id="ZeroClipboardMovie_7" src="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="22" height="12" name="ZeroClipboardMovie_7" align="center" allowscriptaccess="always" allowfullscreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id=7&amp;width=22&amp;height=12" wmode="transparent"></div></div></div><ol start="1"><li style="border-width: initial; border-color: initial; background-color: #f5fae2; line-height: 18px; ">[&nbsp;self&nbsp;sendActionsForControlEvents:UIControlEventValueChanged&nbsp;];&nbsp;&nbsp;</li></ol></div><span style="font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; ">当委托类得到事件通知时，他将收到一个指向事件发送者的指针。下面的例子用于处理分段控件的事件，你的动作方法（action method）应遵循类似的处理方式：</span><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; "></p><div bg_java"="" style="width: 722px; line-height: 26px; text-align: left; "><div><div style="border-left-color: #999999; "><strong>[java]</strong>&nbsp;<a href="http://blog.csdn.net/iukey/article/details/7300412#" title="view plain">view plain</a><a href="http://blog.csdn.net/iukey/article/details/7300412#" title="copy">copy</a><a href="http://blog.csdn.net/iukey/article/details/7300412#" title="print">print</a><a href="http://blog.csdn.net/iukey/article/details/7300412#" title="?">?</a><div style="position: absolute; left: 403px; top: 2988px; width: 22px; height: 12px; z-index: 99; border-image: initial; "><embed id="ZeroClipboardMovie_8" src="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="22" height="12" name="ZeroClipboardMovie_8" align="center" allowscriptaccess="always" allowfullscreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id=8&amp;width=22&amp;height=12" wmode="transparent"></div></div></div><ol start="1"><li style="border-width: initial; border-color: initial; background-color: #f5fae2; line-height: 18px; ">-(<span style="color: blue; ">void</span>)&nbsp;myAction:(id)sender{&nbsp;&nbsp;</li><li style="border-width: initial; border-color: initial; background-color: #f5fae2; color: #555555; line-height: 18px; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;UISegmentedControl*&nbsp;control&nbsp;=&nbsp;(UISegmentedControl*)sender;&nbsp;&nbsp;</li><li style="border-width: initial; border-color: initial; background-color: #f5fae2; line-height: 18px; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue; ">if</span>(control&nbsp;==&nbsp;myControl1){&nbsp;&nbsp;</li><li style="border-width: initial; border-color: initial; background-color: #f5fae2; color: #555555; line-height: 18px; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/*查询控件得值*/&nbsp;&nbsp;</li><li style="border-width: initial; border-color: initial; background-color: #f5fae2; line-height: 18px; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/*响应myControl1的动作*/&nbsp;&nbsp;</li><li style="border-width: initial; border-color: initial; background-color: #f5fae2; color: #555555; line-height: 18px; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</li><li style="border-width: initial; border-color: initial; background-color: #f5fae2; line-height: 18px; ">}&nbsp;&nbsp;</li></ol></div><br style="font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; " /><span style="font-family: Arial; font-size: 15px; line-height: 26px; text-align: left; background-color: #ffffff; color: #ff0000; ">此文到此结束，如果你能耐心看看这篇文章，对你后面具体的控件会有事半功倍的效果。</span><img src ="http://www.blogjava.net/writegull/aggbug/376983.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/writegull/" target="_blank">writegull</a> 2012-04-28 17:21 <a href="http://www.blogjava.net/writegull/archive/2012/04/28/376983.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>iphone开发者证书装多台电脑的方法</title><link>http://www.blogjava.net/writegull/archive/2012/04/27/376746.html</link><dc:creator>writegull</dc:creator><author>writegull</author><pubDate>Fri, 27 Apr 2012 02:40:00 GMT</pubDate><guid>http://www.blogjava.net/writegull/archive/2012/04/27/376746.html</guid><wfw:comment>http://www.blogjava.net/writegull/comments/376746.html</wfw:comment><comments>http://www.blogjava.net/writegull/archive/2012/04/27/376746.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/writegull/comments/commentRss/376746.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/writegull/services/trackbacks/376746.html</trackback:ping><description><![CDATA[<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-indent: 27px; color: #494949; font-family: Arial, Helvetica, sans-serif; line-height: 22px; word-wrap: break-word; ">保存你的私钥，转移到其它系统</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-indent: 27px; color: #494949; font-family: Arial, Helvetica, sans-serif; line-height: 22px; word-wrap: break-word; ">将你的私钥安全的保存，如果你需要在多台电脑上开发或者重装你的操作系统的。如果没有私钥，那么将无法再Xcode签名或者在apple设备上测试应用。当一个CSR被生成，Keychain Access应用在你的登录keychain里面生成一个私钥，这个私钥是和你的用户账户关联的，如果在系统重装的时候是无法重新生成的。如果你希望在多个系统上做开发或者测试，那么你需要在所有你工作的系统之上导入你的私钥。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-indent: 27px; color: #494949; font-family: Arial, Helvetica, sans-serif; line-height: 22px; word-wrap: break-word; ">1、 导出私钥和数字证书是为安全保存和能够在多台电脑上进行工作。打开Keychain Access应用选择&#8217;KEY&#8217;分类。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-indent: 27px; color: #494949; font-family: Arial, Helvetica, sans-serif; line-height: 22px; word-wrap: break-word; ">2、 右键点击和你iphone开发证书关联的私钥，并在弹出菜单中选择导出选项。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-indent: 27px; color: #494949; font-family: Arial, Helvetica, sans-serif; line-height: 22px; word-wrap: break-word; ">3、 使用(.p12)保存包含了你个人信息的钥匙。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-indent: 27px; color: #494949; font-family: Arial, Helvetica, sans-serif; line-height: 22px; word-wrap: break-word; ">4、 你将会被提示创建一个密码。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-indent: 27px; color: #494949; font-family: Arial, Helvetica, sans-serif; line-height: 22px; word-wrap: break-word; ">现在可以通过.p12文件在不同系统之间传输。双击.p12在其他系统上进行安装。输入你在step4输入的密码。</p><img src ="http://www.blogjava.net/writegull/aggbug/376746.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/writegull/" target="_blank">writegull</a> 2012-04-27 10:40 <a href="http://www.blogjava.net/writegull/archive/2012/04/27/376746.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title> 利用xcode生成的app生成可以在iphone和itouch上运行的ipa安装包</title><link>http://www.blogjava.net/writegull/archive/2012/04/26/376651.html</link><dc:creator>writegull</dc:creator><author>writegull</author><pubDate>Thu, 26 Apr 2012 01:50:00 GMT</pubDate><guid>http://www.blogjava.net/writegull/archive/2012/04/26/376651.html</guid><wfw:comment>http://www.blogjava.net/writegull/comments/376651.html</wfw:comment><comments>http://www.blogjava.net/writegull/archive/2012/04/26/376651.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/writegull/comments/commentRss/376651.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/writegull/services/trackbacks/376651.html</trackback:ping><description><![CDATA[<p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="font-size: large; ">&nbsp; &nbsp;在编译好的真机版目录下的.app文件，至于生成真机可以运行的app的方法，有两种方式，一种是交99美元获得一个证书，另外一种是破解的方式，在此不再详述，本文假设你已经生成了真机上可以运行的app包了（<span style="color: #ff0000; ">app包实际上是一个文件夹</span>）</span></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="font-size: large; ">&nbsp;&nbsp; 假设此安装包的名称是 hello.app，点击右键，选择 显示包内容，这样就可以打开这个hello.app文件夹了，在此文件夹中有一个info.plist文件，打开它，新增加一个名为SignerIdentity的key字段，内容为Apple iPhone OS Application Signing。</span></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="font-size: large; ">然后将.app拖到itunes就生成ipa了.默认名字应该是hello.ipa</span></p><p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><span style="font-size: large; ">如果要将此ipa分发出去，可以在itunes中的hello.ipa文件上点击鼠标右键，选择 在finder中显示，就可以得到生成后的ipa安装文件了</span></p><img src ="http://www.blogjava.net/writegull/aggbug/376651.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/writegull/" target="_blank">writegull</a> 2012-04-26 09:50 <a href="http://www.blogjava.net/writegull/archive/2012/04/26/376651.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>不用99 iphone超简单真机调试</title><link>http://www.blogjava.net/writegull/archive/2012/04/26/376648.html</link><dc:creator>writegull</dc:creator><author>writegull</author><pubDate>Thu, 26 Apr 2012 01:42:00 GMT</pubDate><guid>http://www.blogjava.net/writegull/archive/2012/04/26/376648.html</guid><wfw:comment>http://www.blogjava.net/writegull/comments/376648.html</wfw:comment><comments>http://www.blogjava.net/writegull/archive/2012/04/26/376648.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/writegull/comments/commentRss/376648.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/writegull/services/trackbacks/376648.html</trackback:ping><description><![CDATA[<span style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; ">1.在Windows下打开/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.1.sdk/SDKSettings.plist ，找到CODE_SIGNING-REQUIRED 将它对应的值改为NO。</span><br style="outline-style: none; outline-width: initial; outline-color: initial; color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; " /><br style="outline-style: none; outline-width: initial; outline-color: initial; color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; " /><span style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; ">2.打开Xcode创建／打开一个项目，把Code signing identity和Any ios 对应的值改为Don&#8217;t Code Sign&nbsp;</span><br style="outline-style: none; outline-width: initial; outline-color: initial; color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; " /><br style="outline-style: none; outline-width: initial; outline-color: initial; color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; " /><span style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff; ">3.Build and Run!Enjoy!</span><img src ="http://www.blogjava.net/writegull/aggbug/376648.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/writegull/" target="_blank">writegull</a> 2012-04-26 09:42 <a href="http://www.blogjava.net/writegull/archive/2012/04/26/376648.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>iphone开发app icon 控件标准界面 大小，尺寸</title><link>http://www.blogjava.net/writegull/archive/2012/04/26/376645.html</link><dc:creator>writegull</dc:creator><author>writegull</author><pubDate>Thu, 26 Apr 2012 01:31:00 GMT</pubDate><guid>http://www.blogjava.net/writegull/archive/2012/04/26/376645.html</guid><wfw:comment>http://www.blogjava.net/writegull/comments/376645.html</wfw:comment><comments>http://www.blogjava.net/writegull/archive/2012/04/26/376645.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/writegull/comments/commentRss/376645.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/writegull/services/trackbacks/376645.html</trackback:ping><description><![CDATA[1.程序图标app icon ------ 普屏 icon.png[57*57] 视网膜屏icon@2x.png[114*114]<br /><br /><span style="line-height: normal; color: #898989; text-align: left; background-color: #2e3033; font-family: Verdana; font-size: 13px; "><h1>iPhone开发中经常用到的控件尺寸大集合</h1><strong>Sizes of iPhone UI Elements</strong><br /><br /><blockquote style="font-size: 1em; margin-top: auto; margin-right: 0px; margin-bottom: auto; margin-left: 35px; "><br /><img alt="iPhone UI 设计的一些标准尺寸1 - 懒得喘气 - 懒得喘气的博客" src="http://www.idev101.com/code/User_Interface/sizes.png" border="0" height="700" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; max-width: 100%; " /><br /><table cellspacing="0" cellpadding="0" style="line-height: 23px; width: 1036px; "><tbody><tr><td style="line-height: 21px; font-size: 12px; ">Element</td><td style="line-height: 21px; font-size: 12px; ">Size (in points)</td></tr><tr><td style="line-height: 21px; font-size: 12px; ">Window (including status bar)</td><td style="line-height: 21px; font-size: 12px; ">320 x 480 pts</td></tr><tr><td style="line-height: 21px; font-size: 12px; ">Status Bar<br />(<a id="url_1" target="_blank" rel="nofollow" href="http://www.idev101.com/code/User_Interface/UIStatusBar.html" style="color: #a91b33; text-decoration: none; ">How to hide the status bar</a>)</td><td style="line-height: 21px; font-size: 12px; ">20 pts</td></tr><tr><td style="line-height: 21px; font-size: 12px; ">View inside window&nbsp;<br />(visible status bar)</td><td style="line-height: 21px; font-size: 12px; ">320 x 460</td></tr><tr><td style="line-height: 21px; font-size: 12px; ">Navigation Bar</td><td style="line-height: 21px; font-size: 12px; ">44 pts</td></tr><tr><td style="line-height: 21px; font-size: 12px; ">Nav Bar Image /<br />Toolbar Image</td><td style="line-height: 21px; font-size: 12px; ">up to 20 x 20 pts (transparent PNG)</td></tr><tr><td style="line-height: 21px; font-size: 12px; ">Tab Bar</td><td style="line-height: 21px; font-size: 12px; ">49 pts</td></tr><tr><td style="line-height: 21px; font-size: 12px; ">Tab Bar Icon</td><td style="line-height: 21px; font-size: 12px; ">up to 30 x 30 pts (transparent PNGs)</td></tr><tr><td style="line-height: 21px; font-size: 12px; ">Text Field</td><td style="line-height: 21px; font-size: 12px; ">31 pts</td></tr><tr><td style="line-height: 21px; font-size: 12px; ">Height of a view inside&nbsp;<br />a navigation bar</td><td style="line-height: 21px; font-size: 12px; ">416 pts</td></tr><tr><td style="line-height: 21px; font-size: 12px; ">Height of a view inside&nbsp;<br />a tab bar</td><td style="line-height: 21px; font-size: 12px; ">411 pts</td></tr><tr><td style="line-height: 21px; font-size: 12px; ">Height of a view inside&nbsp;<br />a navbar&nbsp;<em>and</em>&nbsp;a tab bar</td><td style="line-height: 21px; font-size: 12px; ">367 pts</td></tr><tr><td style="line-height: 21px; font-size: 12px; ">Portrait Keyboard height</td><td style="line-height: 21px; font-size: 12px; ">216 pts</td></tr><tr><td style="line-height: 21px; font-size: 12px; ">Landscape Keyboard height</td><td style="line-height: 21px; font-size: 12px; ">140 pts</td></tr></tbody></table><strong>Points vs. Pixels</strong><br />The iPhone 4 introduced a high resolution display with twice the pixels of previous iPhones. However you don't have to modify your code to support high-res displays; the coordinate system goes by points rather than pixels, and the dimensions in points of the screen and all UI elements remain the same.<br />iOS 4 supports high resolution displays (like the iPhone 4 display) via the&nbsp;<span style="color: #254b90; ">scale</span>&nbsp;property on UIScreen, UIView, UIImage, and CALayer classes. If the object is displaying high-res content, its scale property is set to 2.0. Otherwise it defaults to 1.0.<br />All you need to do to support high-res displays is to provide @2x versions of the images in your project. See the&nbsp;<a id="url_2" target="_blank" rel="nofollow" href="http://www.idev101.com/code/Distribution/updating_ios4.html#l2" style="color: #a91b33; text-decoration: none; ">checklist for updating to iOS4</a>&nbsp;or Apple documentation for&nbsp;<a id="url_3" target="_blank" rel="nofollow" href="http://developer.apple.com/library/ios/documentation/2DDrawing/Conceptual/DrawingPrintingiOS/SupportingHiResScreens/SupportingHiResScreens.html" style="color: #a91b33; text-decoration: none; ">Supporting High Resolution Screens</a>&nbsp;for more info.<br /><strong>Adjusting Sizes</strong><br />Click here to see how to adjust&nbsp;<a id="url_4" target="_blank" rel="nofollow" href="http://www.idev101.com/code/User_Interface/view_frames_bounds.html" style="color: #a91b33; text-decoration: none; ">View Frames and Bounds</a>.<br /><strong>Additional References</strong><br /><ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 15px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><li>Apple Documentation:&nbsp;<a id="url_5" target="_blank" rel="nofollow" href="http://developer.apple.com/library/ios/documentation/2DDrawing/Conceptual/DrawingPrintingiOS/GraphicsDrawingOverview/GraphicsDrawingOverview.html#//apple_ref/doc/uid/TP40010156-CH14-SW7" style="color: #a91b33; text-decoration: none; ">Points vs. Pixels</a></li><li>Apple Documentation:&nbsp;<a id="url_6" target="_blank" rel="nofollow" href="http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIBarButtonItem_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40007519-CH3-SW3" style="color: #a91b33; text-decoration: none; ">UIBarButtonItem Class Reference</a>&nbsp;says "Typically, the size of a toolbar and navigation bar image is 20 x 20 points."</li><li>Apple Documentation:&nbsp;<a id="url_7" target="_blank" rel="nofollow" href="http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UITabBarItem_Class/Reference/Reference.html#//apple_ref/occ/instm/UITabBarItem/initWithTitle:image:tag:" style="color: #a91b33; text-decoration: none; ">UITabBarItem Class Reference</a>&nbsp;says "The size of an tab bar image is typically 30 x 30 points."</li></ul><div></div></blockquote></span><span style="line-height: normal; color: #898989; text-align: left; background-color: #2e3033; font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; "><table border="0" cellspacing="0" cellpadding="5" style="line-height: 23px; border-top-style: solid; border-top-color: #9bb3cd; border-left-style: solid; border-left-color: #9bb3cd; margin-bottom: 4em; "><caption style="margin-bottom: 0.417em; text-align: left; "><strong style="font-size: 13px; ">Table 8-1</strong>&nbsp;&nbsp;Custom icons and images</caption><tbody><tr><th scope="col" style="text-align: left; background-color: #93a5bb; padding-top: 0.3em; padding-right: 0.667em; padding-bottom: 0.3em; padding-left: 0.667em; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; font-size: 13px; color: #ffffff; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-width: 1px; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0.33em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Description</p></th><th scope="col" style="text-align: left; background-color: #93a5bb; padding-top: 0.3em; padding-right: 0.667em; padding-bottom: 0.3em; padding-left: 0.667em; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; font-size: 13px; color: #ffffff; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-width: 1px; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0.33em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Size for iPhone and iPod touch (in pixels)</p></th><th scope="col" style="text-align: left; background-color: #93a5bb; padding-top: 0.3em; padding-right: 0.667em; padding-bottom: 0.3em; padding-left: 0.667em; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; font-size: 13px; color: #ffffff; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-width: 1px; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0.33em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Size for iPad (in pixels)</p></th><th scope="col" style="text-align: left; background-color: #93a5bb; padding-top: 0.3em; padding-right: 0.667em; padding-bottom: 0.3em; padding-left: 0.667em; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; font-size: 13px; color: #ffffff; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-width: 1px; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0.33em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Guidelines</p></th></tr><tr><td scope="row" style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Application icon (<strong style="line-height: 23px; ">required</strong>&nbsp;for all apps)</p></td><td style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">57 x 57</p><p style="line-height: normal; margin-top: 0.417em; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">114 x 114 (high resolution)</p></td><td style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">72 x 72</p></td><td style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="margin-top: 0px; margin-bottom: 0.833em; padding-bottom: 0.833em; vertical-align: top; "><a rel="nofollow" href="http://developer.apple.com/library/ios/documentation/userexperience/conceptual/mobilehig/IconsImages/IconsImages.html#//apple_ref/doc/uid/TP40006556-CH14-SW2" style="color: #3366cc; line-height: 23px; text-decoration: none; ">&#8220;Application Icons&#8221;</a></span></p></td></tr><tr><td scope="row" style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">App Store icon (<strong style="line-height: 23px; ">required</strong>&nbsp;for all apps)</p></td><td style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">512 x 512</p></td><td style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">512 x 512</p></td><td style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="margin-top: 0px; margin-bottom: 0.833em; padding-bottom: 0.833em; vertical-align: top; "><a rel="nofollow" href="http://developer.apple.com/library/ios/documentation/userexperience/conceptual/mobilehig/IconsImages/IconsImages.html#//apple_ref/doc/uid/TP40006556-CH14-SW2" style="color: #3366cc; line-height: 23px; text-decoration: none; ">&#8220;Application Icons&#8221;</a></span></p></td></tr><tr><td scope="row" style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Launch image (<strong style="line-height: 23px; ">required</strong>&nbsp;for all apps)</p></td><td style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">320 x 480</p><p style="line-height: normal; margin-top: 0.417em; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">640 x 960 (high resolution)</p></td><td style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">For portrait:</p><ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 2.5em; padding-top: 0px; padding-right: 0px; padding-bottom: 0.5em; padding-left: 0px; list-style-type: none; list-style-position: outside; list-style-image: initial; "><li style="margin-top: 1px; "><p style="line-height: normal; margin-top: 0.667em; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; display: inline; ">768 x 1004</p></li></ul><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">For landscape:</p><ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 2.5em; padding-top: 0px; padding-right: 0px; padding-bottom: 0.5em; padding-left: 0px; list-style-type: none; list-style-position: outside; list-style-image: initial; "><li style="margin-top: 1px; "><p style="line-height: normal; margin-top: 0.667em; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; display: inline; ">1024 x 748</p></li></ul></td><td style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="margin-top: 0px; margin-bottom: 0.833em; padding-bottom: 0.833em; vertical-align: top; "><a rel="nofollow" href="http://developer.apple.com/library/ios/documentation/userexperience/conceptual/mobilehig/IconsImages/IconsImages.html#//apple_ref/doc/uid/TP40006556-CH14-SW5" style="color: #3366cc; line-height: 23px; text-decoration: none; ">&#8220;Launch Images&#8221;</a></span></p></td></tr><tr><td scope="row" style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Small icon for Spotlight search results and Settings (recommended)</p></td><td style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">29 x 29</p><p style="line-height: normal; margin-top: 0.417em; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">58 x 58 (high resolution)</p></td><td style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">50 x 50 for Spotlight search results</p><p style="line-height: normal; margin-top: 0.417em; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">29 x 29 for Settings</p></td><td style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="margin-top: 0px; margin-bottom: 0.833em; padding-bottom: 0.833em; vertical-align: top; "><a rel="nofollow" href="http://developer.apple.com/library/ios/documentation/userexperience/conceptual/mobilehig/IconsImages/IconsImages.html#//apple_ref/doc/uid/TP40006556-CH14-SW10" style="color: #3366cc; line-height: 23px; text-decoration: none; ">&#8220;Small Icons&#8221;</a></span></p></td></tr><tr><td scope="row" style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Document icon (recommended for custom document types)</p></td><td style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">22 x 29</p><p style="line-height: normal; margin-top: 0.417em; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">44 x 58 (high resolution)</p></td><td style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">64 x 64</p><p style="line-height: normal; margin-top: 0.417em; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">320 x 320</p></td><td style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="margin-top: 0px; margin-bottom: 0.833em; padding-bottom: 0.833em; vertical-align: top; "><a rel="nofollow" href="http://developer.apple.com/library/ios/documentation/userexperience/conceptual/mobilehig/IconsImages/IconsImages.html#//apple_ref/doc/uid/TP40006556-CH14-SW15" style="color: #3366cc; line-height: 23px; text-decoration: none; ">&#8220;Document Icons&#8221;</a></span></p></td></tr><tr><td scope="row" style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Web clip icon (recommended for web apps and websites)</p></td><td style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">57 x 57</p><p style="line-height: normal; margin-top: 0.417em; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">114 x 114 (high resolution)</p></td><td style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">72 x 72</p></td><td style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="margin-top: 0px; margin-bottom: 0.833em; padding-bottom: 0.833em; vertical-align: top; "><a rel="nofollow" href="http://developer.apple.com/library/ios/documentation/userexperience/conceptual/mobilehig/IconsImages/IconsImages.html#//apple_ref/doc/uid/TP40006556-CH14-SW11" style="color: #3366cc; line-height: 23px; text-decoration: none; ">&#8220;Web Clip Icons&#8221;</a></span></p></td></tr><tr><td scope="row" style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Toolbar and navigation bar icon (optional)</p></td><td style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Approximately 20 x 20</p><p style="line-height: normal; margin-top: 0.417em; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Approximately 40 x 40 (high resolution)</p></td><td style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Approximately 20 x 20</p></td><td style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="margin-top: 0px; margin-bottom: 0.833em; padding-bottom: 0.833em; vertical-align: top; "><a rel="nofollow" href="http://developer.apple.com/library/ios/documentation/userexperience/conceptual/mobilehig/IconsImages/IconsImages.html#//apple_ref/doc/uid/TP40006556-CH14-SW8" style="color: #3366cc; line-height: 23px; text-decoration: none; ">&#8220;Icons for Navigation Bars, Toolbars, and Tab Bars&#8221;</a></span></p></td></tr><tr><td scope="row" style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Tab bar icon (optional)</p></td><td style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Approximately 30 x 30</p><p style="line-height: normal; margin-top: 0.417em; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Approximately 60 x 60 (high resolution)</p></td><td style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Approximately 30 x 30</p></td><td style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="margin-top: 0px; margin-bottom: 0.833em; padding-bottom: 0.833em; vertical-align: top; "><a rel="nofollow" href="http://developer.apple.com/library/ios/documentation/userexperience/conceptual/mobilehig/IconsImages/IconsImages.html#//apple_ref/doc/uid/TP40006556-CH14-SW8" style="color: #3366cc; line-height: 23px; text-decoration: none; ">&#8220;Icons for Navigation Bars, Toolbars, and Tab Bars&#8221;</a></span></p></td></tr><tr><td scope="row" style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Newsstand icon for the App Store (<strong style="line-height: 23px; ">required</strong>for Newsstand apps)</p></td><td style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">At least 512 pixels on the longest edge</p></td><td style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">At least 512 pixels on the longest edge</p></td><td style="padding-top: 0.667em; padding-right: 0.667em; padding-bottom: 0.667em; padding-left: 0.667em; font-size: 13px; vertical-align: middle; border-bottom-style: solid; border-bottom-color: #9bb3cd; border-right-style: solid; border-right-color: #9bb3cd; "><p style="line-height: normal; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="margin-top: 0px; margin-bottom: 0.833em; padding-bottom: 0.833em; vertical-align: top; "><a rel="nofollow" href="http://developer.apple.com/library/ios/documentation/userexperience/conceptual/mobilehig/IconsImages/IconsImages.html#//apple_ref/doc/uid/TP40006556-CH14-SW12" style="color: #3366cc; line-height: 23px; text-decoration: none; ">&#8220;Newsstand Icons&#8221;</a></span></p></td></tr></tbody></table></span><img src ="http://www.blogjava.net/writegull/aggbug/376645.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/writegull/" target="_blank">writegull</a> 2012-04-26 09:31 <a href="http://www.blogjava.net/writegull/archive/2012/04/26/376645.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>strong，retain，weak，assign自匹配宏</title><link>http://www.blogjava.net/writegull/archive/2012/04/23/376383.html</link><dc:creator>writegull</dc:creator><author>writegull</author><pubDate>Mon, 23 Apr 2012 07:49:00 GMT</pubDate><guid>http://www.blogjava.net/writegull/archive/2012/04/23/376383.html</guid><wfw:comment>http://www.blogjava.net/writegull/comments/376383.html</wfw:comment><comments>http://www.blogjava.net/writegull/archive/2012/04/23/376383.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/writegull/comments/commentRss/376383.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/writegull/services/trackbacks/376383.html</trackback:ping><description><![CDATA[<p style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 25px; font-family: arial, helvetica, clean, sans-serif; text-align: left; background-color: #f9f9f9; font-size: small; ">有时我们写个代码开源出来给别人用时，会被其他开发者抱怨编译不了，很多情况是版本的问题，尤其现在ARC的出现后关于weak，strong的问题让人头疼。<br style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " />有个开源代码这里做的很不错，就是<strong style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; "><a title="MBProgressHUD" href="https://github.com/jdg/MBProgressHUD" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #666666; text-decoration: none; ">MBProgressHUD</a></strong><br style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " />看下他是怎么做的：</p><ol style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: arial, helvetica, clean, sans-serif; line-height: 16px; text-align: left; background-color: #f9f9f9; font-size: small; "><li style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 20px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: decimal; "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #880000; ">#ifndef</span><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">&nbsp;MB_STRONG</span></li><li style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 20px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: decimal; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #eeeeee; background-position: initial initial; background-repeat: initial initial; "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #880000; ">#if&nbsp;__has_feature(objc_arc)</span></li><li style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 20px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: decimal; "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #880000; ">#define</span><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">&nbsp;MB_STRONG&nbsp;strong</span></li><li style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 20px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: decimal; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #eeeeee; background-position: initial initial; background-repeat: initial initial; "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #880000; ">#else</span></li><li style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 20px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #880000; ">#define</span><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">&nbsp;MB_STRONG&nbsp;retain</span></li><li style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 20px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: decimal; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #eeeeee; background-position: initial initial; background-repeat: initial initial; "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #880000; ">#endif</span></li><li style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 20px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: decimal; "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #880000; ">#endif</span></li><li style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 20px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: decimal; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #eeeeee; background-position: initial initial; background-repeat: initial initial; ">&nbsp;</li><li style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 20px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: decimal; "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #880000; ">#ifndef</span><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">&nbsp;MB_WEAK</span></li><li style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 20px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #eeeeee; background-position: initial initial; background-repeat: initial initial; "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #880000; ">#if&nbsp;__has_feature(objc_arc_weak)</span></li><li style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 20px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: decimal; "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #880000; ">#define</span><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">&nbsp;MB_WEAK&nbsp;weak</span></li><li style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 20px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: decimal; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #eeeeee; background-position: initial initial; background-repeat: initial initial; "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #880000; ">#elif</span><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">&nbsp;__has_feature</span><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #666600; ">(</span><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">objc_arc</span><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #666600; ">)</span></li><li style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 20px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: decimal; "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #880000; ">#define</span><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">&nbsp;MB_WEAK&nbsp;unsafe_unretained</span></li><li style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 20px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: decimal; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #eeeeee; background-position: initial initial; background-repeat: initial initial; "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #880000; ">#else</span></li><li style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 20px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #880000; ">#define</span><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">&nbsp;MB_WEAK&nbsp;assign</span></li><li style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 20px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: decimal; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #eeeeee; background-position: initial initial; background-repeat: initial initial; "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #880000; ">#endif</span></li><li style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 20px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: decimal; "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #880000; ">#endif</span></li></ol><p style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 25px; font-family: arial, helvetica, clean, sans-serif; text-align: left; background-color: #f9f9f9; font-size: small; ">非ARC的retain，相当于ARC的strong<br style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " />iOS5的ARC中weak能在销毁时自动赋值nil，这是iOS4.x上使用ARC不具备，所以用的unsafe,非ARC自然是assign</p><img src ="http://www.blogjava.net/writegull/aggbug/376383.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/writegull/" target="_blank">writegull</a> 2012-04-23 15:49 <a href="http://www.blogjava.net/writegull/archive/2012/04/23/376383.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>release跟nil有什么区别</title><link>http://www.blogjava.net/writegull/archive/2012/04/20/375394.html</link><dc:creator>writegull</dc:creator><author>writegull</author><pubDate>Fri, 20 Apr 2012 09:40:00 GMT</pubDate><guid>http://www.blogjava.net/writegull/archive/2012/04/20/375394.html</guid><wfw:comment>http://www.blogjava.net/writegull/comments/375394.html</wfw:comment><comments>http://www.blogjava.net/writegull/archive/2012/04/20/375394.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/writegull/comments/commentRss/375394.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/writegull/services/trackbacks/375394.html</trackback:ping><description><![CDATA[<span style="font-family: Verdana; line-height: normal; background-color: #ffffff; font-size: 14pt; ">release 是将内存引用计数-1&nbsp;&nbsp;nil 直接赋值为0&nbsp;&nbsp; 除非这个指针指向的空间被释放&nbsp;&nbsp;否则就是内存泄露<br /><br /></span><span style="font-family: Verdana; line-height: normal; background-color: #ffffff; font-size: 14pt; ">nil是表示0x0，可以理解为空指针。release是释放内存。</span><br style="font-family: Verdana; font-size: 13px; line-height: normal; background-color: #ffffff; " /><span style="font-family: Verdana; line-height: normal; background-color: #ffffff; font-size: 14pt; ">例如：你开辟了一块内存p=[[nsobject alloc] init]; 这个时候p是指向这块内存区域的，如果你直接p=nil，会造成这块内存没有被释放，内存泄露。 如果[p release]释放了内存，但是p还是指向这个内存地址，如果在操作p会出现EXC_BAD_ACCESS。正确的做法应该是释放后，把p指向nil</span><img src ="http://www.blogjava.net/writegull/aggbug/375394.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/writegull/" target="_blank">writegull</a> 2012-04-20 17:40 <a href="http://www.blogjava.net/writegull/archive/2012/04/20/375394.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>iPhone UIView的学习</title><link>http://www.blogjava.net/writegull/archive/2012/04/20/375331.html</link><dc:creator>writegull</dc:creator><author>writegull</author><pubDate>Fri, 20 Apr 2012 02:37:00 GMT</pubDate><guid>http://www.blogjava.net/writegull/archive/2012/04/20/375331.html</guid><wfw:comment>http://www.blogjava.net/writegull/comments/375331.html</wfw:comment><comments>http://www.blogjava.net/writegull/archive/2012/04/20/375331.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/writegull/comments/commentRss/375331.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/writegull/services/trackbacks/375331.html</trackback:ping><description><![CDATA[<h1>概述</h1><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; line-height: 25px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; ">UIView对象在屏幕中定义了一个复杂区域和界面来管理这个区域的内容</p><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">视图的职责：</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">画图和动画。</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">布局和子视图管理。</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; line-height: 25px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; ">事件处理。</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; line-height: 25px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; ">&nbsp;</p><h1>1、创建一个视图对象</h1><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">CGRect viewRect = CGRectMake(10,10,100,100);</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">UIView* myView = [[UIView alloc] initWithFrame:viewRect];</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">[self.window addSubview :myView];//将视图作为子视图添加到window中</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><h1>2、动画</h1><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">改变一些视图属性将会使用到动画，改变属性时创建一个动画，用于给用户传递在较短时间内的变化。UIView类做了动画展现的大部分工作，但是你仍然需要声明哪种属性改变的时候，你需要动画效果。有两种不同的类型来初始化动画</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">下面的UIView属性支持动画：</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">frame,bounds,center,transform,alpha,backgroundColor,contentStretch</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">在iOS 4之后，使用block-based动画方法（推荐使用）</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">使用 开始/提交方式（begin/commit）</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><h1>3、管理视图的层次结构</h1><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">superview属性：</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">subviews属性：</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">window属性：</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">-addSubview方法</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">-bringSubviewToFront:(UIView *)veiw方法，将view视图移到层次结构的最顶端，使得其得以展示</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">-sendSubviewToBack:(UIView *)veiw方法,和上面方法正好相反</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">-removeFromSupview方法，</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">-insertSubview:(UIView *)view atIndex:(Interger)index方法</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">-insertSubview:(UIView *)view aboveSubview(UIView *)siblingView 方法</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">-insertSubview:(UIView *)view belowSubview(UIView *)siblingView 方法</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">-exchangeSubviewAtIndex:(NSInteger)index1 withSubviewAtIndex:(NSInteger)index2方法</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">-isDescendantOfView:(UIView *)view方法，判断view是不是指定视图的子视图</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><h1>4、子视图的布局(layout)</h1><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">-layoutSubviews方法，这个方法，默认没有做任何事情，需要子类进行重写</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">-setNeedsLayout方法</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">-layoutIfNeeded方法,立即对子视图进行布局</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><h1>5、画/更新视图</h1><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">-drawRect:(CGRect)rect方法</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">-setNeedsDisplay</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">-setNeedsDisplayInRect:(CGRect)invalidRect方法</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><h1>6、以块展现动画的方式（animating views with block）</h1><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">+ animateWithDuration:delay:options:animations:completion:</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">+ animateWithDuration:animations:completion:</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">+ animateWithDuration:animations:</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">+ transitionWithView:duration:options:animations:completion:</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; line-height: 25px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; ">+ transitionFromView:toView:duration:options:completion:</p><h1>7、在视图和坐标系统之间转换</h1><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">-convertPoint:toView</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">-convetPoint:fromView</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">-convertRect:toView</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">-convertRect:fromView</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><h1>8、跟踪视图相关的改变</h1><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">-didAddSubview:</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">-willRemoveSubview:</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">-willMoveToSuperview</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">-didMoveToSuperview</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">-willMoveToWindow:</span><br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 10px; color: #404040; font-family: arial, sans-serif, verdana, helvetica; text-align: left; background-color: #fafafa; " /><span style="color: #404040; font-family: arial, sans-serif, verdana, helvetica; line-height: 25px; text-align: left; background-color: #fafafa; ">-didMoveToWindow</span><img src ="http://www.blogjava.net/writegull/aggbug/375331.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/writegull/" target="_blank">writegull</a> 2012-04-20 10:37 <a href="http://www.blogjava.net/writegull/archive/2012/04/20/375331.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>调用系统提示音教程</title><link>http://www.blogjava.net/writegull/archive/2012/04/16/374729.html</link><dc:creator>writegull</dc:creator><author>writegull</author><pubDate>Mon, 16 Apr 2012 06:23:00 GMT</pubDate><guid>http://www.blogjava.net/writegull/archive/2012/04/16/374729.html</guid><wfw:comment>http://www.blogjava.net/writegull/comments/374729.html</wfw:comment><comments>http://www.blogjava.net/writegull/archive/2012/04/16/374729.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/writegull/comments/commentRss/374729.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/writegull/services/trackbacks/374729.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 目前做的一个项目里用到了提示音，但是又不想添加提示音到库里，便开始研究调用系统自带的提示音，最后终于找到了。开始在CC上查发现好像很多人都在问，但没人回答，我就把自己查到的东西和写的一个demo给大家分享下吧首先要在工程里加入Audio Toolbox framework这个库，然后在需要调用的文件里#import &lt;AudioToolbox/AudioToolbox.h&gt;最后在需要播...&nbsp;&nbsp;<a href='http://www.blogjava.net/writegull/archive/2012/04/16/374729.html'>阅读全文</a><img src ="http://www.blogjava.net/writegull/aggbug/374729.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/writegull/" target="_blank">writegull</a> 2012-04-16 14:23 <a href="http://www.blogjava.net/writegull/archive/2012/04/16/374729.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>UIScrollView的滑动</title><link>http://www.blogjava.net/writegull/archive/2012/04/12/373987.html</link><dc:creator>writegull</dc:creator><author>writegull</author><pubDate>Thu, 12 Apr 2012 08:57:00 GMT</pubDate><guid>http://www.blogjava.net/writegull/archive/2012/04/12/373987.html</guid><wfw:comment>http://www.blogjava.net/writegull/comments/373987.html</wfw:comment><comments>http://www.blogjava.net/writegull/archive/2012/04/12/373987.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/writegull/comments/commentRss/373987.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/writegull/services/trackbacks/373987.html</trackback:ping><description><![CDATA[<p style="line-height: normal; color: #625b49; font-family: Arial; background-color: #ffffff; ">在使用UIScrollView和它的子类UITableView时，有时需要在不同操作状态下，做不同的响应。</p><p style="line-height: normal; color: #625b49; font-family: Arial; background-color: #ffffff; ">如何截获这些状态，如正在滚动，滚动停止等，使用<a target="_blank" href="http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIScrollViewDelegate_Protocol/Reference/UIScrollViewDelegate.html" style="font-size: 12px; color: #625b49; ">UIScrollViewDelegate_Protocol</a>。</p><p style="line-height: normal; color: #625b49; font-family: Arial; background-color: #ffffff; "><br /></p><p style="line-height: normal; color: #625b49; font-family: Arial; background-color: #ffffff; ">@interface SampleClass: UITableViewController&lt;UIScrollViewDelegate&gt; {</p><p style="line-height: normal; color: #625b49; font-family: Arial; background-color: #ffffff; ">...<br /></p><p style="line-height: normal; color: #625b49; font-family: Arial; background-color: #ffffff; ">}</p><p style="line-height: normal; color: #625b49; font-family: Arial; background-color: #ffffff; ">...<br /></p><p style="line-height: normal; color: #625b49; font-family: Arial; background-color: #ffffff; ">@end<br /></p><p style="line-height: normal; color: #625b49; font-family: Arial; background-color: #ffffff; "><br /></p><p style="line-height: normal; color: #625b49; font-family: Arial; background-color: #ffffff; ">@implement SampleClass<br /></p><p style="line-height: normal; color: #625b49; font-family: Arial; background-color: #ffffff; ">...<br /></p><p style="line-height: normal; color: #625b49; font-family: Arial; background-color: #ffffff; ">#pragma mark -<br />#pragma mark UIScrollViewDelegate<br /></p><p style="line-height: normal; color: #625b49; font-family: Arial; background-color: #ffffff; ">// 触摸屏幕来滚动画面还是其他的方法使得画面滚动，皆触发该函数<br />- (void)scrollViewDidScroll:(UIScrollView *)scrollView {<br />&nbsp;&nbsp; &nbsp;NSLog(@"Scrolling...");<br />}<br /></p><p style="line-height: normal; color: #625b49; font-family: Arial; background-color: #ffffff; ">// 触摸屏幕并拖拽画面，再松开，最后停止时，触发该函数<br />- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate {<br />&nbsp;&nbsp; &nbsp;NSLog(@"scrollViewDidEndDragging&nbsp; -&nbsp; End of Scrolling.");<br />}<br /></p><p style="line-height: normal; color: #625b49; font-family: Arial; background-color: #ffffff; ">// 滚动停止时，触发该函数</p><p style="line-height: normal; color: #625b49; font-family: Arial; background-color: #ffffff; ">- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView {<br />&nbsp;&nbsp; &nbsp;NSLog(@"scrollViewDidEndDecelerating&nbsp; -&nbsp;&nbsp; End of Scrolling.");<br />}<br /></p><p style="line-height: normal; color: #625b49; font-family: Arial; background-color: #ffffff; "></p><p style="line-height: normal; color: #625b49; font-family: Arial; background-color: #ffffff; ">// 调用以下函数，来自动滚动到想要的位置，此过程中设置有动画效果，停止时，触发该函数</p><p style="line-height: normal; color: #625b49; font-family: Arial; background-color: #ffffff; ">//&nbsp;UIScrollView的setContentOffset:animated:&nbsp;<br /></p><p style="line-height: normal; color: #625b49; font-family: Arial; background-color: #ffffff; ">//&nbsp;UIScrollView的scrollRectToVisible:animated:</p><p style="line-height: normal; color: #625b49; font-family: Arial; background-color: #ffffff; ">// UITableView的scrollToRowAtIndexPath:atScrollPosition:animated:</p><p style="line-height: normal; color: #625b49; font-family: Arial; background-color: #ffffff; ">// UITableView的selectRowAtIndexPath:animated:scrollPosition:</p><span style="line-height: normal; color: #625b49; font-family: Arial; background-color: #ffffff; ">- (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView {</span><br style="line-height: normal; color: #625b49; font-family: Arial; background-color: #ffffff; " /><span style="line-height: normal; color: #625b49; font-family: Arial; background-color: #ffffff; ">&nbsp;&nbsp; &nbsp;NSLog(@"scrollViewDidEndScrollingAnimation&nbsp; -&nbsp;&nbsp; End of Scrolling.");</span><br style="line-height: normal; color: #625b49; font-family: Arial; background-color: #ffffff; " /><span style="line-height: normal; color: #625b49; font-family: Arial; background-color: #ffffff; ">}</span><br style="line-height: normal; color: #625b49; font-family: Arial; background-color: #ffffff; " /><p style="line-height: normal; color: #625b49; font-family: Arial; background-color: #ffffff; ">@end</p><img src ="http://www.blogjava.net/writegull/aggbug/373987.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/writegull/" target="_blank">writegull</a> 2012-04-12 16:57 <a href="http://www.blogjava.net/writegull/archive/2012/04/12/373987.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Frame和Bounds的区别</title><link>http://www.blogjava.net/writegull/archive/2012/04/12/373922.html</link><dc:creator>writegull</dc:creator><author>writegull</author><pubDate>Thu, 12 Apr 2012 02:36:00 GMT</pubDate><guid>http://www.blogjava.net/writegull/archive/2012/04/12/373922.html</guid><wfw:comment>http://www.blogjava.net/writegull/comments/373922.html</wfw:comment><comments>http://www.blogjava.net/writegull/archive/2012/04/12/373922.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/writegull/comments/commentRss/373922.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/writegull/services/trackbacks/373922.html</trackback:ping><description><![CDATA[<img src="http://www.blogjava.net/images/blogjava_net/writegull/6_491_772cfea14e61028.png" border="0" alt="" width="987" height="672" /><img src ="http://www.blogjava.net/writegull/aggbug/373922.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/writegull/" target="_blank">writegull</a> 2012-04-12 10:36 <a href="http://www.blogjava.net/writegull/archive/2012/04/12/373922.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Lion 10.7.3上安装XCode 4.2的问题</title><link>http://www.blogjava.net/writegull/archive/2012/04/06/373433.html</link><dc:creator>writegull</dc:creator><author>writegull</author><pubDate>Fri, 06 Apr 2012 01:23:00 GMT</pubDate><guid>http://www.blogjava.net/writegull/archive/2012/04/06/373433.html</guid><wfw:comment>http://www.blogjava.net/writegull/comments/373433.html</wfw:comment><comments>http://www.blogjava.net/writegull/archive/2012/04/06/373433.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/writegull/comments/commentRss/373433.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/writegull/services/trackbacks/373433.html</trackback:ping><description><![CDATA[<span style="font-family: Verdana; font-size: 12px; line-height: normal; background-color: #ffffff; ">最近的mac os操作系统老是出现问题，其中最大的问题就是mac的开发工具XCode 4.2的安装问题，我的系统现在是Lion 10.7.3，不知道怎么安装一开始老是出现这样的错误呢？就是系统重装之后第一个安装的软件是xcode都还是不行，以前第一次装苹果系统是可以的！悲剧怎么就发生在我的身上！<br /><br /></span><span style="font-family: Verdana; font-size: 12px; line-height: normal; background-color: #ffffff; ">解决方法：时间调到2011年</span><img src ="http://www.blogjava.net/writegull/aggbug/373433.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/writegull/" target="_blank">writegull</a> 2012-04-06 09:23 <a href="http://www.blogjava.net/writegull/archive/2012/04/06/373433.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ios4.3模拟器UITextField单行输入框输入内容崩溃问题</title><link>http://www.blogjava.net/writegull/archive/2012/03/16/372022.html</link><dc:creator>writegull</dc:creator><author>writegull</author><pubDate>Fri, 16 Mar 2012 02:49:00 GMT</pubDate><guid>http://www.blogjava.net/writegull/archive/2012/03/16/372022.html</guid><wfw:comment>http://www.blogjava.net/writegull/comments/372022.html</wfw:comment><comments>http://www.blogjava.net/writegull/archive/2012/03/16/372022.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/writegull/comments/commentRss/372022.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/writegull/services/trackbacks/372022.html</trackback:ping><description><![CDATA[<span style="color: #444444; font-family: 'Microsoft YaHei', Tahoma, Helvetica, SimSun, sans-serif; background-color: #fafafa; ">以前模拟器关于单行输入框的自动较正功能有个bug.在模拟器的设置 -&gt; 通用 -&gt; keyboard 里把这个选项关闭就可以了。</span><img src ="http://www.blogjava.net/writegull/aggbug/372022.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/writegull/" target="_blank">writegull</a> 2012-03-16 10:49 <a href="http://www.blogjava.net/writegull/archive/2012/03/16/372022.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>UITableViewCell 怎样响应多个按钮事件，获取对应单元格的数据源数据</title><link>http://www.blogjava.net/writegull/archive/2012/02/06/369487.html</link><dc:creator>writegull</dc:creator><author>writegull</author><pubDate>Mon, 06 Feb 2012 09:03:00 GMT</pubDate><guid>http://www.blogjava.net/writegull/archive/2012/02/06/369487.html</guid><wfw:comment>http://www.blogjava.net/writegull/comments/369487.html</wfw:comment><comments>http://www.blogjava.net/writegull/archive/2012/02/06/369487.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/writegull/comments/commentRss/369487.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/writegull/services/trackbacks/369487.html</trackback:ping><description><![CDATA[效果图如下：<br /><br /><img src="http://www.blogjava.net/images/blogjava_net/writegull/0839DE7B-E4A8-49A8-81B7-E9E4D411A96A.png" width="235" height="170" alt="" /><br /><br /><br />比如说第一行点击加按钮，则酸辣粉数量加1，<img src ="http://www.blogjava.net/writegull/aggbug/369487.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/writegull/" target="_blank">writegull</a> 2012-02-06 17:03 <a href="http://www.blogjava.net/writegull/archive/2012/02/06/369487.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>iphone开源项目list</title><link>http://www.blogjava.net/writegull/archive/2012/02/03/369309.html</link><dc:creator>writegull</dc:creator><author>writegull</author><pubDate>Fri, 03 Feb 2012 02:55:00 GMT</pubDate><guid>http://www.blogjava.net/writegull/archive/2012/02/03/369309.html</guid><wfw:comment>http://www.blogjava.net/writegull/comments/369309.html</wfw:comment><comments>http://www.blogjava.net/writegull/archive/2012/02/03/369309.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/writegull/comments/commentRss/369309.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/writegull/services/trackbacks/369309.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: UI界面类项目：Panoramagl&nbsp;&#8212;&#8212; 720全景展示Panorama viewer&nbsp;library&nbsp;for&nbsp;iPhone, iPad and iPod touch&nbsp;MBProgressHUD&nbsp;&#8212;&#8212; 进度指示一种优雅的，半透明的进度显示效果。同时还提供了其他附加功能，比如显示完成信息并淡...&nbsp;&nbsp;<a href='http://www.blogjava.net/writegull/archive/2012/02/03/369309.html'>阅读全文</a><img src ="http://www.blogjava.net/writegull/aggbug/369309.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/writegull/" target="_blank">writegull</a> 2012-02-03 10:55 <a href="http://www.blogjava.net/writegull/archive/2012/02/03/369309.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>