<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>DevQiao</title>
		<description>Keep on hacking</description>
		<link>https://qiaolibo.github.io</link>
		<atom:link href="https://qiaolibo.github.io/rss-feed.xml" rel="self" type="application/rss+xml" />
		
			<item>
				<title>Interaction Design &amp; Collaborative VR</title>
				
				
					<description>&lt;p&gt;To discover more possibilities in interaction design field, we try to combine different advanced device as mush as we can, to create a realistic experience, even beyond reality, and make the interaction process smoothly.&lt;/p&gt;

</description>
				
				<pubDate>Sun, 16 Apr 2017 16:21:20 +0000</pubDate>
				<link>https://qiaolibo.github.io/design/InteractionDesign.html</link>
				<guid isPermaLink="true">https://qiaolibo.github.io/design/InteractionDesign.html</guid>
			</item>
		
			<item>
				<title>FatRes - A solution for the sedentary lifestyle</title>
				
				
					<description>&lt;p&gt;Using the “User-centered Interaction Design Process”, this project aim to design a meaningful system to ease the specific people’s sedentary lifestyle.&lt;/p&gt;

</description>
				
				<pubDate>Tue, 10 Jan 2017 10:57:16 +0000</pubDate>
				<link>https://qiaolibo.github.io/design/FatRes.html</link>
				<guid isPermaLink="true">https://qiaolibo.github.io/design/FatRes.html</guid>
			</item>
		
			<item>
				<title>Stack in Swift</title>
				
				
					<description>&lt;p&gt;&lt;strong&gt;栈&lt;/strong&gt;  像是一个有限功能的数组，你只可以通过’push’在栈顶添加一个新的元素，用 &lt;code class=&quot;highlighter-rouge&quot;&gt;pop&lt;/code&gt; 从栈顶移除这个元素，同时 &lt;code class=&quot;highlighter-rouge&quot;&gt;peek&lt;/code&gt; (一瞥)栈顶元素而不弹出（意为只能对栈顶元素执行存取操作）。&lt;/p&gt;

</description>
				
				<pubDate>Wed, 15 Jun 2016 12:04:29 +0000</pubDate>
				<link>https://qiaolibo.github.io/Stack.html</link>
				<guid isPermaLink="true">https://qiaolibo.github.io/Stack.html</guid>
			</item>
		
			<item>
				<title>Swift基础语法（五）</title>
				
				
					<description>&lt;p&gt;本篇作为Swift的第四篇，主要介绍了Swift中的枚举类型，它和其它语言相比有其特殊性&lt;/p&gt;

</description>
				
				<pubDate>Tue, 17 May 2016 15:24:00 +0000</pubDate>
				<link>https://qiaolibo.github.io/coding/Swift%E5%9F%BA%E7%A1%80%E8%AF%AD%E6%B3%95-%E4%BA%94.html</link>
				<guid isPermaLink="true">https://qiaolibo.github.io/coding/Swift%E5%9F%BA%E7%A1%80%E8%AF%AD%E6%B3%95-%E4%BA%94.html</guid>
			</item>
		
			<item>
				<title>iOS多线程-GCD使用指南</title>
				
				
					<description>&lt;p&gt;最近的计步器App涉及异步API，我开始试图将CMPedometer的查询方法封装为一个函数，这个函数可以返回
查询方法得到的结果，方便使用。然而事实却没有这么简单，由于查询方法是异步API，因此只要调用该方法
操作就会被分配到另一个线程去做，因此当查询到结果后，调用这个查询方法的方法早已执行完毕，因此返回空，
也就是除了查询方法自带的回调block中可以取到查询结果，其他地方没法获取查询结果。&lt;/p&gt;
&lt;div class=&quot;language-swift highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  &lt;span class=&quot;c1&quot;&gt;// stepsInToday永远取不到值&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;func&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;queryPedometerTodayTotalData&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
       &lt;span class=&quot;k&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;stepsInToday&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;
       &lt;span class=&quot;k&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;queryPedometerDataFromDate&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;NSDate&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;today&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;toDate&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;NSDate&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;())&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
           &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pedometerData&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt;
           &lt;span class=&quot;n&quot;&gt;stepsInToday&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pedometerData&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;?&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;numberOfSteps&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;integerValue&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;
       &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
       &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;stepsInToday&lt;/span&gt;
   &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;期间试过给 &lt;code class=&quot;highlighter-rouge&quot;&gt;NSOperation&lt;/code&gt; 添加依赖，或者使用 &lt;code class=&quot;highlighter-rouge&quot;&gt;dispatch_group_async&lt;/code&gt;，但是用这些方法解决异步API
都不奏效，因为异步API操作始终会分去别的线程处理，
我开始的解决办法是在返回前阻塞等待一段时间（如2秒），这样就解决了时序问题，但是这种方式并不好，
试想如果硬件原因（也可能网络应用相关的延迟）超过这个时间段（2秒），则应用崩溃
``` swift
  // 通过延时执行的解决方法
  func queryPedometerTodayTotalData() -&amp;gt; Int {
       var stepsInToday = 0
       self.queryPedometerDataFromDate(NSDate.today()!, toDate: NSDate()) {
           (pedometerData, error) in
           stepsInToday = (pedometerData?.numberOfSteps.integerValue)!
       }&lt;/p&gt;

</description>
				
				<pubDate>Fri, 13 May 2016 21:46:00 +0000</pubDate>
				<link>https://qiaolibo.github.io/coding/GCD%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97.html</link>
				<guid isPermaLink="true">https://qiaolibo.github.io/coding/GCD%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97.html</guid>
			</item>
		
			<item>
				<title>Swift基础语法（四）</title>
				
				
					<description>&lt;p&gt;本篇作为Swift的第四篇，主要介绍了Swift中的枚举类型，它和其它语言相比有其特殊性&lt;/p&gt;

</description>
				
				<pubDate>Mon, 09 May 2016 16:11:00 +0000</pubDate>
				<link>https://qiaolibo.github.io/coding/Swift%E5%9F%BA%E7%A1%80%E8%AF%AD%E6%B3%95-%E5%9B%9B.html</link>
				<guid isPermaLink="true">https://qiaolibo.github.io/coding/Swift%E5%9F%BA%E7%A1%80%E8%AF%AD%E6%B3%95-%E5%9B%9B.html</guid>
			</item>
		
			<item>
				<title>Swift基础语法（三）</title>
				
				
					<description>&lt;p&gt;本篇作为Swift的第三篇，主要简述Swift中的结构体和类&lt;/p&gt;

</description>
				
				<pubDate>Mon, 02 May 2016 21:26:25 +0000</pubDate>
				<link>https://qiaolibo.github.io/coding/Swift%E5%9F%BA%E7%A1%80%E8%AF%AD%E6%B3%95-%E4%B8%89.html</link>
				<guid isPermaLink="true">https://qiaolibo.github.io/coding/Swift%E5%9F%BA%E7%A1%80%E8%AF%AD%E6%B3%95-%E4%B8%89.html</guid>
			</item>
		
			<item>
				<title>CoreMotion框架-CMPedometer</title>
				
				
					<description>&lt;p&gt;比赛作品涉及计步功能，计步属于健康范畴，当前Apple的HealthKit可以很好的提供健康数据，但是由于涉及隐私，在添加HealthKit时必须要付费的开发者账号，而且包含HealthKit的App审核也更严格。
我目前只需实现简单的计步功能，因此关注到了CoreMotion框架的CMPedometer类，今天简单说说：&lt;/p&gt;

</description>
				
				<pubDate>Thu, 28 Apr 2016 09:27:00 +0000</pubDate>
				<link>https://qiaolibo.github.io/coding/CoreMotion%E6%A1%86%E6%9E%B6-CMPedometer.html</link>
				<guid isPermaLink="true">https://qiaolibo.github.io/coding/CoreMotion%E6%A1%86%E6%9E%B6-CMPedometer.html</guid>
			</item>
		
			<item>
				<title>Swift基础语法（二）</title>
				
				
					<description>&lt;p&gt;本篇作为Swift的第二篇，主要简述Swift中的集合类型&lt;/p&gt;

</description>
				
				<pubDate>Fri, 22 Apr 2016 16:33:25 +0000</pubDate>
				<link>https://qiaolibo.github.io/coding/Swift%E5%9F%BA%E7%A1%80%E8%AF%AD%E6%B3%95-%E4%BA%8C.html</link>
				<guid isPermaLink="true">https://qiaolibo.github.io/coding/Swift%E5%9F%BA%E7%A1%80%E8%AF%AD%E6%B3%95-%E4%BA%8C.html</guid>
			</item>
		
			<item>
				<title>Swift基础语法（一）</title>
				
				
					<description>&lt;p&gt;本篇作为Swift的第一篇，主要简述Swift中的基础数据类型&lt;/p&gt;

</description>
				
				<pubDate>Fri, 22 Apr 2016 16:33:25 +0000</pubDate>
				<link>https://qiaolibo.github.io/coding/Swift%E5%9F%BA%E7%A1%80%E8%AF%AD%E6%B3%95-%E4%B8%80.html</link>
				<guid isPermaLink="true">https://qiaolibo.github.io/coding/Swift%E5%9F%BA%E7%A1%80%E8%AF%AD%E6%B3%95-%E4%B8%80.html</guid>
			</item>
		
	</channel>
</rss>
