<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title type="text">博客园_我和未来有约会</title><subtitle type="text">“不要以自己懂的少为借口，每天都要总结一下所学的东西”</subtitle><id>http://feed.cnblogs.com/blog/u/24081/rss</id><updated>2011-11-10T02:47:10Z</updated><author><name>王喆(nasa)</name><uri>http://www.cnblogs.com/nasa/</uri></author><generator>CNBlogs BlogServer</generator><link rel="alternate" type="text/html" href="http://www.cnblogs.com/nasa/"/><link rel="self" type="application/atom+xml" href="http://feed.cnblogs.com/blog/u/24081/rss"/><entry><id>http://www.cnblogs.com/nasa/archive/2011/05/16/peugeot408.html</id><title type="text">ios作品－东风标致408</title><summary type="text">下载地址：http://t.cn/hdnyB2</summary><published>2011-05-16T03:19:00Z</published><updated>2011-05-16T03:19:00Z</updated><author><name>王喆(nasa)</name><uri>http://www.cnblogs.com/nasa/</uri></author><link rel="alternate" href="http://www.cnblogs.com/nasa/archive/2011/05/16/peugeot408.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/nasa/archive/2011/05/16/peugeot408.html"/><content type="html">下载地址：&lt;a href="http://t.cn/hdnyB2"&gt;http://t.cn/hdnyB2&#xD;
&lt;/a&gt;&#xD;
&lt;p&gt;&lt;img alt="Peugeot 408" height="2085" width="440" src="http://ww1.sinaimg.cn/bmiddle/52453487jw1dh6kcxgfnsj.jpg" /&gt;&lt;/p&gt;&lt;img src="http://www.cnblogs.com/nasa/aggbug/2047449.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/nasa/archive/2011/05/16/peugeot408.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/nasa/archive/2011/01/13/ios-base-2.html</id><title type="text">ios开发基础知识 － 2</title><summary type="text">移动物体参考：Field Key PathDescriptionrotation.xThe rotation, in radians, in the x axis.rotation.yThe rotation, in radians, in the y axis.rotation.zThe rotation, in radians, in the z axis.rotationThe rotation, in radians, in the z axis. This is identical to setting the rotation.z field.scale.xScale factor</summary><published>2011-01-13T01:58:00Z</published><updated>2011-01-13T01:58:00Z</updated><author><name>王喆(nasa)</name><uri>http://www.cnblogs.com/nasa/</uri></author><link rel="alternate" href="http://www.cnblogs.com/nasa/archive/2011/01/13/ios-base-2.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/nasa/archive/2011/01/13/ios-base-2.html"/><content type="html">&lt;p&gt;&lt;strong&gt;移动物体&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;div &gt;&#xD;
&lt;pre &gt;CABasicAnimation *theAnimation;    &#xD;
theAnimation=[CABasicAnimation animationWithKeyPath:@"transform.translation.x"];&#xD;
theAnimation.duration=1;&#xD;
theAnimation.repeatCount=2;&#xD;
theAnimation.autoreverses=YES;&#xD;
theAnimation.fromValue=[NSNumber numberWithFloat:0];&#xD;
theAnimation.toValue=[NSNumber numberWithFloat:-60];&#xD;
[view.layer addAnimation:theAnimation forKey:@"animateLayer"]; &#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt;参考：&lt;/p&gt;&#xD;
&lt;p&gt;&lt;style&gt;&lt;!--&#xD;
p.p1 {margin: 0.0px 0.0px 4.0px 0.0px; font: 13.0px 'Lucida Grande'; color: #ffffff}&#xD;
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Courier; color: #666666}&#xD;
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px 'Lucida Grande'}&#xD;
span.s1 {font: 13.0px Courier; color: #666666}&#xD;
table.t1 {margin: 0.0px 0.0px 52.0px 0.0px; border-style: solid; border-width: 0.0px 0.0px 0.0px 1.0px; border-color: transparent transparent transparent #9bb3cd}&#xD;
td.td1 {width: 104.0px; background-color: #93a5bb; border-style: solid; border-width: 0.0px 1.0px 1.0px 0.0px; border-color: transparent #9bb3cd #9bb3cd transparent; padding: 4.0px 8.0px 4.0px 8.0px}&#xD;
td.td2 {width: 555.0px; background-color: #93a5bb; border-style: solid; border-width: 0.0px 1.0px 1.0px 0.0px; border-color: transparent #9bb3cd #9bb3cd transparent; padding: 4.0px 8.0px 4.0px 8.0px}&#xD;
td.td3 {width: 104.0px; border-style: solid; border-width: 0.0px 1.0px 1.0px 0.0px; border-color: transparent #9bb3cd #9bb3cd transparent; padding: 8.0px 8.0px 8.0px 8.0px}&#xD;
td.td4 {width: 555.0px; border-style: solid; border-width: 0.0px 1.0px 1.0px 0.0px; border-color: transparent #9bb3cd #9bb3cd transparent; padding: 8.0px 8.0px 8.0px 8.0px}&#xD;
--&gt;&lt;/style&gt;&#xD;
&lt;/p&gt;&#xD;
&lt;table cellspacing="0" cellpadding="0" &gt;&#xD;
&lt;tbody&gt;&#xD;
&lt;tr&gt;&#xD;
&lt;td valign="middle" &gt;&#xD;
&lt;p &gt;&lt;b&gt;Field Key Path&lt;/b&gt;&lt;/p&gt;&#xD;
&lt;/td&gt;&#xD;
&lt;td valign="middle" &gt;&#xD;
&lt;p &gt;&lt;b&gt;Description&lt;/b&gt;&lt;/p&gt;&#xD;
&lt;/td&gt;&#xD;
&lt;/tr&gt;&#xD;
&lt;tr&gt;&#xD;
&lt;td valign="middle" &gt;&#xD;
&lt;p &gt;rotation.x&lt;/p&gt;&#xD;
&lt;/td&gt;&#xD;
&lt;td valign="middle" &gt;&#xD;
&lt;p &gt;The rotation, in radians, in the x axis.&lt;/p&gt;&#xD;
&lt;/td&gt;&#xD;
&lt;/tr&gt;&#xD;
&lt;tr&gt;&#xD;
&lt;td valign="middle" &gt;&#xD;
&lt;p &gt;rotation.y&lt;/p&gt;&#xD;
&lt;/td&gt;&#xD;
&lt;td valign="middle" &gt;&#xD;
&lt;p &gt;The rotation, in radians, in the y axis.&lt;/p&gt;&#xD;
&lt;/td&gt;&#xD;
&lt;/tr&gt;&#xD;
&lt;tr&gt;&#xD;
&lt;td valign="middle" &gt;&#xD;
&lt;p &gt;rotation.z&lt;/p&gt;&#xD;
&lt;/td&gt;&#xD;
&lt;td valign="middle" &gt;&#xD;
&lt;p &gt;The rotation, in radians, in the z axis.&lt;/p&gt;&#xD;
&lt;/td&gt;&#xD;
&lt;/tr&gt;&#xD;
&lt;tr&gt;&#xD;
&lt;td valign="middle" &gt;&#xD;
&lt;p &gt;rotation&lt;/p&gt;&#xD;
&lt;/td&gt;&#xD;
&lt;td valign="middle" &gt;&#xD;
&lt;p &gt;The rotation, in radians, in the z axis. This is identical to setting the &lt;span &gt;rotation.z&lt;/span&gt; field.&lt;/p&gt;&#xD;
&lt;/td&gt;&#xD;
&lt;/tr&gt;&#xD;
&lt;tr&gt;&#xD;
&lt;td valign="middle" &gt;&#xD;
&lt;p &gt;scale.x&lt;/p&gt;&#xD;
&lt;/td&gt;&#xD;
&lt;td valign="middle" &gt;&#xD;
&lt;p &gt;Scale factor for the x axis.&lt;/p&gt;&#xD;
&lt;/td&gt;&#xD;
&lt;/tr&gt;&#xD;
&lt;tr&gt;&#xD;
&lt;td valign="middle" &gt;&#xD;
&lt;p &gt;scale.y&lt;/p&gt;&#xD;
&lt;/td&gt;&#xD;
&lt;td valign="middle" &gt;&#xD;
&lt;p &gt;Scale factor for the y axis.&lt;/p&gt;&#xD;
&lt;/td&gt;&#xD;
&lt;/tr&gt;&#xD;
&lt;tr&gt;&#xD;
&lt;td valign="middle" &gt;&#xD;
&lt;p &gt;scale.z&lt;/p&gt;&#xD;
&lt;/td&gt;&#xD;
&lt;td valign="middle" &gt;&#xD;
&lt;p &gt;Scale factor for the z axis.&lt;/p&gt;&#xD;
&lt;/td&gt;&#xD;
&lt;/tr&gt;&#xD;
&lt;tr&gt;&#xD;
&lt;td valign="middle" &gt;&#xD;
&lt;p &gt;scale&lt;/p&gt;&#xD;
&lt;/td&gt;&#xD;
&lt;td valign="middle" &gt;&#xD;
&lt;p &gt;Average of all three scale factors.&lt;/p&gt;&#xD;
&lt;/td&gt;&#xD;
&lt;/tr&gt;&#xD;
&lt;tr&gt;&#xD;
&lt;td valign="middle" &gt;&#xD;
&lt;p &gt;translation.x&lt;/p&gt;&#xD;
&lt;/td&gt;&#xD;
&lt;td valign="middle" &gt;&#xD;
&lt;p &gt;Translate in the x axis.&lt;/p&gt;&#xD;
&lt;/td&gt;&#xD;
&lt;/tr&gt;&#xD;
&lt;tr&gt;&#xD;
&lt;td valign="middle" &gt;&#xD;
&lt;p &gt;translation.y&lt;/p&gt;&#xD;
&lt;/td&gt;&#xD;
&lt;td valign="middle" &gt;&#xD;
&lt;p &gt;Translate in the y axis.&lt;/p&gt;&#xD;
&lt;/td&gt;&#xD;
&lt;/tr&gt;&#xD;
&lt;tr&gt;&#xD;
&lt;td valign="middle" &gt;&#xD;
&lt;p &gt;translation.z&lt;/p&gt;&#xD;
&lt;/td&gt;&#xD;
&lt;td valign="middle" &gt;&#xD;
&lt;p &gt;Translate in the z axis.&lt;/p&gt;&#xD;
&lt;/td&gt;&#xD;
&lt;/tr&gt;&#xD;
&lt;tr&gt;&#xD;
&lt;td valign="middle" &gt;&#xD;
&lt;p &gt;translation&lt;/p&gt;&#xD;
&lt;/td&gt;&#xD;
&lt;td valign="middle" &gt;&#xD;
&lt;p &gt;Translate in the x and y axis. Value is an NSSize or CGSize.&lt;/p&gt;&#xD;
&lt;/td&gt;&#xD;
&lt;/tr&gt;&#xD;
&lt;/tbody&gt;&#xD;
&lt;/table&gt;&#xD;
&lt;hr /&gt;&#xD;
&lt;p&gt;&lt;strong&gt;访问别的类的属性或者方法&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;div &gt;&#xD;
&lt;pre &gt;myAppDelegate *appDelegate&#xD;
     = (myAppDelegate *)[[UIApplication sharedApplication] delegate];&#xD;
[[[appDelegate rootViewController] flipsideViewController] myMethod];&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;hr /&gt;&#xD;
&lt;p&gt;&lt;strong&gt;遍历子视图&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;div &gt;&#xD;
&lt;pre &gt;for (UIImageView *anImage in [self.view subviews]) {&#xD;
     if (anImage.tag == 1) {&#xD;
          // do something&#xD;
     }&#xD;
}&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;hr /&gt;&#xD;
&lt;p&gt;&lt;strong&gt;播放音乐&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;div &gt;&#xD;
&lt;pre &gt;// 设置音乐文件路径&#xD;
path = [[NSBundle mainBundle] pathForResource:@"mani" ofType:@"mp3"];&#xD;
&#xD;
	// 判断是否可以访问这个文件&#xD;
if ([[NSFileManager defaultManager] fileExistsAtPath:path]) &#xD;
{    &#xD;
		// 设置 player&#xD;
	player = [[AVAudioPlayer alloc] initWithContentsOfURL:&#xD;
			  [NSURL fileURLWithPath:path] error:nil];&#xD;
	&#xD;
		// 调节音量 (范围从0到1)&#xD;
	player.volume = 0.4f;&#xD;
	&#xD;
		// 准备buffer，减少播放延时的时间      &#xD;
	[player prepareToPlay];&#xD;
	&#xD;
		// 设置播放次数，0为播放一次，负数为循环播放&#xD;
	[player setNumberOfLoops:-1];&#xD;
	&#xD;
	[player play];    &#xD;
	&#xD;
}	&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;hr /&gt;&#xD;
&lt;p&gt;&lt;strong&gt;随机数&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;p&gt;rand()&lt;/p&gt;&#xD;
&lt;p&gt;例：&lt;/p&gt;&#xD;
&lt;div &gt;&#xD;
&lt;pre &gt;[_cloud02 setFrame:CGRectMake(-1024+rand()%600, -768+rand()%300, 2048, 1536)];&#xD;
[_cloud01 setFrame:CGRectMake(-1024+rand()%600, -768+rand()%300, 2048, 1536)];&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;hr /&gt;&#xD;
&lt;p&gt;&lt;strong&gt;Timer&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;p&gt;每秒调用&lt;/p&gt;&#xD;
&lt;div &gt;&#xD;
&lt;pre &gt;[NSTimer scheduledTimerWithTimeInterval:1&#xD;
     target:self&#xD;
     selector:@selector(myMethod)&#xD;
     userInfo:nil&#xD;
     repeats:YES];&#xD;
&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt;如果需要传递参数的话：&lt;/p&gt;&#xD;
&lt;div &gt;&#xD;
&lt;pre &gt;[NSTimer scheduledTimerWithTimeInterval:1     target:self&#xD;
     selector:@selector(myMethod)&#xD;
     userInfo:myObject&#xD;
     repeats:YES];&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;div &gt;&#xD;
&lt;pre &gt;-(void)myMethod:(NSTimer*)timer {&#xD;
     // Now I can access all the properties and methods of myObject&#xD;
     [[timer userInfo] myObjectMethod];&#xD;
}&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt;停止Timer&lt;/p&gt;&#xD;
&lt;div &gt;&#xD;
&lt;pre &gt;[myTimer invalidate]; &#xD;
myTimer = nil;&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;hr /&gt;&#xD;
&lt;p&gt;&lt;strong&gt;时间&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;div &gt;&#xD;
&lt;pre &gt;CFAbsoluteTime myCurrentTime = CFAbsoluteTimeGetCurrent();&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;hr /&gt;&#xD;
&lt;p&gt;&lt;strong&gt;在模拟器里测试 App 的加速度感应功能&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;p&gt;在模拟器里可以用鼠标点击模拟 iPhone 的触摸操作，但重力感应（比如用户倾斜机身来操控飞机/赛车）怎么模拟？按住 command 再按左右方向键，就能在电脑模拟器上测试加速度感应了。&lt;/p&gt;&lt;img src="http://www.cnblogs.com/nasa/aggbug/1934128.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/nasa/archive/2011/01/13/ios-base-2.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/nasa/archive/2011/01/13/ios-base-1.html</id><title type="text">ios开发基础知识 － 1</title><summary type="text">输出command＋shift＋r显示图片app frame 大小浏览器控件在状态栏显示网络状态播放序列动画提示筐</summary><published>2011-01-13T01:58:00Z</published><updated>2011-01-13T01:58:00Z</updated><author><name>王喆(nasa)</name><uri>http://www.cnblogs.com/nasa/</uri></author><link rel="alternate" href="http://www.cnblogs.com/nasa/archive/2011/01/13/ios-base-1.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/nasa/archive/2011/01/13/ios-base-1.html"/><content type="html">&lt;p&gt;&lt;strong&gt;输出&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;p&gt;command＋shift＋r&lt;/p&gt;&#xD;
&lt;div &gt;&#xD;
&lt;pre &gt;NSLog(@"log: %@ ", myString);&amp;nbsp;&#xD;
NSLog(@"log: %f ", myFloat);&amp;nbsp;&#xD;
NSLog(@"log: %i ", myInt);&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;hr /&gt;&#xD;
&lt;p&gt;&lt;strong&gt;显示图片&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;div &gt;&#xD;
&lt;pre &gt;CGRect myImageRect = CGRectMake(0.0f, 0.0f, 320.0f, 100.0f); &#xD;
UIImageView *myImage = [[UIImageView alloc] initWithFrame:myImageRect]; &#xD;
[myImage setImage:[UIImage imageNamed:@"myImage.png"]]; &#xD;
[self.view addSubview:myImage]; &#xD;
[myImage release];&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;hr /&gt;&#xD;
&lt;p&gt;&lt;strong&gt;app frame 大小&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;div &gt;&#xD;
&lt;pre &gt;CGRect bounds = [[UIScreen mainScreen] bounds];&#xD;
CGRect frame = [UIScreen mainScreen].applicationFrame;&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;hr /&gt;&#xD;
&lt;p&gt;&lt;strong&gt;浏览器控件&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;div &gt;&#xD;
&lt;pre &gt;CGRect webFrame = CGRectMake(0.0, 0.0, 320.0, 480.0);&#xD;
UIWebView *webView = [[UIWebView alloc] initWithFrame:webFrame];&#xD;
[webView setBackgroundColor:[UIColor clearColor]];&#xD;
NSString *urlAddress = @"http://nasa.cnblogs.com";&#xD;
NSURL *url = [NSURL URLWithString:urlAddress];&#xD;
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];&#xD;
[webView loadRequest:requestObj];&#xD;
[self addSubview:webView];&#xD;
[webView release];&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;hr /&gt;&#xD;
&lt;p&gt;&lt;strong&gt;在状态栏显示网络状态&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;div &gt;&#xD;
&lt;pre &gt;UIApplication* app = [UIApplication sharedApplication];&#xD;
app.networkActivityIndicatorVisible = YES; &#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;hr /&gt;&#xD;
&lt;p&gt;&lt;strong&gt;播放序列动画&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;div &gt;&#xD;
&lt;pre &gt;NSArray *myImages = [NSArray arrayWithObjects:&#xD;
					 [UIImage imageNamed:@"myImage1.png"],&#xD;
					 [UIImage imageNamed:@"myImage2.png"],&#xD;
					 [UIImage imageNamed:@"myImage3.png"],&#xD;
					 [UIImage imageNamed:@"myImage4.gif"],&#xD;
					 nil];&#xD;
&#xD;
UIImageView *myAnimatedView = [UIImageView alloc];&#xD;
[myAnimatedView initWithFrame:[self bounds]];&#xD;
myAnimatedView.animationImages = myImages;&#xD;
myAnimatedView.animationDuration = 0.25; // 秒&#xD;
myAnimatedView.animationRepeatCount = 0; // 0 = 无限&#xD;
[myAnimatedView startAnimating];&#xD;
[self addSubview:myAnimatedView];&#xD;
[myAnimatedView release];&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;hr /&gt;&#xD;
&lt;p&gt;&lt;strong&gt;提示筐&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;div &gt;&#xD;
&lt;pre &gt;UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil message:@"Alert!"          &#xD;
						delegate:self cancelButtonTitle:@"OK" &#xD;
									  otherButtonTitles:nil];&#xD;
[alert show];&#xD;
[alert release];&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&lt;img src="http://www.cnblogs.com/nasa/aggbug/1932450.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/nasa/archive/2011/01/13/ios-base-1.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/nasa/archive/2010/11/17/in-App-Purchases-disapper.html</id><title type="text">iTunes Contact无Manage Your In App Purchases链接</title><summary type="text">iTunes Contact如果无Manage Your In App Purchases链接，很大的可能是你没有完善个人的银行信息。</summary><published>2010-11-17T02:04:00Z</published><updated>2010-11-17T02:04:00Z</updated><author><name>王喆(nasa)</name><uri>http://www.cnblogs.com/nasa/</uri></author><link rel="alternate" href="http://www.cnblogs.com/nasa/archive/2010/11/17/in-App-Purchases-disapper.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/nasa/archive/2010/11/17/in-App-Purchases-disapper.html"/><content type="html">&lt;p&gt;iTunes Contact如果无Manage Your In App Purchases链接，很大的可能是你没有完善个人的银行信息。&lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="http://pic002.cnblogs.com/images/2010/20522/2010111710030966.gif" alt="" /&gt;&lt;/p&gt;&lt;img src="http://www.cnblogs.com/nasa/aggbug/1875575.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/nasa/archive/2010/11/17/in-App-Purchases-disapper.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/nasa/archive/2010/11/08/UINavigationBar-bg.html</id><title type="text">为UINavigationBar添加自定义背景</title><summary type="text">图示：</summary><published>2010-11-08T10:21:00Z</published><updated>2010-11-08T10:21:00Z</updated><author><name>王喆(nasa)</name><uri>http://www.cnblogs.com/nasa/</uri></author><link rel="alternate" href="http://www.cnblogs.com/nasa/archive/2010/11/08/UINavigationBar-bg.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/nasa/archive/2010/11/08/UINavigationBar-bg.html"/><content type="html">&lt;p&gt;&lt;div &gt;&#xD;
&lt;pre &gt;@implementation UINavigationBar (UINavigationBarCategory)&#xD;
- (void)drawRect:(CGRect)rect {&#xD;
	//颜色填充&#xD;
//	UIColor *color = [UIColor redColor];&#xD;
//	CGContextRef context = UIGraphicsGetCurrentContext();&#xD;
//	CGContextSetFillColor(context, CGColorGetComponents( [color CGColor]));&#xD;
//	CGContextFillRect(context, rect);&#xD;
//	self.tintColor = color;&#xD;
	//图片填充&#xD;
	UIColor *color = [UIColor colorWithRed:46.0f/255.0f green:87.0f/255.0f blue:29.0f/255.0f alpha:1.0f];&#xD;
	UIImage *img	= [UIImage imageNamed: @"bg.png"];&#xD;
	[img drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];&#xD;
	self.tintColor = color;&#xD;
}&#xD;
@end&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;/p&gt;&#xD;
&lt;p&gt;图示：&lt;img src="http://pic002.cnblogs.com/images/2010/20522/2010110818202475.png" alt="" /&gt;&lt;/p&gt;&lt;img src="http://www.cnblogs.com/nasa/aggbug/1871988.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/nasa/archive/2010/11/08/UINavigationBar-bg.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/nasa/archive/2010/10/18/windows-phone-7-in-7.html</id><title type="text">windows phone 7 之 7分钟教学视频</title><summary type="text">Windows Phone 7 in 7: 什么是 Windows Phone 7Windows Phone 7 in 7: 开始 Windows Phone 7 之旅Windows Phone 7 in 7: Windows Phone 7 的架构Windows Phone 7 in 7: Silverlight 与 Windows Phone 7Windows Phone 7 in 7: XN...</summary><published>2010-10-18T03:40:00Z</published><updated>2010-10-18T03:40:00Z</updated><author><name>王喆(nasa)</name><uri>http://www.cnblogs.com/nasa/</uri></author><link rel="alternate" href="http://www.cnblogs.com/nasa/archive/2010/10/18/windows-phone-7-in-7.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/nasa/archive/2010/10/18/windows-phone-7-in-7.html"/><content type="html">&lt;div&gt;&#xD;
&lt;ul&gt;&#xD;
&lt;li&gt;&lt;a href="http://www.msdev.com/Directory/Description.aspx?eventId=1805"&gt;Windows Phone 7 in 7: 什么是 Windows Phone 7&lt;/a&gt;&lt;/li&gt;&#xD;
&lt;li&gt;&lt;a href="http://www.msdev.com/Directory/Description.aspx?eventId=1806"&gt;Windows Phone 7 in 7: 开始 Windows Phone 7 之旅&lt;/a&gt;&lt;/li&gt;&#xD;
&lt;li&gt;&lt;a href="http://www.msdev.com/Directory/Description.aspx?eventId=1807"&gt;Windows Phone 7 in 7: Windows Phone 7 的架构&lt;/a&gt;&lt;/li&gt;&#xD;
&lt;li&gt;&lt;a href="http://www.msdev.com/Directory/Description.aspx?eventId=1808"&gt;Windows Phone 7 in 7: Silverlight 与 Windows Phone 7&lt;/a&gt;&lt;/li&gt;&#xD;
&lt;li&gt;&lt;a href="http://www.msdev.com/Directory/Description.aspx?eventId=1809"&gt;Windows Phone 7 in 7: XNA 与 Windows Phone 7&lt;/a&gt;&lt;/li&gt;&#xD;
&lt;li&gt;&lt;a href="http://www.msdev.com/Directory/Description.aspx?eventId=1877"&gt;Windows Phone 7 in 7: Windows Phone 7 控件&lt;/a&gt;&lt;/li&gt;&#xD;
&lt;li&gt;&lt;a href="http://www.msdev.com/Directory/Description.aspx?eventId=1878"&gt;Windows Phone 7 in 7: 链接 Web Services 服务&lt;/a&gt;&lt;/li&gt;&#xD;
&lt;li&gt;&lt;a href="http://www.msdev.com/Directory/Description.aspx?eventId=1879"&gt;Windows Phone 7 in 7: Windows Phone 7 and Data&lt;/a&gt;&lt;/li&gt;&#xD;
&lt;li&gt;&lt;a href="http://www.msdev.com/Directory/Description.aspx?eventId=1880"&gt;Windows Phone 7 in 7: 基本数据持久性&lt;/a&gt;&lt;/li&gt;&#xD;
&lt;li&gt;&lt;a href="http://www.msdev.com/Directory/Description.aspx?eventId=1881"&gt;Windows Phone 7 in 7: 如何使用 Application Bar&lt;/a&gt;&lt;/li&gt;&#xD;
&lt;li&gt;&lt;a href="http://www.msdev.com/Directory/Description.aspx?eventId=1882"&gt;Windows Phone 7 in 7: 如何使用 Web Browser&lt;/a&gt;&lt;/li&gt;&#xD;
&lt;li&gt;&lt;a href="http://www.msdev.com/Directory/Description.aspx?eventId=1883"&gt;Windows Phone 7 in 7: 应用程序本地化&lt;/a&gt;&lt;/li&gt;&#xD;
&lt;li&gt;&lt;a href="http://www.msdev.com/Directory/Description.aspx?eventId=1884"&gt;Windows Phone 7 in 7: 我在哪里？使用 Location Service&lt;/a&gt;&lt;/li&gt;&#xD;
&lt;li&gt;&lt;a href="http://www.msdev.com/Directory/Description.aspx?eventId=1885"&gt;Windows Phone 7 in 7: 推送通知&lt;/a&gt;&lt;/li&gt;&#xD;
&lt;li&gt;&lt;a href="http://www.msdev.com/Directory/Description.aspx?eventId=1886"&gt;Windows Phone 7 in 7: Windows Phone 7 的安全性&lt;/a&gt;&lt;/li&gt;&#xD;
&lt;li&gt;&lt;a href="http://www.msdev.com/Directory/Description.aspx?eventId=1887"&gt;Windows Phone 7 in 7: 访问加速器&lt;/a&gt;&lt;/li&gt;&#xD;
&lt;li&gt;&lt;a href="http://www.msdev.com/Directory/Description.aspx?eventId=1888"&gt;Windows Phone 7 in 7: 如何使用媒体元素&lt;/a&gt;&lt;/li&gt;&#xD;
&lt;li&gt;&lt;a href="http://www.msdev.com/Directory/Description.aspx?eventId=1889"&gt;Windows Phone 7 in 7: 多点触摸&lt;/a&gt;&lt;/li&gt;&#xD;
&lt;li&gt;&lt;a href="http://www.msdev.com/Directory/Description.aspx?eventId=1890"&gt;Windows Phone 7 in 7: SIP 形式布局&lt;/a&gt;&lt;/li&gt;&#xD;
&lt;li&gt;&lt;a href="http://www.msdev.com/Directory/Description.aspx?eventId=1891"&gt;Windows Phone 7 in 7: 如何使用摄像头&lt;/a&gt;&lt;/li&gt;&#xD;
&lt;/ul&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;div&gt;整理自&lt;a href="http://www.msdev.com/"&gt;&amp;nbsp;http://www.msdev.com/&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.cnblogs.com/nasa/aggbug/1854152.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/nasa/archive/2010/10/18/windows-phone-7-in-7.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/nasa/archive/2010/10/14/1851505.html</id><title type="text">UITextView自动滚动的解决方案</title><summary type="text">思路：UIView加载完成3后，用NSTimer结合setContentOffset将UITextView向下滚动1像素。在滚动到底部的时候停止NSTimer。每当手动滚动UITextView前销毁NSTimer，滚动后重新创建NSTimer。</summary><published>2010-10-14T08:40:00Z</published><updated>2010-10-14T08:40:00Z</updated><author><name>王喆(nasa)</name><uri>http://www.cnblogs.com/nasa/</uri></author><link rel="alternate" href="http://www.cnblogs.com/nasa/archive/2010/10/14/1851505.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/nasa/archive/2010/10/14/1851505.html"/><content type="html">&lt;p&gt;思路：UIView加载完成3后，用NSTimer结合setContentOffset将UITextView向下滚动1像素。在滚动到底部的时候停止NSTimer。每当手动滚动UITextView前销毁NSTimer，滚动后重新创建NSTimer。&lt;/p&gt;&#xD;
&lt;p&gt;&lt;div &gt;&#xD;
&lt;pre &gt;NSTimer *timer;&#xD;
- (void)viewDidLoad {&#xD;
	[self performSelector:@selector(resetText) withObject:nil afterDelay:3.0f];&#xD;
}&#xD;
&#xD;
- (void)resetText {	&#xD;
	[timer invalidate];&#xD;
	timer = nil;&#xD;
	timer = [NSTimer scheduledTimerWithTimeInterval: 0.06&#xD;
											 target: self&#xD;
										   selector:@selector(onTick:)&#xD;
										   userInfo: nil repeats:YES];&#xD;
}&#xD;
&#xD;
- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView {&#xD;
	[timer invalidate];&#xD;
	timer = nil;&#xD;
	NSLog(@"scrollViewWillBeginDragging");&#xD;
	[self performSelector:@selector(resetText) withObject:nil afterDelay:3.0f];&#xD;
}&#xD;
- (void) onTick:(NSTimer*)theTimer {&#xD;
	CGPoint pt = [textView contentOffset];&#xD;
	CGFloat n = pt.y + 1;&#xD;
	[textView setContentOffset:CGPointMake(pt.x, n)];	&#xD;
	if (n&amp;gt; (textView.contentSize.height-textView.bounds.size.height)) {&#xD;
		[theTimer invalidate];&#xD;
		theTimer = nil;&#xD;
		[timer invalidate];&#xD;
		timer = nil;&#xD;
	}&#xD;
}&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;/p&gt;&#xD;
&lt;p&gt;最后 不要忘了实现&lt;/p&gt;&#xD;
&lt;p &gt;UIScrollViewDelegate&lt;/p&gt;&#xD;
&lt;p &gt;&lt;/p&gt;&lt;img src="http://www.cnblogs.com/nasa/aggbug/1851505.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/nasa/archive/2010/10/14/1851505.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/nasa/archive/2010/10/14/UIScrollView-touches.html</id><title type="text">UIScrollView无法响应touches的解决方法</title><summary type="text">自定义一个类继承UIScrollView，将touchesEnded事件发送出去。</summary><published>2010-10-14T08:29:00Z</published><updated>2010-10-14T08:29:00Z</updated><author><name>王喆(nasa)</name><uri>http://www.cnblogs.com/nasa/</uri></author><link rel="alternate" href="http://www.cnblogs.com/nasa/archive/2010/10/14/UIScrollView-touches.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/nasa/archive/2010/10/14/UIScrollView-touches.html"/><content type="html">&lt;p&gt;自定义一个类继承UIScrollView，将touchesEnded事件发送出去。&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;div &gt;&#xD;
&lt;pre &gt;#import &amp;lt;Foundation/Foundation.h&amp;gt;&#xD;
&#xD;
&#xD;
@interface PageScrollView : UIScrollView {&#xD;
&#xD;
}&#xD;
&#xD;
@end&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;div &gt;&#xD;
&lt;pre &gt;#import "PageScrollView.h"&#xD;
&#xD;
&#xD;
@implementation PageScrollView&#xD;
- (void) touchesEnded: (NSSet *) touches withEvent: (UIEvent *) event {&#xD;
	&#xD;
	if (!self.dragging) {&#xD;
		[self.nextResponder touchesEnded: touches withEvent:event]; &#xD;
	}		&#xD;
	[super touchesEnded: touches withEvent: event];&#xD;
}&#xD;
&#xD;
@end&#xD;
&lt;/pre&gt;&#xD;
&lt;/div&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&lt;img src="http://www.cnblogs.com/nasa/aggbug/1851478.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/nasa/archive/2010/10/14/UIScrollView-touches.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/nasa/archive/2010/09/21/thefwa-rememberreach.html</id><title type="text">TheFWA上的silverlight酷站</title><summary type="text">FWA全称Favourite Website Awards，是一个世界著名的互动多媒体网站收录平台，于2000年5月建立，目的是展示世界上最优秀、最前沿的网络媒体艺术设计作品。FWA一直被列为世界上最顶级、最具有精英意义的评价网络媒体交互艺术创作的权威机构，其收录的作品也不断成为备受追捧的创意科技标杆。　　FWA每日收录一个互动站点，月度年度评选最佳。凡是被收录的站点都会被光荣的授以FWA角标，这...</summary><published>2010-09-21T00:39:00Z</published><updated>2010-09-21T00:39:00Z</updated><author><name>王喆(nasa)</name><uri>http://www.cnblogs.com/nasa/</uri></author><link rel="alternate" href="http://www.cnblogs.com/nasa/archive/2010/09/21/thefwa-rememberreach.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/nasa/archive/2010/09/21/thefwa-rememberreach.html"/><content type="html">&lt;p&gt;FWA全称Favourite Website Awards，是一个世界著名的互动多媒体网站收录平台，于2000年5月建立，目的是展示世界上最优秀、最前沿的网络媒体艺术设计作品。FWA一直被列为世界上最顶级、最具有精英意义的评价网络媒体交互艺术创作的权威机构，其收录的作品也不断成为备受追捧的创意科技标杆。　　&lt;/p&gt;&#xD;
&lt;p&gt;FWA每日收录一个互动站点，月度年度评选最佳。凡是被收录的站点都会被光荣的授以FWA角标，这是国内外无数设计师与互动网站开发机构梦寐以求的标识。&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;p&gt;网址：&lt;a href="http://www.rememberreach.com/" target="_blank"&gt;http://www.rememberreach.com/&lt;/a&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="http://pic002.cnblogs.com/images/2010/20522/2010092108325631.png" alt="" /&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="http://pic002.cnblogs.com/images/2010/20522/2010092108333337.png" alt="" /&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="http://pic002.cnblogs.com/images/2010/20522/2010092108341726.png" alt="" /&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;img src="http://pic002.cnblogs.com/images/2010/20522/2010092108352177.png" alt="" /&gt;&lt;/p&gt;&lt;img src="http://www.cnblogs.com/nasa/aggbug/1832232.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/nasa/archive/2010/09/21/thefwa-rememberreach.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/nasa/archive/2010/07/30/canvas-keydown-hanlder.html</id><title type="text">Silverlight Canvas 无法响应KeyDown事件解决办法</title><summary type="text">在UserControl上添加属性 IsTabStop="true"。在cs代码中 loaded事件上调用方法 this.Focus()。将KeyDown事件添加到UserControl 上。</summary><published>2010-07-30T08:19:00Z</published><updated>2010-07-30T08:19:00Z</updated><author><name>王喆(nasa)</name><uri>http://www.cnblogs.com/nasa/</uri></author><link rel="alternate" href="http://www.cnblogs.com/nasa/archive/2010/07/30/canvas-keydown-hanlder.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/nasa/archive/2010/07/30/canvas-keydown-hanlder.html"/><content type="html">&lt;p&gt;&lt;span  style="widows: 2; text-transform: none; text-indent: 0px; border-collapse: separate; font: medium Simsun; white-space: normal; orphans: 2; letter-spacing: normal; color: #000000; word-spacing: 0px;"&gt;&#xD;
&lt;div style="background-color: transparent; text-indent: 0px; margin: 0px; font-size: 11pt;"&gt;&lt;ol&gt;&#xD;
&lt;li style="background-color: transparent; list-style-type: decimal; font-style: normal; font-family: Arial; color: #000000; font-size: 11pt; vertical-align: baseline; font-weight: normal; text-decoration: none;"&gt;&lt;span style="background-color: transparent; font-style: normal; font-family: Arial; white-space: pre-wrap; color: #000000; font-size: 11pt; vertical-align: baseline; font-weight: normal; text-decoration: none;"&gt;在UserControl上添加属性 IsTabStop="true"。&lt;/span&gt;&lt;/li&gt;&#xD;
&lt;li style="background-color: transparent; list-style-type: decimal; font-style: normal; font-family: Arial; color: #000000; font-size: 11pt; vertical-align: baseline; font-weight: normal; text-decoration: none;"&gt;&lt;span style="background-color: transparent; font-style: normal; font-family: Arial; white-space: pre-wrap; color: #000000; font-size: 11pt; vertical-align: baseline; font-weight: normal; text-decoration: none;"&gt;在cs代码中 loaded事件上调用方法 this.Focus()。&lt;/span&gt;&lt;/li&gt;&#xD;
&lt;li style="background-color: transparent; list-style-type: decimal; font-style: normal; font-family: Arial; color: #000000; font-size: 11pt; vertical-align: baseline; font-weight: normal; text-decoration: none;"&gt;&lt;span style="background-color: transparent; font-style: normal; font-family: Arial; white-space: pre-wrap; color: #000000; font-size: 11pt; vertical-align: baseline; font-weight: normal; text-decoration: none;"&gt;将KeyDown事件添加到UserControl 上。&lt;/span&gt;&lt;/li&gt;&#xD;
&lt;/ol&gt;&amp;nbsp;&lt;/div&gt;&#xD;
&lt;/span&gt;&lt;/p&gt;&lt;img src="http://www.cnblogs.com/nasa/aggbug/1788834.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/nasa/archive/2010/07/30/canvas-keydown-hanlder.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry></feed>
