<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3339760734887599546</id><updated>2026-08-02T23:26:20.075+09:00</updated><category term="iOS開発"/><category term="Objective-C"/><category term="Tips"/><category term="CoreAnimation"/><category term="MacOS"/><category term="Swift"/><category term="iOS9"/><category term="xcode6"/><category term="xcode7"/><category term="Storyboard"/><category term="FMDB"/><category term="iOS8"/><category term="リリース手順"/><category term="Blogger"/><category term="OAuth2"/><category term="OS X El Capitan"/><category term="OS X Yosemite"/><category term="QRHub"/><category term="Swift2"/><category term="SyntaxHighlighter"/><category term="UIScrollViewDelegate"/><category term="UIView"/><category term="iOS7"/><category term="iPhone5"/><title type='text'>Selection 9</title><subtitle type='html'>iOSアプリケーション開発に必要な知識を中心にMac/iOS/Tipsをまとめるブログ</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://selection9.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://selection9.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>takuran</name><uri>http://www.blogger.com/profile/12874276242226985637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>62</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3339760734887599546.post-8206250181644309142</id><published>2016-07-06T23:37:00.000+09:00</published><updated>2016-07-06T23:37:18.469+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CoreAnimation"/><category scheme="http://www.blogger.com/atom/ns#" term="iOS9"/><category scheme="http://www.blogger.com/atom/ns#" term="iOS開発"/><category scheme="http://www.blogger.com/atom/ns#" term="xcode7"/><title type='text'>CoreAnimation Lesson.(Lesson2-2) - UIViewAnimationOptions/アニメーションイージングカーブ編</title><summary type="text">
前回(Lesson2-1)ではブロックベースメソッドを使用した簡単なアニメーション実装について説明しました。引き続き、UIViewクラスのブロックベースアニメーションメソッドを使用したアニメーションについて説明していきます。



CoreAnimation Lesson.シリーズへのリンク。

Core Animation Lesson.(Lesson1) - UIViewとCALayer
Core Animation Lesson.(Lesson1-4〜1-6) - CALayerクラスのプロパティ
Core Animation Lesson.(Lesson1-7) - カスタム描画 
Core Animation Lesson.(Lesson2-1) - 基本のアニメーション




アニメーションイージングカーブ


UIViewクラスのブロックベースアニメーションメソッド。
</summary><link rel='replies' type='application/atom+xml' href='http://selection9.blogspot.com/feeds/8206250181644309142/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://selection9.blogspot.com/2016/07/coreanimation-lessonlesson2-2.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/8206250181644309142'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/8206250181644309142'/><link rel='alternate' type='text/html' href='http://selection9.blogspot.com/2016/07/coreanimation-lessonlesson2-2.html' title='CoreAnimation Lesson.(Lesson2-2) - UIViewAnimationOptions/アニメーションイージングカーブ編'/><author><name>takuran</name><uri>http://www.blogger.com/profile/12874276242226985637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgutiKGCvybkyQc8TDLn6i7oTXBWTlC1aF-dP0dC7i_Y7p0ZiLQaHF9qn0XoQYM5X0zEj0z8qCcF67gfPU81auBRD4rAxlOoq9yJHOEdi-Mn2Y2Wi-6N9DTUuwuhVI7vyynOlWvnslBamA/s72-c/linear_curve.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3339760734887599546.post-3297075365531099109</id><published>2016-06-26T18:06:00.001+09:00</published><updated>2016-07-06T23:52:55.900+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CoreAnimation"/><category scheme="http://www.blogger.com/atom/ns#" term="iOS9"/><category scheme="http://www.blogger.com/atom/ns#" term="iOS開発"/><category scheme="http://www.blogger.com/atom/ns#" term="xcode7"/><title type='text'>Core Animation Lesson.(Lesson2-1) - 基本のアニメーション</title><summary type="text">&lt;!-- Core Animation Lesson2-1 --&gt;

アニメーションしてみよう(Lesson2-1)



前回はCALayerの基本的な振る舞いやプロパティについて記載しました。

Lesson1(CALayerのプロパティについて)
Lesson1-4〜(CALayerのプロパティについて続き)
Lesson1-7(カスタム描画)


今回は実際にアニメーションを実践してみます。難しそうな暗黙的アニメーションとか明示的アニメーションの説明は置いておいて、別の機会に説明できればと思います。



一番簡単にアニメーションを実装するには、UIViewクラスのブロックベースアニメーションメソッドを使用することです。
現時点(iOS9)で、ブロックベースのアニメーションメソッドは、大きく3種類ありますね。

 • アニメーション(直線的)
 • トランジションアニメーション(</summary><link rel='replies' type='application/atom+xml' href='http://selection9.blogspot.com/feeds/3297075365531099109/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://selection9.blogspot.com/2016/06/core-animation-lessonlesson2-1.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/3297075365531099109'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/3297075365531099109'/><link rel='alternate' type='text/html' href='http://selection9.blogspot.com/2016/06/core-animation-lessonlesson2-1.html' title='Core Animation Lesson.(Lesson2-1) - 基本のアニメーション'/><author><name>takuran</name><uri>http://www.blogger.com/profile/12874276242226985637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjg4sNdZG-bBroT2JsyjYYoJG2WNXypnGtTLejwfKi0CDzUXNjiI07wqtkas_DAVz85peqM1tU_h4ZIup1GmT1U_zDHha3h6JNrWu247fjJv5n8a9GFHrR7l2vJS9H-z7ik6VkgZUAClvo/s72-c/lesson2-1_01.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3339760734887599546.post-6307010153693442740</id><published>2016-06-14T03:54:00.000+09:00</published><updated>2018-12-05T01:03:43.681+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CoreAnimation"/><category scheme="http://www.blogger.com/atom/ns#" term="iOS開発"/><category scheme="http://www.blogger.com/atom/ns#" term="UIView"/><title type='text'>UIViewのframeとboundsプロパティの違いについて</title><summary type="text">
なんとなく違いは分かっていましたが、いつもframeで事足りていたので、正確には理解していなかったのと、boundsのoriginを変更した時の挙動が分からなかったので調べてみました。



frameとboundsの座標系の違い



簡単に言ってしまうと、frameとはsuperviewを基点に考えた座標系です。boundsとはローカルviewを起点に考えた座標系になります。





左側の図はviewの左上の原点が(0, 0)の幅150、高さ200のview。
右側の図はviewの左上の原点が(50, 50)で同サイズのview。
viewのframe値に関係なくboundsは自身の座標系を示すので常にoriginは(0, 0)を示していますね。sizeはframeもboundsも同じ値で(150, 200)です。
この例ではboundsのoriginはframeのorigin</summary><link rel='replies' type='application/atom+xml' href='http://selection9.blogspot.com/feeds/6307010153693442740/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://selection9.blogspot.com/2016/06/uiviewframebounds.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/6307010153693442740'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/6307010153693442740'/><link rel='alternate' type='text/html' href='http://selection9.blogspot.com/2016/06/uiviewframebounds.html' title='UIViewのframeとboundsプロパティの違いについて'/><author><name>takuran</name><uri>http://www.blogger.com/profile/12874276242226985637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2ynwOtFImf0W-VX1Z_Td0d5-Xv1xjH09T1nAcMxlR3CRM3RG4KvnGqIw8u7lr3BY6XWW2FehUW_kaPMq_d2w0m670htDCMHw_VpoREs_q7mBJIx0hulU1Xxro_1LPC8wOPobVteM4N5Y/s72-c/frame_vs_bounds.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3339760734887599546.post-7393185546814717146</id><published>2016-03-29T02:33:00.001+09:00</published><updated>2016-03-29T02:33:40.466+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="QRHub"/><title type='text'>QRHub v1.1.0 (QRコード読み取り、作成アプリ)をリリースしました。</title><summary type="text">
QRHubとは


QRコードの読取り、作成アプリ(無料)です。
そもそもQRコードの読み取りアプリは既に素晴らしいアプリが沢山存在します。私がどうしてこのアプリを作ったのか理由を書いておきます。そして、この理由がこのアプリの特徴と言うことにもなるでしょう。









私がこのアプリを作った理由(このアプリの特徴)



大前提としてQRコードを使う頻度がそこそこある状況で、特に読み取りだけでなく、作成をして他のリーダーに読み取ってもらうような用途になります。



QRコードを作成して表示した時に、QRコードの拡大縮小が出来ない。

大抵は画面一杯に表示されます。4.7インチの画面では大きいです、大きすぎるのです。大き過ぎて、読み取り機にかざしても失敗する場合があります。QRHubでは、QRコードの拡大縮小表示をサポートしています。


読み取り、作成履歴からQRコードを作成</summary><link rel='replies' type='application/atom+xml' href='http://selection9.blogspot.com/feeds/7393185546814717146/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://selection9.blogspot.com/2016/03/qrhub-v110-qr.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/7393185546814717146'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/7393185546814717146'/><link rel='alternate' type='text/html' href='http://selection9.blogspot.com/2016/03/qrhub-v110-qr.html' title='QRHub v1.1.0 (QRコード読み取り、作成アプリ)をリリースしました。'/><author><name>takuran</name><uri>http://www.blogger.com/profile/12874276242226985637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGfBeVS3eBOn3RGYpsFRcykVMnsfOAbzlmGKX-N8CDdl3EdxpQy4jGEL2-wLsr0SX51d4kBz6JeTX2I2W0BV27yAwxr8wFl9TweLFi8saW-c2rgBsGVTtOA-Xeb6PAfNB8hKqPF7mUkoI/s72-c/QRHub1.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3339760734887599546.post-6475802274212173958</id><published>2015-11-23T15:21:00.002+09:00</published><updated>2015-11-23T16:47:14.988+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iOS9"/><category scheme="http://www.blogger.com/atom/ns#" term="iOS開発"/><category scheme="http://www.blogger.com/atom/ns#" term="xcode7"/><category scheme="http://www.blogger.com/atom/ns#" term="リリース手順"/><title type='text'>iOSアプリケーションリリース手順(2015年11月版) (2/2)</title><summary type="text">前回の続きから

引き継き、以下の流れで説明していきます。


配布用Certificateファイルの作成
配布用Certificateファイルの作成の確認
AppIDの作成
配布用Provisioningファイルの作成
XcodeへProvisioningファイルの取り込み
新規Appの登録
アプリケーション詳細情報登録
アーカイブの作成とアップロード

「6.新規Appの登録」からになります。1〜5までは前頁(iOSアプリケーションリリース手順(2015年11月版) (1/2))の方を参照して下さい。

&lt;!-- 新規Appの登録 --&gt;


新規Appの登録


新規Appの登録はiTunes Connetへ接続しての作業になります。


iTunes Connectにサインインします。



iTunes Connect




「マイApp」を選択します。左上にある「＋」アイコ</summary><link rel='replies' type='application/atom+xml' href='http://selection9.blogspot.com/feeds/6475802274212173958/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://selection9.blogspot.com/2015/11/ios201511-22.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/6475802274212173958'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/6475802274212173958'/><link rel='alternate' type='text/html' href='http://selection9.blogspot.com/2015/11/ios201511-22.html' title='iOSアプリケーションリリース手順(2015年11月版) (2/2)'/><author><name>takuran</name><uri>http://www.blogger.com/profile/12874276242226985637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi56QKzFKB0zYr0hrc7_pS5mBLRkXe-DUkfLPvCHpHULb5aTwQXo9uHb8nUiXQy6oy2fFvPXHkEFwdxx0-Fqx64jI1tCKXXtgdqxlR0o7qZkIp8QIzNM97ry9f8rmC27nPl1WGS6IINvv4/s72-c/iTunes_Connect.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3339760734887599546.post-8579964325655329885</id><published>2015-11-23T12:11:00.000+09:00</published><updated>2015-11-23T15:24:20.052+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iOS9"/><category scheme="http://www.blogger.com/atom/ns#" term="iOS開発"/><category scheme="http://www.blogger.com/atom/ns#" term="xcode7"/><category scheme="http://www.blogger.com/atom/ns#" term="リリース手順"/><title type='text'>iOSアプリケーションリリース手順(2015年11月版)  (1/2)</title><summary type="text">&lt;!-- はじめに --&gt;



はじめに


本投稿は2015年11月現在の情報を元に作成しています。XcodeやiTunes Connectの仕様はバージョンアップに伴い変更される可能性がありますので注意して下さい。

加えて、OSとXcodeのバージョンやその他前提条件を以下に記載しておきますね。



OS: OS X El Capitan 10.11.1
Xcode: 7.1
Apple Developer Programには入会済み
XcodeへのApple IDアカウント登録済み
メンバーセンターやiTunes Connectへアクセスする場合はブラウザにSafariを用いてアクセスすること


&lt;!-- xcode logo image --&gt;





&lt;!--  全体の流れ --&gt;



全体の流れ


iOSアプリケーションのリリース作業はおおまかに以下の流れになり</summary><link rel='replies' type='application/atom+xml' href='http://selection9.blogspot.com/feeds/8579964325655329885/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://selection9.blogspot.com/2015/11/ios201511-12.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/8579964325655329885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/8579964325655329885'/><link rel='alternate' type='text/html' href='http://selection9.blogspot.com/2015/11/ios201511-12.html' title='iOSアプリケーションリリース手順(2015年11月版)  (1/2)'/><author><name>takuran</name><uri>http://www.blogger.com/profile/12874276242226985637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguYHHlhQGdbPJbQimXbyaz3HA0et7zcRqhqbcuLqa4Vz5WU30lSn9TXFvwkcPJke_YZe7ILBTEm6yc-_lVB54AYwrYhyphenhyphen3pgIw-AfhAhx1ur4qzgrPLS5Klti2PhBXUsZ8PQg7kvLq75eo/s72-c/QRHub_xcodeproj.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3339760734887599546.post-389805766598317038</id><published>2015-06-29T02:59:00.000+09:00</published><updated>2016-07-01T11:30:42.424+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iOS9"/><category scheme="http://www.blogger.com/atom/ns#" term="iOS開発"/><category scheme="http://www.blogger.com/atom/ns#" term="Swift2"/><category scheme="http://www.blogger.com/atom/ns#" term="xcode7"/><title type='text'>Swift2から新たに導入されたguardステートメントの用途について(Swift2, iOS9)</title><summary type="text">
Swift2/iOS9から新たにguardステートメントが導入されています。guardステートメントはifステートメントと似ていますが、その本質的な所はまったく異なる様です。guardステートメントの特徴を述べると以下のようになるでしょう。



エラー判定で使用することを想定しているよ
ついでにアンラップもしちゃうよ
可読性上がったよね

という所ではないでしょうか。一見、ifステートメントと違いがなさそうですが、可読性の観点から見るとその性質が異なっている事が分かると思います。



エラー判定で使用することを想定している



guradステートメントでは、必ずreturn, break, continue, throwを使用して現在のスコープを抜けるか、@noreturn属性のついたメソッドを呼び出す必要があります。つまり、これは想定しない値を受信して処理続行不可能な場合に現在</summary><link rel='replies' type='application/atom+xml' href='http://selection9.blogspot.com/feeds/389805766598317038/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://selection9.blogspot.com/2015/06/swift2guardswift2-ios9.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/389805766598317038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/389805766598317038'/><link rel='alternate' type='text/html' href='http://selection9.blogspot.com/2015/06/swift2guardswift2-ios9.html' title='Swift2から新たに導入されたguardステートメントの用途について(Swift2, iOS9)'/><author><name>takuran</name><uri>http://www.blogger.com/profile/12874276242226985637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3339760734887599546.post-8318270535141096187</id><published>2015-05-09T11:26:00.000+09:00</published><updated>2015-10-17T11:55:31.218+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="OS X El Capitan"/><category scheme="http://www.blogger.com/atom/ns#" term="OS X Yosemite"/><category scheme="http://www.blogger.com/atom/ns#" term="Tips"/><title type='text'>OS X Yosemiteのアニメーションが遅いときにやったこと(2008-2012 Dual-GPU MacBook Pro)</title><summary type="text">
Yosemiteさんアニメーションがカックカクやん


今更、Yosemiteのアニメーションが重い時にやったことを書きます。前提条件として2008-2012年までに発売されたDual-GPUを搭載しているMacBook Proが対象です。Dual-GPUはIntelのHDグラフィックスとディスクリートGPU(高性能)が2つ搭載されていて、使用状況に合わせてGPUを切り替えることで省電力に貢献しているとのこと。ディスクリートGPUの方が高性能なので、もちろんアニメーションについてもディスクリートGPUの方が良いと思っていたのですが、どうも逆の様です。Yosemiteのアニメーションだけで言うと確実にIntelのHDグラフィックスの方がヌルヌル動きます。(あくまで私の環境。MacBook Pro(15-inch, Mid 2010), OS X Yosemite 10.10.3, </summary><link rel='replies' type='application/atom+xml' href='http://selection9.blogspot.com/feeds/8318270535141096187/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://selection9.blogspot.com/2015/05/os-x-yosemite2008-2012-dual-gpu-macbook.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/8318270535141096187'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/8318270535141096187'/><link rel='alternate' type='text/html' href='http://selection9.blogspot.com/2015/05/os-x-yosemite2008-2012-dual-gpu-macbook.html' title='OS X Yosemiteのアニメーションが遅いときにやったこと(2008-2012 Dual-GPU MacBook Pro)'/><author><name>takuran</name><uri>http://www.blogger.com/profile/12874276242226985637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe8qICntc-t0dBsCE4AsL8zLcBKFxKVwtHsNA6OOvxoUleE-fRpMhmPpXp1Fv_vUGKvmhpQPeV9A7AbrUYp1Tg52czFYoKaOjDY8p6yam8ZK3PnLSxgvtt1_mxwXCzL2Eaab6P2V1VwzU/s72-c/%E3%81%93%E3%81%AE_Mac_%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3339760734887599546.post-4007515145516706021</id><published>2015-05-06T19:01:00.001+09:00</published><updated>2016-07-06T23:51:52.432+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CoreAnimation"/><category scheme="http://www.blogger.com/atom/ns#" term="iOS開発"/><category scheme="http://www.blogger.com/atom/ns#" term="Swift"/><category scheme="http://www.blogger.com/atom/ns#" term="xcode6"/><title type='text'>Core Animation Lesson.(カスタム描画/Lesson1-7)</title><summary type="text">&lt;!-- Core Animation Lesson1(UIView and CALayer) --&gt;

Core Animation Lesson.(Lesson1-7)



カスタム描画.(Lesson1-7)


CALayerのcontentsプロパティを設定するとこだけが背景画像を描画する方法では有りません。UIViewのdrawRectメソッドを実装する事でCoreGraphicsやUIKitを利用し、ダイレクトに背景画像を描画することができます。drawRectメソッドにはデフォルト実装が有りませんが、Viewが最初に表示された時に一度呼び出され、以降は更新が必要になった場合に自動的に呼び出されます。明示的に再描画が必要な時はsetNeedsDisplayを呼び出す事で再描画が行われますので、再描画したいからといってコード内からdrawRectメソッドを直接呼び出してはい</summary><link rel='replies' type='application/atom+xml' href='http://selection9.blogspot.com/feeds/4007515145516706021/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://selection9.blogspot.com/2015/05/core-animation-lessonlesson1-7.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/4007515145516706021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/4007515145516706021'/><link rel='alternate' type='text/html' href='http://selection9.blogspot.com/2015/05/core-animation-lessonlesson1-7.html' title='Core Animation Lesson.(カスタム描画/Lesson1-7)'/><author><name>takuran</name><uri>http://www.blogger.com/profile/12874276242226985637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAUrhPMv7ZVMRue0bGXJg_BKvLRp66v0EZsNqxaO3McpYNrAp8v1o0DEEOn5FI2TeWC9MxHPlUt0HCGRxLCEVRkqYFKvK8H1fQ8ENRDAChi2bGlq49uzyZvTyzd8k2z02grNFYgPQDej4/s72-c/Main_storyboard_%E2%80%94_Edited.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3339760734887599546.post-9214689278814613240</id><published>2015-04-12T01:24:00.000+09:00</published><updated>2016-07-06T23:50:04.684+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CoreAnimation"/><category scheme="http://www.blogger.com/atom/ns#" term="iOS開発"/><category scheme="http://www.blogger.com/atom/ns#" term="Swift"/><category scheme="http://www.blogger.com/atom/ns#" term="xcode6"/><title type='text'>Core Animation Lesson.(Lesson1-4〜)</title><summary type="text">
前回(Core Animation Lesson1(Lesson1-1〜))
から引き続きCALayerのプロパティについて調査しました。



contentsScaleプロパティ(CALayer)



本プロパティ値はレイヤ上の背景画像とView上のピクセルサイズ比率を定義するプロパティです。要するにRetinaディスプレイか否かを設定します。contentsScaleの値は通常のディスプレイで1.0を指し、Retinaディスプレイの場合は2.0となります。デフォルト値は1.0です。
この値は以下の様にUIScreenクラスから取得するのが一般的のようです。


&lt;!-- show source --&gt;

    // set contentsScale to The Retina value
    myView.layer.contentsScale = </summary><link rel='replies' type='application/atom+xml' href='http://selection9.blogspot.com/feeds/9214689278814613240/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://selection9.blogspot.com/2015/04/core-animation-lessonlesson1-4.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/9214689278814613240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/9214689278814613240'/><link rel='alternate' type='text/html' href='http://selection9.blogspot.com/2015/04/core-animation-lessonlesson1-4.html' title='Core Animation Lesson.(Lesson1-4〜)'/><author><name>takuran</name><uri>http://www.blogger.com/profile/12874276242226985637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbiA81rJbwzEXp6DKZxPH-EIdCA7Xm0ty9NP5n_JuYybnTnH1kSM9xHB5ElKwZ-jfSd-tMhucZcL2VJ9bscRhPOKThaXmtK3LIejy3gMeWqw-pwbeChyQV2M1CVcTnPTGUbQzM_65Pqcs/s72-c/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88_2015_04_08_1_30.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3339760734887599546.post-6041894704337854734</id><published>2015-03-16T00:26:00.001+09:00</published><updated>2016-07-06T23:48:38.182+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CoreAnimation"/><category scheme="http://www.blogger.com/atom/ns#" term="iOS開発"/><category scheme="http://www.blogger.com/atom/ns#" term="Swift"/><category scheme="http://www.blogger.com/atom/ns#" term="xcode6"/><title type='text'>Core Animation Lesson.(Lesson1)</title><summary type="text">

Core Animationに関して、画像、座標、エフェクト、トランスフォーム、アニメーション等をシリーズ化してまとめていきたいと考えています。



Core Animationとは


Core Animationと聞くと、なにかアニメーションに特化した小難しいFrameworkのような印象を受けてしまいますが、アニメーション自体はCore Animationが提供する数ある特徴の一部であり、アニメーションだけに特化したFrameworkではありません。Core Animationはビジュアルコンテンツを画面描画する機能群から構成された共通基盤で、より高速に動作するよう設計されています。



UIViewとCALayer


Core Animation はどの様にして使うのでしょうか。それは、UIViewクラスで既に使用されています。
UIViewは、画像やテキスト、動画等の</summary><link rel='replies' type='application/atom+xml' href='http://selection9.blogspot.com/feeds/6041894704337854734/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://selection9.blogspot.com/2015/03/core-animation-lessonlesson1.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/6041894704337854734'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/6041894704337854734'/><link rel='alternate' type='text/html' href='http://selection9.blogspot.com/2015/03/core-animation-lessonlesson1.html' title='Core Animation Lesson.(Lesson1)'/><author><name>takuran</name><uri>http://www.blogger.com/profile/12874276242226985637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBsIPO8op-yOO1WhTqzX1CgQXq9UpO-bma0N8AJo7ydGGGDRWFp4f9ONFwojH3E-8xqmcl0M0dNJsWWLV1mb3D5e26aEUriToUXk_N4Mg9NnmmQqGYLPjyNp8PPpJr5YH7sa-vrcK_GBE/s72-c/core-animation-hero.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3339760734887599546.post-6216483566403931301</id><published>2014-10-16T23:27:00.001+09:00</published><updated>2014-10-18T20:26:48.556+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iOS開発"/><category scheme="http://www.blogger.com/atom/ns#" term="Tips"/><category scheme="http://www.blogger.com/atom/ns#" term="xcode6"/><title type='text'>Xcode6でView Debuggingすると必ずkernel panicになる場合の対処法</title><summary type="text">
View Debuggingを行い、3Dローテーションすると落ちる


Xcode6の新機能であるView Debuggingですが、私の環境だと必ずkernel panicが発生しOSごと落ちてしまいます。(再現率100%)


カーネルパニック時のログ(一部抜粋)


panic(cpu 0 caller 0xffffff800cedc43e): Kernel trap at 0xffffff7f8e882115, type 14=page fault, registers:
CR0: 0x000000008001003b, CR2: 0x00000000000089f4, CR3: 0x0000000022d92000, CR4: 0x0000000000000660
RAX: 0x0000000020000901, RBX: 0x00000000000000fc, RCX: </summary><link rel='replies' type='application/atom+xml' href='http://selection9.blogspot.com/feeds/6216483566403931301/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://selection9.blogspot.com/2014/10/xcode6view-debuggingkernel-panic.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/6216483566403931301'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/6216483566403931301'/><link rel='alternate' type='text/html' href='http://selection9.blogspot.com/2014/10/xcode6view-debuggingkernel-panic.html' title='Xcode6でView Debuggingすると必ずkernel panicになる場合の対処法'/><author><name>takuran</name><uri>http://www.blogger.com/profile/12874276242226985637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5ThyphenhyphenYCuZMezVxghdiCIdoZSnBKhB7rWNx7haDvR-eP12m6cTvZOSHZxom-C2yzAW0MZCu4vLm1e_x2IYmE9djvmtGtY9ElYvqaRE9sWRuWF2UWL9jFIbBLtf1JjypI4Lt0LgZ9Obx21k/s72-c/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88_2014_10_16_22_49.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3339760734887599546.post-7874684625808800675</id><published>2014-10-05T19:49:00.000+09:00</published><updated>2016-07-01T12:18:44.819+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iOS8"/><category scheme="http://www.blogger.com/atom/ns#" term="iOS開発"/><category scheme="http://www.blogger.com/atom/ns#" term="Storyboard"/><category scheme="http://www.blogger.com/atom/ns#" term="xcode6"/><title type='text'>Xcode6ではStoryboardで指定するSegue名が変更されている</title><summary type="text">
Storyboardで指定するSegue(セグエ)名


Xcode6ではSegue名が変更され、以前まで使用していたpush, modal等のSegueはDeprecated Segueとなり非推奨となってしまいました。互換性のために残されていると考えられるので、今後は新しいSegueを使用した方が良いでしょう。





新しいSegue(セグエ)名について





 Segue(セグエ)名の対応表
 
  Xcode5
  Xcode6
  機能概要
 
 
  Push
  Show
  
NavigationControllerのNavigationスタックにViewControllerを追加します。画面はアニメーションしながら次の画面(ViewController)を表示します。Navigation用の戻るボタンやエッジスワイプで元の画面に簡単に戻れます。
  
 
 
</summary><link rel='replies' type='application/atom+xml' href='http://selection9.blogspot.com/feeds/7874684625808800675/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://selection9.blogspot.com/2014/10/xcode6storyboadsegue.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/7874684625808800675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/7874684625808800675'/><link rel='alternate' type='text/html' href='http://selection9.blogspot.com/2014/10/xcode6storyboadsegue.html' title='Xcode6ではStoryboardで指定するSegue名が変更されている'/><author><name>takuran</name><uri>http://www.blogger.com/profile/12874276242226985637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpyHWs_84DbWkp4bnE2Z_47sY23BduV0w7SJLLSviyrAkGJHSc1C4J_p4ZfnFtOF3jOLOd0mD7wzBbYPe7WwBZE-omnUP4XKlAVPhKfWI_SjkDyyT2NKyPMcqDEBjM2pJ5T13cO-kX95U/s72-c/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88_2014_10_05_17_31.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3339760734887599546.post-6294492665644480121</id><published>2014-09-16T02:38:00.000+09:00</published><updated>2016-07-01T15:22:26.830+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iOS8"/><category scheme="http://www.blogger.com/atom/ns#" term="iOS開発"/><category scheme="http://www.blogger.com/atom/ns#" term="Swift"/><title type='text'>UITableViewのセルの高さを動的に計算するSelf-Sizing Cellsを試してみた(iOS8, Swift)</title><summary type="text">
はじめに

UITableviewCellの高さを動的に変更する実装はiOS7の頃(?)から可能で、iOS8では実装が簡略されてさらにパフォーマンスが高いよといったお話です。


どういう点が簡略化されたの？

iOS7では主に以下の実装が必要でした。


AutoLayoutを有効にしてConstraintsを設定
tableView:heightForRowAtIndexPath: メソッド実装によるセルの高さ計算
tableView:cellForRowAtIndexPath: メソッド実装


iOS8の場合、 2番目の高さを計算する処理がまるっと省略可能で、おまじない程度の設定で済みます。


Constraintsの追加と設定(AutoLayout)

本例ではUITableViewControllerとして実装されたUITableVivew及び</summary><link rel='replies' type='application/atom+xml' href='http://selection9.blogspot.com/feeds/6294492665644480121/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://selection9.blogspot.com/2014/09/uitableviewself-sizing-cellsios8-swift.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/6294492665644480121'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/6294492665644480121'/><link rel='alternate' type='text/html' href='http://selection9.blogspot.com/2014/09/uitableviewself-sizing-cellsios8-swift.html' title='UITableViewのセルの高さを動的に計算するSelf-Sizing Cellsを試してみた(iOS8, Swift)'/><author><name>takuran</name><uri>http://www.blogger.com/profile/12874276242226985637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdx3L2t_XSrXFfxIK4CEqFm9-7Dez5_thmOk9dEievvcfZ1N671XTHpLRo_DbQ7i2A10YaGUYGhhLw-VYU742RttcnRW0DXgVGN6v2Vz-3ZkIqO6ADdicCRhWAPhdZTJ-4K838sT9WJGE/s72-c/Main_storyboard_%E2%80%94_Edited.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3339760734887599546.post-3021491448341284763</id><published>2014-09-08T03:25:00.000+09:00</published><updated>2016-07-01T15:28:23.881+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="FMDB"/><category scheme="http://www.blogger.com/atom/ns#" term="iOS8"/><category scheme="http://www.blogger.com/atom/ns#" term="iOS開発"/><category scheme="http://www.blogger.com/atom/ns#" term="Objective-C"/><category scheme="http://www.blogger.com/atom/ns#" term="Swift"/><title type='text'>Swift環境からObjective-Cで書かれたCocoaPodsを使用する(SwiftでFMDBを使う)</title><summary type="text">
Swift環境からObjective-Cで書かれたCocoaPodsのライブラリを利用してみる

ライブラリはFMDBを取り込んで、FMDBを使用した簡単なプログラムをSwiftを用いて作成します。



空プロジェクトの作成

まずは、空プロジェクトを作成し、そしてすぐに閉じます。CocoaPodsでFMDBを取り込むプロジェクトファイルだけを前もって作成します。





※因みに本サンプルはXcode6 beta7にて作成しています。



podfileの作成とインストール


podfileの内容を以下のようにして作成したプロジェクトの直下に作成し、



pod &#39;FMDB&#39;

以下コマンドを実行してインストールを実行。



% pod install

インストールしたら、作成されたワークスペース(プロジェクトファイルじゃないです)を開きます。
下記の様にコマンドライン</summary><link rel='replies' type='application/atom+xml' href='http://selection9.blogspot.com/feeds/3021491448341284763/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://selection9.blogspot.com/2014/09/swiftobjective-ccocoapods-swiftfmdb.html#comment-form' title='2 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/3021491448341284763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/3021491448341284763'/><link rel='alternate' type='text/html' href='http://selection9.blogspot.com/2014/09/swiftobjective-ccocoapods-swiftfmdb.html' title='Swift環境からObjective-Cで書かれたCocoaPodsを使用する&lt;br /&gt;(SwiftでFMDBを使う)'/><author><name>takuran</name><uri>http://www.blogger.com/profile/12874276242226985637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAC0yvo3FXeVI5tcBaVCSHvrkbxfepSJDaHFNwKTNZgBJD0BERQX6d8sqLvhKOBowXFOCBUJtlxuzWFwFEdyiya2hJk-iWaqg-hyLgNZ8xPX5wtIfQEiCKPToJJwD_5hFX1jRwJBrx1xA/s72-c/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88_2014_07_27_16_16.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3339760734887599546.post-259246968143162415</id><published>2014-04-30T02:23:00.000+09:00</published><updated>2016-07-01T15:31:16.788+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iOS開発"/><category scheme="http://www.blogger.com/atom/ns#" term="Objective-C"/><category scheme="http://www.blogger.com/atom/ns#" term="UIScrollViewDelegate"/><title type='text'>UIScrollViewDelegateの実装とスクロールイベントの通知について(iOS)</title><summary type="text">UIScrollViewクラスにはそのスクロールイベント等を通知するdelegateが定義されており、
プロトコル UIScrollViewDelegate として定義されています。
delegateの各メソッドが呼び出されるタイミングについて、以下にまとめたいと思います。


UIScrollViewDelegateの用途

そもそもUIScrollViewDelegateは何のために使われるのでしょうか？よくUITableViewControllerを利用しているアプリでNavigationBarやToolBarがスクロールに応じて表示/非表示されるものがありますが、そのようにスクロールのイベントに応じて何かしらのアクションを実行したい場合に利用出来ます。


UIScrollViewDelegateプロトコル

UIScrollViewDelegateには大きく


スクロール、</summary><link rel='replies' type='application/atom+xml' href='http://selection9.blogspot.com/feeds/259246968143162415/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://selection9.blogspot.com/2014/04/uiscrollviewdelegateios.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/259246968143162415'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/259246968143162415'/><link rel='alternate' type='text/html' href='http://selection9.blogspot.com/2014/04/uiscrollviewdelegateios.html' title='UIScrollViewDelegateの実装とスクロールイベントの通知について(iOS)'/><author><name>takuran</name><uri>http://www.blogger.com/profile/12874276242226985637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdwFiWNzbbOPAm7GpXmXSo_6D5Oi0drvGmnxZkqpb9vzDPE1k1pt3CtlmvEwAxvtsV3WI0yoVN4-4ZkXDpr-9iH9B2d5uKxQnbi2yb_c1EldfowFH_nF_C3L8YGJwmqyFY3D0rJmJ8gSk/s72-c/%25E3%2582%25B9%25E3%2582%25AF%25E3%2583%25AA%25E3%2583%25BC%25E3%2583%25B3%25E3%2582%25B7%25E3%2583%25A7%25E3%2583%2583%25E3%2583%2588_2014_05_02_13_13.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3339760734887599546.post-6737832311866497708</id><published>2014-03-11T03:10:00.000+09:00</published><updated>2016-07-01T15:33:54.583+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iOS開発"/><category scheme="http://www.blogger.com/atom/ns#" term="Objective-C"/><title type='text'>Objective-C リテラル構文備忘録(Objective-C Literals)</title><summary type="text">Objective-Cリテラル構文備忘録


NSNnumber

特筆することは無いが、@(expression)には注意。


    //NSNumber literals
    
    //bool
    //NSNumber *boolYesValue = [NSNumber numberWithBool:YES];
    NSNumber *boolYesValue = @YES;
    NSLog(@&quot;%@&quot;, boolYesValue); // 1
    //NSNumber *boolNoValue = [NSNumber numberWithBool:NO];
    NSNumber *boolNoValue = @NO;
    NSLog(@&quot;%@&quot;, boolNoValue); // 0
    
    //char
    //NSNumber</summary><link rel='replies' type='application/atom+xml' href='http://selection9.blogspot.com/feeds/6737832311866497708/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://selection9.blogspot.com/2014/03/objective-c-objective-c-literals.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/6737832311866497708'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/6737832311866497708'/><link rel='alternate' type='text/html' href='http://selection9.blogspot.com/2014/03/objective-c-objective-c-literals.html' title='Objective-C リテラル構文備忘録(Objective-C Literals)'/><author><name>takuran</name><uri>http://www.blogger.com/profile/12874276242226985637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3339760734887599546.post-7797479973707325451</id><published>2014-02-27T01:20:00.000+09:00</published><updated>2016-07-01T15:37:15.631+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iOS開発"/><category scheme="http://www.blogger.com/atom/ns#" term="OAuth2"/><category scheme="http://www.blogger.com/atom/ns#" term="Objective-C"/><title type='text'>iOSでOAuth2認証を行う(feedlyクライアントの作成) </title><summary type="text">The feedly Cloud APIが一般公開されていることはご存知の方は多いと思うが、APIを利用している方は
そう多く無いのではないだろうか。
The feedly Cloud APIはsandboxという形式で開発者に開発用環境を提供している。
開発の序盤はこの開発環境を使用してAPIの使用方法やアプリの動作確認を行い、
その後リリースする準備が出来たら本環境で利用可能なクライアントIDを払い出してもらう
という流れになると思う。(本環境に対応したクライアントIDの払い出しは別途Emailで申請する必要があるようだ)


iOSでのOAuth2認証

The feedly Cloud APIを使用するにはまずOAuth2認証が必要だ。これが一番厄介で(昔よりは良くなっている)
認証さえ済ませてしまえば、後はAPIを呼び出して必要な情報を取り出し、好きなように処理すれば良い。
</summary><link rel='replies' type='application/atom+xml' href='http://selection9.blogspot.com/feeds/7797479973707325451/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://selection9.blogspot.com/2014/02/iosoauth2feedly.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/7797479973707325451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/7797479973707325451'/><link rel='alternate' type='text/html' href='http://selection9.blogspot.com/2014/02/iosoauth2feedly.html' title='iOSでOAuth2認証を行う(feedlyクライアントの作成) '/><author><name>takuran</name><uri>http://www.blogger.com/profile/12874276242226985637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6DIzdEnHzBSN1wAS_eXvff_bkPDN_Nj4ppwiF7ggw9MPV_7LmPRiyb6gdz8oFejn6dBnpKKA0v5-WD2qVeFuliROlXe4YQddBHVDzL_LYmoNOHRg4jTTeW3joMqANviOezPkWt2I-hZc/s72-c/%25E3%2583%2595%25E3%2582%259A%25E3%2583%25AC%25E3%2582%25BB%25E3%2582%2599%25E3%2583%25B3%25E3%2583%2586%25E3%2583%25BC%25E3%2582%25B7%25E3%2583%25A7%25E3%2583%25B3_3.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3339760734887599546.post-1394385796663659894</id><published>2013-10-16T04:01:00.001+09:00</published><updated>2016-07-01T15:40:23.238+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iOS7"/><category scheme="http://www.blogger.com/atom/ns#" term="iOS開発"/><title type='text'>iOS7 NavigationControllerには標準でスワイプで戻る機能が実装されている(メールアプリ、メッセージアプリ等の便利技) </title><summary type="text">　iOS7になってApple標準アプリのメール、メッセージ、設定等がスワイプ(左端→右)で戻れるようになっています。
スワイプで戻れるようになって、左上のNavigationItemボタンに指が届きにくいと思っていた方にはかなり便利な機能実装だと思います。
私自身、左上ボタンは押しづらいといつも思っていたので、この標準機能はかなり嬉しいです。
　残念なことに、このスワイプで戻るには、かなり意識して画面左端から右へスワイプしないと動作しないようです。知らないユーザも多いんじゃないでしょうか。もったいないなぁ。






iOS7でのNavigationControllerの実装

　前述しましたが、iOS7対応アプリのNavigationControllerは標準でスワイプで戻る機能が実装されていると思われます。Apple標準アプリ以外でもスワイプで戻れたので、実装して確認してみました。</summary><link rel='replies' type='application/atom+xml' href='http://selection9.blogspot.com/feeds/1394385796663659894/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://selection9.blogspot.com/2013/10/ios7-navigationcontroller.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/1394385796663659894'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/1394385796663659894'/><link rel='alternate' type='text/html' href='http://selection9.blogspot.com/2013/10/ios7-navigationcontroller.html' title='iOS7 NavigationControllerには標準でスワイプで戻る機能が実装されている(メールアプリ、メッセージアプリ等の便利技) '/><author><name>takuran</name><uri>http://www.blogger.com/profile/12874276242226985637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYMy3B2EgEINlCQhSfplUoPAJt4pkDM0wjfFwSFLA353W33UKyzBwEu8cpSNHbbrS3rRr2WBflmde5ypfIUeqF7w-3r8D2mXS579oF7WdhmGLJ9E6AQ8VtVxV-b60fpdfTfooR6LWMM48/s72-c/0AD4B991-F7B1-42D9-8AFD-B3990C72BF72.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3339760734887599546.post-7694013066023801402</id><published>2013-07-15T02:52:00.001+09:00</published><updated>2016-07-01T15:43:51.008+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Storyboard"/><title type='text'>StoryboardでNavigationControllerの戻るを実装する(UnWindによる実装) </title><summary type="text">iOS5まではStoryboardを利用して画面遷移をある特定の状態へ戻すことができませんでした。iOS6からはこの弱点が克服され、
Storyboardにて戻るが実装可能になっています。
具体的には、モーダルViewやNavigationControllerのpushにて遷移させた画面を戻す事が出来ます。


今回の目標：NavigationControllerにて画面を遷移(push)し元の画面に戻る実装をUnWindにて実装する。

NavigationControllerを使用し、ViewController間の移動(push)や戻る(pop)実装をStoryboardにて実装する。
コードによる実装ではたかだかpopToViewController:animated:メソッドを呼び出すだけで、無理にStoryboard
にて実装する必要性を感じない方もおられるかもしれませんが、</summary><link rel='replies' type='application/atom+xml' href='http://selection9.blogspot.com/feeds/7694013066023801402/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://selection9.blogspot.com/2013/07/storyboardnavigationcontrollerunwind.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/7694013066023801402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/7694013066023801402'/><link rel='alternate' type='text/html' href='http://selection9.blogspot.com/2013/07/storyboardnavigationcontrollerunwind.html' title='StoryboardでNavigationControllerの戻るを実装する(UnWindによる実装) '/><author><name>takuran</name><uri>http://www.blogger.com/profile/12874276242226985637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiDh_2yyvK994NfbXpCI-Y6q8wiY3t4FnQAYD9vkuedgXPnDyOKGfcnJkWAhUop8Zf1OlAbk7WW_sCl_GF3JXR4J3ww9eVKlKEECGD6JKQicfNePp4ziO2jp-E3HXheCaZVzelzklLDNU/s72-c/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88_2013_07_14_23_15-12.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3339760734887599546.post-7491066398707659102</id><published>2012-10-01T01:37:00.000+09:00</published><updated>2012-10-27T14:41:55.801+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iPhone5"/><category scheme="http://www.blogger.com/atom/ns#" term="Tips"/><title type='text'>iPhone5用ケース(TUNEWARE CarbonLOOK for iPhone 5 ブラック)</title><summary type="text">みなさまiPhone5購入しましたか？　私は
ソフトバンクオンラインショップ
で申し込み1Week程で入手することが出来ました。
入手後に一番悩むこと。ケースです。そうですケースです、ケースなのです。(3回言ってみましたｗ)
とりあえず、気に入ったケースが見つかるまではハダカで良いやとも思いましたが、どうもiPhone4の時からケースを装着していたので、ケースに包まれていない状態が不安でたまらないのです。


購入したiPhone5用ケース


TUNEWARE CarbonLOOK for iPhone 5 ブラックを購入しました。
というのも、iPhone4の時もこれを使用していたからという、安易な理由だけです。
実は色々とアマゾンや楽天で探してみましたが、あれもこれもで時間ばかりかかり一向に1つに絞る事が出来なかったので、ケースの感触や使用感が分かるという理由で同じものの</summary><link rel='replies' type='application/atom+xml' href='http://selection9.blogspot.com/feeds/7491066398707659102/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://selection9.blogspot.com/2012/10/iphone5tuneware-carbonlook-for-iphone-5.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/7491066398707659102'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/7491066398707659102'/><link rel='alternate' type='text/html' href='http://selection9.blogspot.com/2012/10/iphone5tuneware-carbonlook-for-iphone-5.html' title='iPhone5用ケース(TUNEWARE CarbonLOOK for iPhone 5 ブラック)'/><author><name>takuran</name><uri>http://www.blogger.com/profile/12874276242226985637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrKFPWU6iLsGJjqB44c5Ji4xK239CVOTEwIv08Y-SKvgHb9R4R4Hx7DUs7y4-pRV8B9cbWcMqlofHdSH2APl6tdVNBoSXLyji1nOigyP972IAfZd5QsgrD5yRB6aJXmDBExzRpIhw3_fk/s72-c/IMG_0407.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3339760734887599546.post-4220363858738888706</id><published>2012-08-07T00:16:00.000+09:00</published><updated>2012-10-27T14:24:39.012+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Blogger"/><category scheme="http://www.blogger.com/atom/ns#" term="SyntaxHighlighter"/><category scheme="http://www.blogger.com/atom/ns#" term="Tips"/><title type='text'>Bloggerで急にSyntaxHighlighterの挙動がおかしくなったので調べてみた</title><summary type="text">この記事を書いている現在(2012/8/6)、BloggerでSyntaxHighlighterの挙動がおかしい。


何処がおかしいのか

気付いているのは以下


 行番号が2桁になると潰れて表示される
 変な箇所で改行がはいっている(これは良くわからないけど最後のセミコロンのみ改行されていたり)


1点目は以下のような感じ。これでは逆に読みづらくなってしまう。







CSSを見てみる

どうも怪しいのは、
http://agorbatchev.typepad.com/pub/sh/3_0_83/styles/shCore.css
に定義されている以下の箇所。


.syntaxhighlighter table td.gutter .line {
  padding: 0 0.5em 0 1em !important;
}


この定義の「padding」の値がちょっと</summary><link rel='replies' type='application/atom+xml' href='http://selection9.blogspot.com/feeds/4220363858738888706/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://selection9.blogspot.com/2012/08/bloggersyntaxhighlighter.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/4220363858738888706'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/4220363858738888706'/><link rel='alternate' type='text/html' href='http://selection9.blogspot.com/2012/08/bloggersyntaxhighlighter.html' title='Bloggerで急にSyntaxHighlighterの挙動がおかしくなったので調べてみた'/><author><name>takuran</name><uri>http://www.blogger.com/profile/12874276242226985637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-C5GsHAys4o7sTdnrUeMjMT1IIEn0uPJKTxwM-69N6Lv0j1fybzLoyKd-HC7nlha7_UR7myCNfMgQ2c6urKpecBCBL1uMR6vv3Fmmjd30tt9IJP5ufOb4WENoVGz4BiZykfWjC2dzQzk/s72-c/Selection+9.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3339760734887599546.post-3557446196782081537</id><published>2012-06-26T00:50:00.000+09:00</published><updated>2016-07-01T15:45:28.166+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iOS開発"/><category scheme="http://www.blogger.com/atom/ns#" term="Storyboard"/><title type='text'>iOS Storyboardによる画面遷移の実装(Navigation Controller)</title><summary type="text">iOSアプリケーションでは比較的使うことが多いと思われるNavigation Contorollerですが、storyboardを使ってNavigationControllerの遷移を実装してみる。


今回の目標：Navigation Controllerによる画面遷移をstoryboardで作る

なぞなぞを表示して、その回答の選択肢がボタンになっている。ボタンを押すことで画面遷移し、回答が正解かを画面上に表示するだけのサンプルプログラムを作成する。


プロジェクトの作成

前回のプロジェクト(iOS Storyboardによる画面遷移の実装(Modal View))をそのまま流用します。


NavigationControllerの追加

「Single View Application」から作成した前回のプロジェクトにNavigationControllerを追加する。
</summary><link rel='replies' type='application/atom+xml' href='http://selection9.blogspot.com/feeds/3557446196782081537/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://selection9.blogspot.com/2012/06/ios-storyboardnavigation-controller.html#comment-form' title='3 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/3557446196782081537'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/3557446196782081537'/><link rel='alternate' type='text/html' href='http://selection9.blogspot.com/2012/06/ios-storyboardnavigation-controller.html' title='iOS Storyboardによる画面遷移の実装(Navigation Controller)'/><author><name>takuran</name><uri>http://www.blogger.com/profile/12874276242226985637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJYOPN5CDAyM35__-JOiwaDj2IOoPBBmia08Dy9MaPYgBPenjjOx3hwodAZB3SmxD4h_-RNzspzUa8nRqyToWmsJzS2nV2A_Tbo_YKobzKRXFADTY46WdP_urFg1XSrEWsTbpo3JInh38/s72-c/StoryboardTest.xcodeproj+%25E2%2580%2594+MainStoryboard.storyboard-8.jpg" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3339760734887599546.post-5601252671301988957</id><published>2012-06-22T06:15:00.000+09:00</published><updated>2016-07-01T15:46:53.128+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iOS開発"/><category scheme="http://www.blogger.com/atom/ns#" term="Storyboard"/><title type='text'>iOS Storyboardによる画面遷移の実装(Modal View)</title><summary type="text">iOS5になってから登場したStoryboard、今までInterface Builderを使わない派だったこともあって、手を出していなかったのですが、実はず～っと前から気になってたし使ってみたかったんですよ。

私は以下の点でStoryboardを使う理由があると思う。


 GUI上の1画面で複数のView Controller定義を記述できる
 各View Controller間の遷移をSegue(セグエ)で表現可能でGUI上から編集が可能
 アプリケーション全体の画面遷移が一望出来る




今回の目標：モーダルビューを表示して、閉じてまた元の画面に戻る

とても簡単なものから。モーダルビューを表示して閉じるだけ。ほとんど画面操作のみで出来る。


プロジェクトの作成

プロジェクトを新規作成。「Single View Application」から作成する。









</summary><link rel='replies' type='application/atom+xml' href='http://selection9.blogspot.com/feeds/5601252671301988957/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://selection9.blogspot.com/2012/06/ios-storyboardmodal-view.html#comment-form' title='1 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/5601252671301988957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/5601252671301988957'/><link rel='alternate' type='text/html' href='http://selection9.blogspot.com/2012/06/ios-storyboardmodal-view.html' title='iOS Storyboardによる画面遷移の実装(Modal View)'/><author><name>takuran</name><uri>http://www.blogger.com/profile/12874276242226985637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjd4ZGc_rEDy2dXf6jw8qa8vh7diOLSrTGHDONjnKoJPkgRDwubp01fHpAaqHQQ7A6Q8tiYPbhEWpOhTW43w3yUxpRNrKDyOruCppIxMCr3QBDi1bJPJMY7mD9pFXCWORpT3XM1SNjtMQ/s72-c/Xcode-10.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3339760734887599546.post-7897691821231745377</id><published>2012-05-08T07:57:00.000+09:00</published><updated>2016-07-01T16:01:00.382+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="FMDB"/><category scheme="http://www.blogger.com/atom/ns#" term="iOS開発"/><category scheme="http://www.blogger.com/atom/ns#" term="Objective-C"/><title type='text'>iOSでSQLiteを使う２(FMDBのFMDatabaseQueueクラスを使ってみる)</title><summary type="text">
FMDBにはスレッド間でSQLiteを使用する際のヘルパークラスが提供されています。そのクラスがFMDatabaseQueueです。
このクラスの用途と、どういったシーンで使用していけば良いのかを考えつつ、サンプルプログラムで試してみます。

因みに、FMDBの基本的な使い方に関しては前回書いた
iOSでSQLiteを使う(FMDB)
を参照。


マルチスレッドにおけるFMDatabaseインスタンスに関して


FMDBのREADMEにはFMDatabaseのインスタンスをシングルトンにして、マルチスレッド上から唯一のFMDatabaseインスタンスを
取得して使用することは推奨されておらず、一見うまく動いているようでも、いつかはクラッシュしたり、例外が
発生することになるだろうと書かれています。つまり、FMDatabaseクラスはスレッドセーフでは無いということになります。


</summary><link rel='replies' type='application/atom+xml' href='http://selection9.blogspot.com/feeds/7897691821231745377/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://selection9.blogspot.com/2012/05/iossqlitefmdbfmdatabasequeue.html#comment-form' title='5 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/7897691821231745377'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3339760734887599546/posts/default/7897691821231745377'/><link rel='alternate' type='text/html' href='http://selection9.blogspot.com/2012/05/iossqlitefmdbfmdatabasequeue.html' title='iOSでSQLiteを使う２(FMDBのFMDatabaseQueueクラスを使ってみる)'/><author><name>takuran</name><uri>http://www.blogger.com/profile/12874276242226985637</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1f0B4_ho28dwZGQYavaQZnC8X_02iEVPzGVZtb7PapfizrgnMmcJfb1sDBSFENNx2DAHSJ5BrNG4daIpWwIra9chREsaGPjH0iX-UMjDUQrWJJHTz3Or2C9bwKmwKQYJOvNKrxoa1Qzk/s72-c/FMDBTest.xcodeproj+%25E2%2580%2594+FMDatabase.m.jpg" height="72" width="72"/><thr:total>5</thr:total></entry></feed>