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

<channel>
	<title>“我”的开发笔记 &#187; 09 &#8211; 视图/绘图</title>
	<atom:link href="http://c.gzl.name/archives/category/cocoa/cview-draw/feed" rel="self" type="application/rss+xml" />
	<link>http://c.gzl.name</link>
	<description>IPhone, Cocoa, PHP, Javascript, JQuery, Actionscript, etc...</description>
	<lastBuildDate>Thu, 29 Dec 2011 07:20:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>makeKeyAndVisible</title>
		<link>http://c.gzl.name/archives/466</link>
		<comments>http://c.gzl.name/archives/466#comments</comments>
		<pubDate>Sun, 06 Sep 2009 23:14:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[05 - 视图（View）]]></category>
		<category><![CDATA[09 - 视图/绘图]]></category>
		<category><![CDATA[Cocoa开发]]></category>
		<category><![CDATA[iPhone开发]]></category>
		<category><![CDATA[makeKeyAndVisible]]></category>

		<guid isPermaLink="false">http://c.gzl.name/?p=466</guid>
		<description><![CDATA[我不知道为什么，不过有人搜索makeKeyAndVisible方法。其实我这种懒人一般不会刨根问底，有些方法照打就好，那些白给的方法有些就别动就好了。 我们看看这个每个程序都有的方法吧： &#91;window makeKeyAndVisible&#93;; 由于iPhone是单窗口程序，所以也就只有这么一个Window对象，而且是UIWindow，不是NSWindow。而根据文档上所说： “这个是便捷方法，去使被使用对象的主窗口显示到屏幕的最前端。你也可以使用hiddenUIView方法隐藏这个窗口” 所以基本上来说，对于编程者的区别仅仅在于在其前添加代码，或在其后添加代码。]]></description>
		<wfw:commentRss>http://c.gzl.name/archives/466/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在iPhone程序上读取PDF文件 (rev0.1 ^-^;)</title>
		<link>http://c.gzl.name/archives/460</link>
		<comments>http://c.gzl.name/archives/460#comments</comments>
		<pubDate>Sun, 06 Sep 2009 05:57:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[05 - 视图（View）]]></category>
		<category><![CDATA[09 - 视图/绘图]]></category>
		<category><![CDATA[Cocoa开发]]></category>
		<category><![CDATA[iPhone开发]]></category>
		<category><![CDATA[pdf]]></category>
		<category><![CDATA[Q2D]]></category>
		<category><![CDATA[Quartz 2D]]></category>

		<guid isPermaLink="false">http://c.gzl.name/?p=460</guid>
		<description><![CDATA[老话，最近闹心的事情多，开心的事情少，但是正事还是要干的。学习得需要，努力的需要，钱的需要&#8230; &#8230; 天上给我下点儿钞票吧！ 言归正传，怎么在iPhone程序中读取PDF的内容呢？答案是，苹果为我们准备了一个很神奇的framework Q2D（Quartz 2D）。Q2D提供了全套的PDF读取API，接下来我们来看看如果简单的使用Q2D来读取PDF文件： 我建立了一个工程叫iPhonePDF, 添加了一个UIScrollView（不知道怎么添加UIScrollView? 添加一个UIView然后把interface上的UIView改成UIScrollView就可以啦&#8230;）名为PDFView 看看PDFView里面有什么吧 @interface PDFView : UIScrollView &#123; &#160; NSString *filePath; CGPDFDocumentRef pdfDocument; CGPDFPageRef page; int pageNumber; &#125; &#160; @property &#40;copy, nonatomic&#41; NSString *filePath; @property int pageNumber; &#160; -&#40;CGPDFDocumentRef&#41;MyGetPDFDocumentRef; -&#40;void&#41;reloadView; -&#40;IBAction&#41;goUpPage:&#40;id&#41;sender; -&#40;IBAction&#41;goDownPage:&#40;id&#41;sender; @end filePath是储存pdf文件的位置的，得到文件位置就是老话题了：[NSBundle mainBundle]&#8230; 后面的会写吧&#8230; 不记得了在我博客里面搜索吧 CGPDFDocumentRef是PDF文档索引文件，Q2D是Core Foundation的API，所以没看到那个星星～ CGPDFPageRef是PDF页面索引文件 pageNumber是页码 下面的几个函数其实一看就明了了，翻页的，和刷新页面的。第一个是自定义的getter 然后我们看看m文件里面有用的方法： @implementation PDFView @synthesize filePath,pageNumber; &#160; [...]]]></description>
		<wfw:commentRss>http://c.gzl.name/archives/460/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

