<?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-412839736396758393</id><updated>2024-09-04T22:47:18.909+09:00</updated><title type='text'>素人のiphoneアプリ開発日記</title><subtitle type='html'>毎日コツコツiphoneアプリについて学んでいきます。&#xa;基本的に、メモとして利用をしているので、わかりにくい部分もあるかと思いますが、どうぞ、よろしくお願いいたします。</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://s26phone.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://s26phone.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>s26</name><uri>http://www.blogger.com/profile/16758999971889803306</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>29</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-412839736396758393.post-8974306238666948040</id><published>2011-09-26T07:03:00.000+09:00</published><updated>2011-09-26T07:03:00.150+09:00</updated><title type='text'>ViewControllerの状態変化関数</title><content type='html'>ViewControllerに関しては、読み込みの状態などにより、&lt;br /&gt;呼び出されるメソッドが異なるようだ。&lt;br /&gt;&lt;br /&gt;ViewDidLoad:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 読み込みが完了&lt;br /&gt;ViewDidUnload:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 読み込みがメモリ不足などで終了&lt;br /&gt;ViewWillAppear:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 表示されるタイミング&lt;br /&gt;ViewDidAppear:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 表示されたあと&lt;br /&gt;ViewWillDisappear:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 非表示の時&lt;br /&gt;ViewDidDisappear:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 非表示になった後&lt;br /&gt;&lt;br /&gt;状況に応じて使う事でメモリの節約などに役立てたい</content><link rel='replies' type='application/atom+xml' href='http://s26phone.blogspot.com/feeds/8974306238666948040/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://s26phone.blogspot.com/2011/09/viewcontroller.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/8974306238666948040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/8974306238666948040'/><link rel='alternate' type='text/html' href='http://s26phone.blogspot.com/2011/09/viewcontroller.html' title='ViewControllerの状態変化関数'/><author><name>s26</name><uri>http://www.blogger.com/profile/16758999971889803306</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-412839736396758393.post-1585856119616675047</id><published>2011-09-25T06:58:00.000+09:00</published><updated>2011-09-25T06:58:00.449+09:00</updated><title type='text'>アニメーションの設定の方法(前とは別の方法)</title><content type='html'>前にアニメーションの方法を示したが、&lt;br /&gt;
下記のような形式でもアニメーションを実行できるようだ。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-(IBAction)doAnime:(id)sender{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _imageViwe.alpha = 1.0;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _imageView.transform=CGAffineTransformMakeScale(1.0,1.0);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [UIVIEW animateWidthDuration:1.0&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; animations:^{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; _imageView.alpha = 0.3;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; _imageView.transform = CGAffineTransformMakeScale(0.4,0.4);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ]&lt;br /&gt;}&lt;br /&gt;
&lt;br /&gt;
利用できる値に関しては、前にアニメーションを作成した時と同様のようです。</content><link rel='replies' type='application/atom+xml' href='http://s26phone.blogspot.com/feeds/1585856119616675047/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://s26phone.blogspot.com/2011/09/blog-post_25.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/1585856119616675047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/1585856119616675047'/><link rel='alternate' type='text/html' href='http://s26phone.blogspot.com/2011/09/blog-post_25.html' title='アニメーションの設定の方法(前とは別の方法)'/><author><name>s26</name><uri>http://www.blogger.com/profile/16758999971889803306</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-412839736396758393.post-3146463144769206060</id><published>2011-09-24T18:59:00.000+09:00</published><updated>2011-09-24T18:59:01.036+09:00</updated><title type='text'>スクロールビューを利用します。UIScrollView</title><content type='html'>スクロールビューを利用します。&lt;br /&gt;
&lt;br /&gt;
中にコンテンツをはみ出すように設置をすれば、指でのスクロールなどで、コンテンツを見る事ができます。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
UIScrollView *scrollView = [[UIScrollView alloc]init];&lt;br /&gt;
&lt;br /&gt;
見える領域：frame&lt;br /&gt;
scrollView.frame = self.view.bounds;&lt;br /&gt;
&lt;br /&gt;
実際のコンテンツの領域&lt;br /&gt;
scrollView.contentSize = CGSizeMake(self.view.frame.size.width*4,self.view.frame.size.height);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ページング機能ですが、ページ毎にコンテンツが止まる形で移動できるか、&lt;br /&gt;
もしくは、ページの境目なく常に滑らかにコンテンツが見れるようにするか。&lt;br /&gt;
&lt;br /&gt;
scrollView.pagingEnabled = YES;&lt;br /&gt;
&lt;br /&gt;
[self.view addSubview:scrollView];&lt;br /&gt;
&lt;br /&gt;
[scrollView release];&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
中にコンテンツを追加する場合は下記のようにします。&lt;br /&gt;
[scrollView addSubview:****];&lt;br /&gt;
&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://s26phone.blogspot.com/feeds/3146463144769206060/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://s26phone.blogspot.com/2011/09/uiscrollview.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/3146463144769206060'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/3146463144769206060'/><link rel='alternate' type='text/html' href='http://s26phone.blogspot.com/2011/09/uiscrollview.html' title='スクロールビューを利用します。UIScrollView'/><author><name>s26</name><uri>http://www.blogger.com/profile/16758999971889803306</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-412839736396758393.post-6618808056930392849</id><published>2011-09-23T16:18:00.000+09:00</published><updated>2011-09-23T16:18:00.058+09:00</updated><title type='text'>Tabを利用したインターフェースの切り替え</title><content type='html'>Tabを利用したインターフェースの切り替え&lt;br /&gt;
&lt;br /&gt;
アプリが別のクラスでできているので、&lt;br /&gt;
各画面の通信の仕組みを追加してあげる必要があります。&lt;br /&gt;
&lt;br /&gt;
AppDelegateの中にプロパティを持つ事でグローバル変数として利用ができる。&lt;br /&gt;
&lt;br /&gt;
@interfaceの中に、&lt;br /&gt;
NSInteger _count;&lt;br /&gt;
&lt;br /&gt;
と設定をして、&lt;br /&gt;
また、propertyとして、&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
@property(nonatomic,assign)NSInteger _count;&lt;br /&gt;
&lt;br /&gt;
と言う形で定義をしておく必要がある。&lt;br /&gt;
&lt;br /&gt;
また、外部からもアクセスができるように&lt;br /&gt;
@implementationの次の行に&lt;br /&gt;
@synthesize _count;&lt;br /&gt;
に追加をします。&lt;br /&gt;
&lt;br /&gt;
これでpublicとして値が取得できるようになります。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
外部からアクセスができるようになったので、&lt;br /&gt;
次にこのクラスの変数に外部からアクセスをする方法を考えます。&lt;br /&gt;
&lt;br /&gt;
#import &quot;sampleAppDelegate.h&quot;;&lt;br /&gt;
&lt;br /&gt;
と記載をする事で、このクラスをインポートできます。&lt;br /&gt;
上記のクラスで何かインスタンスを作成する。&lt;br /&gt;
&lt;br /&gt;
sampleAppDelegate *appDelegate = (sampleAppDelegate *)[[UIApplication sharedApplication]delegate];&lt;br /&gt;
である。&lt;br /&gt;
&lt;br /&gt;
ここで作成したappDelegateに関しては、変数が設定してあるので、&lt;br /&gt;
&lt;br /&gt;
appDelegate._count&lt;br /&gt;
&lt;br /&gt;
などで値を取得もしくは、代入が可能である。&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://s26phone.blogspot.com/feeds/6618808056930392849/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://s26phone.blogspot.com/2011/09/tab.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/6618808056930392849'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/6618808056930392849'/><link rel='alternate' type='text/html' href='http://s26phone.blogspot.com/2011/09/tab.html' title='Tabを利用したインターフェースの切り替え'/><author><name>s26</name><uri>http://www.blogger.com/profile/16758999971889803306</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-412839736396758393.post-6457169105819389655</id><published>2011-09-22T13:05:00.000+09:00</published><updated>2011-09-22T13:05:00.135+09:00</updated><title type='text'>画面の切り替えでプロパティの受け渡しを勉強する。UtilityApplication</title><content type='html'>画面の切り替えでプロパティの受け渡しを勉強する。&lt;br /&gt;
&lt;br /&gt;
■UtilityApplication(表裏が切り替わるアプリ)で、プロジェクトを作成。&lt;br /&gt;
&lt;br /&gt;
MainViewとFlipsideViewで切り替わります。&lt;br /&gt;
&lt;br /&gt;
FlipsideViewで設定した値をMainViewに持ってきてみます。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
FlipsideViewで文字要素を作成する。&lt;br /&gt;
&lt;br /&gt;
.hファイルで、文字要素をinterfaceの中で作成&lt;br /&gt;
NSString *_str;&lt;br /&gt;
@property(nonatomic,retain)NSString *_str;&lt;br /&gt;
&lt;br /&gt;
.mファイルで、&lt;br /&gt;
@implementation FlipsideViewControllerの後ろに&lt;br /&gt;
@synthesize _str;&lt;br /&gt;
&lt;br /&gt;
を記載。&lt;br /&gt;
&lt;br /&gt;
このファイルから値を送る場合に&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-(IBAction)showinfo:(id)sender{&lt;br /&gt;
&lt;br /&gt;
FlipsideViewController _controller = [[FlipsideViewController alloc]&lt;br /&gt;
initWithNibName:@&quot;Flipsideiew&quot;&lt;br /&gt;
bundle:nil];&lt;br /&gt;
&lt;br /&gt;
controller.delegate = self;&lt;br /&gt;
controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;&lt;br /&gt;
[self presentModalViewController:controller animated:YES];&lt;br /&gt;
//下記の値で、FlipSideViewの変数_strを取得する事ができるようになった。&lt;br /&gt;
controller._str&lt;br /&gt;
&lt;br /&gt;
[controller release];&lt;br /&gt;
}</content><link rel='replies' type='application/atom+xml' href='http://s26phone.blogspot.com/feeds/6457169105819389655/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://s26phone.blogspot.com/2011/09/utilityapplication.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/6457169105819389655'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/6457169105819389655'/><link rel='alternate' type='text/html' href='http://s26phone.blogspot.com/2011/09/utilityapplication.html' title='画面の切り替えでプロパティの受け渡しを勉強する。UtilityApplication'/><author><name>s26</name><uri>http://www.blogger.com/profile/16758999971889803306</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-412839736396758393.post-4906907855622569351</id><published>2011-09-21T13:02:00.000+09:00</published><updated>2011-09-21T13:02:00.246+09:00</updated><title type='text'>タイマーの機能を使ってみる。</title><content type='html'>タイマーの機能を使ってみる。&lt;br /&gt;
&lt;br /&gt;
NSTimer *_timer = [NSTimer&lt;br /&gt;
scheduledTimerWidthTimeInterval:3,&lt;br /&gt;
target:self,&lt;br /&gt;
selector:@selector(func:),&lt;br /&gt;
userInfo:nil,&lt;br /&gt;
repeats:YES];&lt;br /&gt;
&lt;br /&gt;
上記は３秒毎に_funcを実行する。</content><link rel='replies' type='application/atom+xml' href='http://s26phone.blogspot.com/feeds/4906907855622569351/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://s26phone.blogspot.com/2011/09/blog-post_21.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/4906907855622569351'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/4906907855622569351'/><link rel='alternate' type='text/html' href='http://s26phone.blogspot.com/2011/09/blog-post_21.html' title='タイマーの機能を使ってみる。'/><author><name>s26</name><uri>http://www.blogger.com/profile/16758999971889803306</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-412839736396758393.post-1238450037505356424</id><published>2011-09-20T12:51:00.000+09:00</published><updated>2011-09-20T12:51:00.368+09:00</updated><title type='text'>UIViewの機能でアニメーションを行う。</title><content type='html'>UIViewの機能でアニメーションを行う。&lt;br /&gt;
&lt;br /&gt;
ページの中で位置を移動したり、透過度を変更して&lt;br /&gt;
フェードインをするなどの動作を行う動作を行う。&lt;br /&gt;
&lt;br /&gt;
step1&lt;br /&gt;
部分の初期状態の設定&lt;br /&gt;
&lt;br /&gt;
中央の位置を決める&lt;br /&gt;
_iv.center = CGPointMake(x,y)&lt;br /&gt;
&lt;br /&gt;
大きさの設定&lt;br /&gt;
_iv.rect = CGRectMake(x,y,width,height);&lt;br /&gt;
&lt;br /&gt;
回転角度の設定&lt;br /&gt;
_iv.transform = CGAffineTransformMakeRotation(30 * 2*m_PI/360);&lt;br /&gt;
&lt;br /&gt;
透明度&lt;br /&gt;
_iv.alpha = 0.5;&lt;br /&gt;
&lt;br /&gt;
step2アニメーションの設定をする。&lt;br /&gt;
&lt;br /&gt;
開始は&lt;br /&gt;
[UIView beginAnimations:nil context:nil];&lt;br /&gt;
&lt;br /&gt;
アニメーションの秒数の設定は&lt;br /&gt;
[UIView setAnimationRepeatCount:3]&lt;br /&gt;
※0だと無限に繰り返す&lt;br /&gt;
&lt;br /&gt;
開始までの時間&lt;br /&gt;
[UIView setAnimationDelay:3];&lt;br /&gt;
&lt;br /&gt;
イージング設定&lt;br /&gt;
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];&lt;br /&gt;
ゆっくり→はやく→ゆっくり：UIViewAnimationCurveEaseInOut&lt;br /&gt;
ゆっくり→はやく：UIViewAnimationCurveEaseIn&lt;br /&gt;
はやく→ゆっくり：UIViewAnimationCurveEaseOut&lt;br /&gt;
一定の速度：UIViewAnimationCurveEaseLiner&lt;br /&gt;
の４種類が基本&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
アニメーションの組み込みの流れ、&lt;br /&gt;
//初期設定&lt;br /&gt;
_iv.center = CGPointMake(20,20);&lt;br /&gt;
&lt;br /&gt;
//宣言&lt;br /&gt;
[UIView beginAnimations:nil context:nil];&lt;br /&gt;
[UIView setAnimationDuration:2];&lt;br /&gt;
&lt;br /&gt;
//結果&lt;br /&gt;
_iv.center =&amp;nbsp; CGPointMake(50,100);&lt;br /&gt;
&lt;br /&gt;
//出力&lt;br /&gt;
[UIView commitAnimations];&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://s26phone.blogspot.com/feeds/1238450037505356424/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://s26phone.blogspot.com/2011/09/uiview.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/1238450037505356424'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/1238450037505356424'/><link rel='alternate' type='text/html' href='http://s26phone.blogspot.com/2011/09/uiview.html' title='UIViewの機能でアニメーションを行う。'/><author><name>s26</name><uri>http://www.blogger.com/profile/16758999971889803306</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-412839736396758393.post-5075059028036713786</id><published>2011-09-19T12:28:00.000+09:00</published><updated>2011-09-19T12:28:00.509+09:00</updated><title type='text'>UIImageでgifアニメのような切り替えのアニメを作成する</title><content type='html'>step1&lt;br /&gt;
SupportingFilesの中に画像を入れる。&lt;br /&gt;
&lt;br /&gt;
step2&lt;br /&gt;
配列を用意する。&lt;br /&gt;
NSArray :_array = [NSArray arrayWithObjects:&lt;br /&gt;
[UIImage imageNamed:@&quot;a.jpg&quot;],&lt;br /&gt;
[UIImage imageNamed:@&quot;b.jpg&quot;],&lt;br /&gt;
[UIImage imageNamed:@&quot;c.jpg&quot;],&lt;br /&gt;
nil&lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
step3&lt;br /&gt;
この入れるをImageViewに設定する。&lt;br /&gt;
_imageView.animationImages = _array;&lt;br /&gt;
&lt;br /&gt;
step4&lt;br /&gt;
次にアニメーションの速度を決める&lt;br /&gt;
_imageView.animationDuration = アニメーションの速度&lt;br /&gt;
&lt;br /&gt;
step5&lt;br /&gt;
アニメーションの繰り返し回数を設定する。&lt;br /&gt;
_imageView.animationRepeatCount = 2;&lt;br /&gt;
&lt;br /&gt;
0を設定すると、無限に繰り返す。&lt;br /&gt;
&lt;br /&gt;
step6&lt;br /&gt;
アニメーションを開始数r。&lt;br /&gt;
[_imageView startAnimating]&lt;br /&gt;
&lt;br /&gt;
step7&lt;br /&gt;
アニメーションの停止&lt;br /&gt;
[_imageView stopAnimationg]&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://s26phone.blogspot.com/feeds/5075059028036713786/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://s26phone.blogspot.com/2011/09/uiimagegif.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/5075059028036713786'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/5075059028036713786'/><link rel='alternate' type='text/html' href='http://s26phone.blogspot.com/2011/09/uiimagegif.html' title='UIImageでgifアニメのような切り替えのアニメを作成する'/><author><name>s26</name><uri>http://www.blogger.com/profile/16758999971889803306</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-412839736396758393.post-4402623871484553648</id><published>2011-09-18T12:18:00.000+09:00</published><updated>2011-09-18T12:18:00.300+09:00</updated><title type='text'>UIImageViewで画像を表示する。</title><content type='html'>UIImageViewで画像を表示する。&lt;br /&gt;
&lt;br /&gt;
step1&lt;br /&gt;
AddFilesと言う項目でSupporting Filesの中に右クリックで入れる。&lt;br /&gt;
&lt;br /&gt;
step2&lt;br /&gt;
UIImageViewを設置したら、プロパティの画面から&lt;br /&gt;
プルダウンメニューで好きな画像を入れる事ができます。&lt;br /&gt;
&lt;br /&gt;
step3&lt;br /&gt;
画像のサイズの設定を下記を設定する事で好きなサイズで実現する事ができる。&lt;br /&gt;
&lt;br /&gt;
scaleToFill&lt;br /&gt;
縦横ぴったり会う。&lt;br /&gt;
Aspect FIt&lt;br /&gt;
大きくなるが余白ができる。&lt;br /&gt;
AspectFill&lt;br /&gt;
大きくなるが、トリミングされる。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
また、画像の設定に関してはプロパティでも変更が可能である。&lt;br /&gt;
&lt;br /&gt;
ex)&lt;br /&gt;
_imageView.image = [UIImage imageNamed:@&quot;sample.jpg&quot;];</content><link rel='replies' type='application/atom+xml' href='http://s26phone.blogspot.com/feeds/4402623871484553648/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://s26phone.blogspot.com/2011/09/uiimageview.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/4402623871484553648'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/4402623871484553648'/><link rel='alternate' type='text/html' href='http://s26phone.blogspot.com/2011/09/uiimageview.html' title='UIImageViewで画像を表示する。'/><author><name>s26</name><uri>http://www.blogger.com/profile/16758999971889803306</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-412839736396758393.post-3169694219772200676</id><published>2011-09-17T12:04:00.000+09:00</published><updated>2011-09-17T12:04:00.213+09:00</updated><title type='text'>アクションシートを使いたい。UIActionSheet</title><content type='html'>アクションシートを使いたい。&lt;br /&gt;
&lt;br /&gt;
アクションシートとは、&lt;br /&gt;
いくつかの選択肢を表示させるデフォルトのインターフェース。&lt;br /&gt;
下から表示がレイヤーで出る仕様の為こちら側でデザインを設定する必要はない。&lt;br /&gt;
&lt;br /&gt;
step1&lt;br /&gt;
最初にInterfaceで宣言をする。&lt;br /&gt;
@interface sampleController:UIController&amp;lt;UIActionSheetDelegate&amp;gt;{}&lt;br /&gt;
&lt;br /&gt;
step2&lt;br /&gt;
タイトル、ボタンの文字、ボタンの数は決めておく。&lt;br /&gt;
&lt;br /&gt;
UIActionSheet _asheeet = [UIActionSheet alloc]initWidthTitle:@&quot;title&quot; &lt;br /&gt;
delegate:self&lt;br /&gt;
cancelButton:Title:@&quot;Cancel&quot;&lt;br /&gt;
destructiveButtonTitle:@&quot;caution&quot;&lt;br /&gt;
otherButtonTitles:@&quot;s1&quot;,@&quot;s2&quot;,nil]&lt;br /&gt;
&lt;br /&gt;
上記で、&lt;br /&gt;
destructiveButtonに関しては、ユーザーの注意を促すものを設置する。&lt;br /&gt;
押す事でデータが消えてしまうなど。このボタンは自動で一番上に表示がされる。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
アクションシートの表示は&lt;br /&gt;
[_asheet showView:self.view]&lt;br /&gt;
&lt;br /&gt;
メモリの開放は&lt;br /&gt;
[_asheet release]&lt;br /&gt;
&lt;br /&gt;
でボタンが押された場合には、次の関数が表示される。&lt;br /&gt;
&lt;br /&gt;
-(void)_asheet:(UIActionSheet *)_asheet checkedButtonAtIndex:(NSInteger)buttonIndex{&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
buttonIndexの値で&lt;br /&gt;
どのボタンが呼ばれたかを判別する。&lt;br /&gt;
番号の上から0,1,2,3と言う順番で取得される。</content><link rel='replies' type='application/atom+xml' href='http://s26phone.blogspot.com/feeds/3169694219772200676/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://s26phone.blogspot.com/2011/09/uiactionsheet.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/3169694219772200676'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/3169694219772200676'/><link rel='alternate' type='text/html' href='http://s26phone.blogspot.com/2011/09/uiactionsheet.html' title='アクションシートを使いたい。UIActionSheet'/><author><name>s26</name><uri>http://www.blogger.com/profile/16758999971889803306</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-412839736396758393.post-1902154216200403412</id><published>2011-09-16T11:53:00.002+09:00</published><updated>2011-09-16T11:53:00.662+09:00</updated><title type='text'>UIAlertViewでアラートの表示をする。</title><content type='html'>UIAlertViewでアラートの表示をする。&lt;br /&gt;
&lt;br /&gt;
ULAlertView *_alert = [[UIAlertView alloc]&lt;br /&gt;
initWidthTitle:@&quot;title&quot; &lt;br /&gt;
message:@&quot;mes&quot; &lt;br /&gt;
delegate:self&lt;br /&gt;
cancelButtonTitle:@&quot;NO&quot;&lt;br /&gt;
otherButtonTitles:@&quot;OK&quot;,nil]&lt;br /&gt;
&lt;br /&gt;
noなどが必要ない場合にはnilを設定すればOKのみのボタンが作成できる。&lt;br /&gt;
&lt;br /&gt;
また、アラートの表示は&lt;br /&gt;
[alert show]&lt;br /&gt;
アラート終了後に、メモリの開放は下記で、&lt;br /&gt;
[alert release]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
値の取得に関しては、&lt;br /&gt;
-(void)_alert:(UIAlertView *)alert checkedButtonAtIndex:(NSInteger)buttonIndex{&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
で、buttonIndexが取得できるのだが、OKボタンが押された場合は&lt;br /&gt;
buttonIndex = 1;&lt;br /&gt;
キャンセルボタンが押されていた場合には、&lt;br /&gt;
buttonIndex = 0;</content><link rel='replies' type='application/atom+xml' href='http://s26phone.blogspot.com/feeds/1902154216200403412/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://s26phone.blogspot.com/2011/09/uialertview.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/1902154216200403412'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/1902154216200403412'/><link rel='alternate' type='text/html' href='http://s26phone.blogspot.com/2011/09/uialertview.html' title='UIAlertViewでアラートの表示をする。'/><author><name>s26</name><uri>http://www.blogger.com/profile/16758999971889803306</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-412839736396758393.post-4521771452645358468</id><published>2011-09-15T00:09:00.001+09:00</published><updated>2011-09-15T00:09:00.143+09:00</updated><title type='text'>日付を取得UIDatePicker</title><content type='html'>&lt;br /&gt;
日付を取得&lt;br /&gt;
&lt;br /&gt;
UIDatePickerでユーザーに日付を決めさせるコンポーネントを利用できる。&lt;br /&gt;
&lt;br /&gt;
このコンポーネントは初期の設定でそれが日付か時間かを決定する事ができる。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
■dataPickerMode&lt;br /&gt;
月日時分：UIDatePickerModeDateAndTime&lt;br /&gt;
年月日：UIDatePickerModeDate&lt;br /&gt;
時分：UIDatePickerModeTime&lt;br /&gt;
タイマー：UIDatePickerModeCountDownTimer&lt;br /&gt;
&lt;br /&gt;
で、デフォルトで日付を設定しておく為に、&lt;br /&gt;
下記のような形式で岸をする。&lt;br /&gt;
&lt;br /&gt;
date = [NSData dateWidthString:@&quot;2011-01-01 00:00:00:+09:00&quot;];&lt;br /&gt;
&lt;br /&gt;
また、時間にする場合に、時計を何分刻みで設定ができるようにするかを調整できる。&lt;br /&gt;
&lt;br /&gt;
minuteInterval = 5;&lt;br /&gt;
&lt;br /&gt;
また、設定できる一番古い時間と一番新しい時間を設定します。&lt;br /&gt;
&lt;br /&gt;
_picker.minimumDate = [NSDate ..]&lt;br /&gt;
_picker.maximumDate = [NSDate ..]&lt;br /&gt;
&lt;br /&gt;
上記の形で設定をしておくと指定の時間以外は設定ができないようにできた。&lt;br /&gt;
&lt;br /&gt;
日付に取得に際しては、前もって型が指定できる&lt;br /&gt;
&lt;br /&gt;
NSDateFormatter *_dateFormat = [[[NSDateFormatter alloc]init]autorelease];&lt;br /&gt;
_dateFormat.dateFormat = @&quot;yyyy/MM/dd HH:mm&quot;;&lt;br /&gt;
&lt;br /&gt;
text = [_dateFormat stringFromDate:_picker.date];&lt;br /&gt;
&lt;br /&gt;
上記のような設定で、取得できる型が設定できた。&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://s26phone.blogspot.com/feeds/4521771452645358468/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://s26phone.blogspot.com/2011/09/uidatepicker.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/4521771452645358468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/4521771452645358468'/><link rel='alternate' type='text/html' href='http://s26phone.blogspot.com/2011/09/uidatepicker.html' title='日付を取得UIDatePicker'/><author><name>s26</name><uri>http://www.blogger.com/profile/16758999971889803306</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-412839736396758393.post-1121726572451976383</id><published>2011-09-13T23:45:00.000+09:00</published><updated>2011-09-13T23:45:00.569+09:00</updated><title type='text'>スライダーを使ってみる。UISlider</title><content type='html'>スライダーを使ってみる。&lt;br /&gt;
&lt;br /&gt;
UISliderを使うと&lt;br /&gt;
簡単なスライダーを実装が可能である。&lt;br /&gt;
&lt;br /&gt;
まず、最小と最大の値を設定する。&lt;br /&gt;
&lt;br /&gt;
_slide.minimumValue = 0;&lt;br /&gt;
_slide.maximumValue = 100;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
上記の値の間でスライドの値を取得する事ができるようになる。&lt;br /&gt;
&lt;br /&gt;
また、ピンチをつかんでいる間も、valueChangeなどのイベントを取得するかしないか&lt;br /&gt;
を下記のプロパティで設定できる。&lt;br /&gt;
&lt;br /&gt;
_slide.continuous = YES&lt;br /&gt;
&lt;br /&gt;
で取得する。NOでイベントの終了時に、イベントを取得できます。&lt;br /&gt;
&lt;br /&gt;
どちらでも問題ない仕様であれば、終了時に値を取得するように設定を&lt;br /&gt;
行う方がメモリの節約になります。</content><link rel='replies' type='application/atom+xml' href='http://s26phone.blogspot.com/feeds/1121726572451976383/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://s26phone.blogspot.com/2011/09/uislider.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/1121726572451976383'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/1121726572451976383'/><link rel='alternate' type='text/html' href='http://s26phone.blogspot.com/2011/09/uislider.html' title='スライダーを使ってみる。UISlider'/><author><name>s26</name><uri>http://www.blogger.com/profile/16758999971889803306</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-412839736396758393.post-8673139784323355486</id><published>2011-09-12T23:36:00.001+09:00</published><updated>2011-09-12T23:36:00.122+09:00</updated><title type='text'>UISwitchのON OFFスイッチ</title><content type='html'>スイッチ用のコンポーネント&lt;br /&gt;
&lt;br /&gt;
UISwitch&lt;br /&gt;
ONかOFFかを判別する事ができる。&lt;br /&gt;
&lt;br /&gt;
基本的には、&lt;br /&gt;
&lt;br /&gt;
_switch.ON = YES;&lt;br /&gt;
_switch.ON = NO;&lt;br /&gt;
&lt;br /&gt;
上記のようにYES/NOで設定を行える。&lt;br /&gt;
&lt;br /&gt;
基本的にイベントは&lt;br /&gt;
&lt;br /&gt;
changedでチェンジした瞬間のイベントを&lt;br /&gt;
拾う事ができる。</content><link rel='replies' type='application/atom+xml' href='http://s26phone.blogspot.com/feeds/8673139784323355486/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://s26phone.blogspot.com/2011/09/uiswitchon-off.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/8673139784323355486'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/8673139784323355486'/><link rel='alternate' type='text/html' href='http://s26phone.blogspot.com/2011/09/uiswitchon-off.html' title='UISwitchのON OFFスイッチ'/><author><name>s26</name><uri>http://www.blogger.com/profile/16758999971889803306</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-412839736396758393.post-2727258234296079599</id><published>2011-09-11T23:31:00.001+09:00</published><updated>2011-09-11T23:31:00.335+09:00</updated><title type='text'>UITextViewで長い文字列を表示する。</title><content type='html'>&lt;br /&gt;
UITextViewは長い文字列を入れるのに適したインターフェースで、&lt;br /&gt;
文字列の長さに従う形で、スクロールバーが出る。&lt;br /&gt;
&lt;br /&gt;
Editableと言うプロパティで編集可能か、不可能か設定が可能である。&lt;br /&gt;
&lt;br /&gt;
keyboardTypeを利用する事で下記の中から&lt;br /&gt;
ユーザーの入力にあわせたキーボードを選ぶ事ができます。&lt;br /&gt;
デフォルト：UIKeyboardTypeDefault&lt;br /&gt;
英字：UIKeyboardTypeASCIICapable&lt;br /&gt;
URL：UIKeyboardTypeURL&lt;br /&gt;
メール：UIKeyboardTypeEmailAddress&lt;br /&gt;
数字：UIKeyboardTypeNumberPad&lt;br /&gt;
電話番号：UIKeyboardTypePhonePad&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://s26phone.blogspot.com/feeds/2727258234296079599/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://s26phone.blogspot.com/2011/09/uitextview.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/2727258234296079599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/2727258234296079599'/><link rel='alternate' type='text/html' href='http://s26phone.blogspot.com/2011/09/uitextview.html' title='UITextViewで長い文字列を表示する。'/><author><name>s26</name><uri>http://www.blogger.com/profile/16758999971889803306</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-412839736396758393.post-244398985071450137</id><published>2011-09-10T23:27:00.000+09:00</published><updated>2011-09-10T23:27:00.619+09:00</updated><title type='text'>UITextFieldで利用できるプロパティ</title><content type='html'>UITextFieldで利用できるプロパティ&lt;br /&gt;
&lt;br /&gt;
UITextFieldではただのテキスト入力だけでなく&lt;br /&gt;
さまざまな設定が可能です。&lt;br /&gt;
&lt;br /&gt;
下記にUITextFieldのプロパティをまとめました。&lt;br /&gt;
&lt;br /&gt;
１、text&lt;br /&gt;
デフォルトで入っている文字の指定です。&lt;br /&gt;
&lt;br /&gt;
２、placaholder&lt;br /&gt;
ここに文字を入力してくださいのようなユーザーをサポートする文言&lt;br /&gt;
&lt;br /&gt;
３、キーボード設定&lt;br /&gt;
default:通常のキーボード&lt;br /&gt;
url：url入力に特化したキーボード&lt;br /&gt;
Number：数値入力用キーボード&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
４、リターンキーの文言&lt;br /&gt;
リターンキーに入る言葉もいくつかの文言から選ぶ事ができます。&lt;br /&gt;
Go Search Send Don&lt;br /&gt;
&lt;br /&gt;
５、色の設定:textColor&lt;br /&gt;
[UIColor blueColor]&lt;br /&gt;
&lt;br /&gt;
などと言う形で、いくつかのプロパティを設定できるようです。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://s26phone.blogspot.com/feeds/244398985071450137/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://s26phone.blogspot.com/2011/09/uitextfield.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/244398985071450137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/244398985071450137'/><link rel='alternate' type='text/html' href='http://s26phone.blogspot.com/2011/09/uitextfield.html' title='UITextFieldで利用できるプロパティ'/><author><name>s26</name><uri>http://www.blogger.com/profile/16758999971889803306</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-412839736396758393.post-7505369121945876290</id><published>2011-09-09T23:20:00.000+09:00</published><updated>2011-09-09T23:20:01.260+09:00</updated><title type='text'>コンポーネントの配置など一連の流れ</title><content type='html'>コンポーネントを配置する事でデザインを作成していきます。&lt;br /&gt;
&lt;br /&gt;
基本の考え方として&lt;br /&gt;
ボタンを押して何かをしたい場合には、&lt;br /&gt;
&lt;br /&gt;
まず、sampleViewControll.hファイル内で&lt;br /&gt;
ボタンと押した場合の動きの関数を定義します。定義をします&lt;br /&gt;
&lt;br /&gt;
xibファイルでコンポーネントの設置を行ったら、&lt;br /&gt;
.hファイルでの定義にむすびつけます。&lt;br /&gt;
※結び付け方に関しては、利用のバージョンによって異なるかと思います。&lt;br /&gt;
&lt;br /&gt;
.mファイルで、&lt;br /&gt;
押した場合の動きの関数の中身の記述などをします。&lt;br /&gt;
&lt;br /&gt;
ほとんどの動作に関してはこのような流れ&lt;br /&gt;
で作成ができます。</content><link rel='replies' type='application/atom+xml' href='http://s26phone.blogspot.com/feeds/7505369121945876290/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://s26phone.blogspot.com/2011/09/blog-post_09.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/7505369121945876290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/7505369121945876290'/><link rel='alternate' type='text/html' href='http://s26phone.blogspot.com/2011/09/blog-post_09.html' title='コンポーネントの配置など一連の流れ'/><author><name>s26</name><uri>http://www.blogger.com/profile/16758999971889803306</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-412839736396758393.post-2568453486323585197</id><published>2011-09-08T23:08:00.000+09:00</published><updated>2011-09-08T23:08:00.258+09:00</updated><title type='text'>プロジェクトファイルを作成すると自動でできるファイルの説明</title><content type='html'>プロジェクトnameがsampleの場合&lt;br /&gt;
&lt;br /&gt;
１、sampleViewControll.xib&lt;br /&gt;
画面のデザインを作成するファイルです。&lt;br /&gt;
&lt;br /&gt;
２、&lt;br /&gt;
sampleViewControll.h&lt;br /&gt;
sampleViewControll.m&lt;br /&gt;
アプリの基本的な動きやデザインを制御する。&lt;br /&gt;
.hはヘッダーファイルなので、定義を主にして&lt;br /&gt;
.mはメインファイルとして、細かい設定などを行います。&lt;br /&gt;
&lt;br /&gt;
３、&lt;br /&gt;
sampleAppDelegate.h&lt;br /&gt;
sampleAppDelegate.m&lt;br /&gt;
アプリの基本動作の起動周りで動く部分を記述する。&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://s26phone.blogspot.com/feeds/2568453486323585197/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://s26phone.blogspot.com/2011/09/blog-post_08.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/2568453486323585197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/2568453486323585197'/><link rel='alternate' type='text/html' href='http://s26phone.blogspot.com/2011/09/blog-post_08.html' title='プロジェクトファイルを作成すると自動でできるファイルの説明'/><author><name>s26</name><uri>http://www.blogger.com/profile/16758999971889803306</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-412839736396758393.post-35091847593810513</id><published>2011-09-07T22:52:00.000+09:00</published><updated>2011-09-07T22:52:00.213+09:00</updated><title type='text'>XCODEを使ってプロジェクトを作成していく</title><content type='html'>プロジェクトを作成する際に、&lt;br /&gt;
アプリにあった、テンプレートを利用する事で、開発の手間をかなり軽減する事ができる。&lt;br /&gt;
&lt;br /&gt;
１、view-based Application &lt;br /&gt;
シンプルで、用意されているのは１つのviewのみ&lt;br /&gt;
&lt;br /&gt;
２、utility Application&lt;br /&gt;
表裏の２つのviewがあり、ボタンひとつで移動をする事ができる、&lt;br /&gt;
また、デフォルトで切り替えの際に回転をするような動きをする。&lt;br /&gt;
&lt;br /&gt;
３、tabBarApplication&lt;br /&gt;
ビューが複数存在し、画面下部にあるタブをタップすると、&lt;br /&gt;
画面が切り替わる。&lt;br /&gt;
&lt;br /&gt;
４、Navigation_based Application&lt;br /&gt;
ビューが複数枚存在して、階層的に画面推移するアプリが作成できる。&lt;br /&gt;
&lt;br /&gt;
５、OpenGL ES Application&lt;br /&gt;
OpenGL ESを利用する時用のテンプレートです。&lt;br /&gt;
&lt;br /&gt;
６、split view-based Application&lt;br /&gt;
ipad用のテンプレートです。&lt;br /&gt;
&lt;br /&gt;
７、Window-based Application&lt;br /&gt;
windowだけでviewがなく最低限の機能のみをもったテンプレート</content><link rel='replies' type='application/atom+xml' href='http://s26phone.blogspot.com/feeds/35091847593810513/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://s26phone.blogspot.com/2011/09/xcode.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/35091847593810513'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/35091847593810513'/><link rel='alternate' type='text/html' href='http://s26phone.blogspot.com/2011/09/xcode.html' title='XCODEを使ってプロジェクトを作成していく'/><author><name>s26</name><uri>http://www.blogger.com/profile/16758999971889803306</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-412839736396758393.post-5403183032333733048</id><published>2011-09-06T21:53:00.000+09:00</published><updated>2011-09-06T21:53:00.838+09:00</updated><title type='text'>オブジェクトとを作成する。</title><content type='html'>dictionaruクラスとほぼ同じような仕様です。&lt;br /&gt;
&lt;br /&gt;
_obj.time = 30;&lt;br /&gt;
&lt;br /&gt;
上記のように簡単に格納ができる。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
またdictionaryのクラスと異なるのは、&lt;br /&gt;
&lt;br /&gt;
[_obj _func]&lt;br /&gt;
&lt;br /&gt;
と言う形にすれば、&lt;br /&gt;
objectの中にいれた関数を実行する事ができる。&lt;br /&gt;
&lt;br /&gt;
また、引数はコロンの後ろに追加する。&lt;br /&gt;
&lt;br /&gt;
[_obj _func:@&quot;a&quot;]; </content><link rel='replies' type='application/atom+xml' href='http://s26phone.blogspot.com/feeds/5403183032333733048/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://s26phone.blogspot.com/2011/09/blog-post_06.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/5403183032333733048'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/5403183032333733048'/><link rel='alternate' type='text/html' href='http://s26phone.blogspot.com/2011/09/blog-post_06.html' title='オブジェクトとを作成する。'/><author><name>s26</name><uri>http://www.blogger.com/profile/16758999971889803306</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-412839736396758393.post-7172615138730913841</id><published>2011-09-05T21:21:00.002+09:00</published><updated>2011-09-05T21:21:00.224+09:00</updated><title type='text'>条件分岐</title><content type='html'>if(条件分岐式){&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
上記の形で、条件分岐が可能になうのだが、&lt;br /&gt;
&lt;br /&gt;
a==b&lt;br /&gt;
&lt;br /&gt;
が同じ値であるのに、異なる場合がある。&lt;br /&gt;
&lt;br /&gt;
a = 1;&lt;br /&gt;
&lt;br /&gt;
b = 1;&lt;br /&gt;
&lt;br /&gt;
の場合には&lt;br /&gt;
if(a == b)は実行される。&lt;br /&gt;
&lt;br /&gt;
a = @&quot;apple&quot;;&lt;br /&gt;
b = @&quot;apple&quot;;&lt;br /&gt;
※この書き方は示すもので正しくない&lt;br /&gt;
&lt;br /&gt;
である場合に、if(a==b)が実行されない場合がある。&lt;br /&gt;
&lt;br /&gt;
これは、ポインタの考え方にある。&lt;br /&gt;
aとbは、文字列を保持している場合には、文字列そのものを保持しているのでなく、文字列のデータの格納場所を示している。&lt;br /&gt;
&lt;br /&gt;
この場合に、中身は同じだけど、保存場所が違えば、違うものであると判別される。&lt;br /&gt;
&lt;br /&gt;
値のみを純粋に比べる場合には、&lt;br /&gt;
&lt;br /&gt;
[_a isEqual:b]&lt;br /&gt;
&lt;br /&gt;
と条件を書くと格納の場所にかかわりなく、純粋な値のみを判別してくれる。</content><link rel='replies' type='application/atom+xml' href='http://s26phone.blogspot.com/feeds/7172615138730913841/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://s26phone.blogspot.com/2011/09/blog-post_05.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/7172615138730913841'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/7172615138730913841'/><link rel='alternate' type='text/html' href='http://s26phone.blogspot.com/2011/09/blog-post_05.html' title='条件分岐'/><author><name>s26</name><uri>http://www.blogger.com/profile/16758999971889803306</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-412839736396758393.post-5812590871026747441</id><published>2011-09-04T21:09:00.000+09:00</published><updated>2011-09-04T21:09:00.521+09:00</updated><title type='text'>Dictionaryクラスを使う。</title><content type='html'>基本的にObjectと同じであるが。&lt;br /&gt;
&lt;br /&gt;
keyを用意してkeyに対応する値が存在する。&lt;br /&gt;
&lt;br /&gt;
NSDictionary dictionaryWidthObjectAndKeys:@&quot;a&quot;,@&quot;apple&quot;,@&quot;b&quot;,@&quot;beer&quot;,@&quot;c&quot;,@&quot;cat&quot;,nil];&lt;br /&gt;
&lt;br /&gt;
上記のように６つの変数を登録しているが、順番にdictionaryに登録をしている。&lt;br /&gt;
&lt;br /&gt;
a : apple&lt;br /&gt;
b : beer&lt;br /&gt;
c : cat&lt;br /&gt;
&lt;br /&gt;
と言う形で登録をしている。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
登録した値の取得の方法に関しては&lt;br /&gt;
&lt;br /&gt;
[_dictionary objectKey : @&quot;a&quot;]&lt;br /&gt;
&lt;br /&gt;
と言うように設定を行うと&lt;br /&gt;
&lt;br /&gt;
apple&lt;br /&gt;
&lt;br /&gt;
が取得できる。</content><link rel='replies' type='application/atom+xml' href='http://s26phone.blogspot.com/feeds/5812590871026747441/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://s26phone.blogspot.com/2011/09/dictionary.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/5812590871026747441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/5812590871026747441'/><link rel='alternate' type='text/html' href='http://s26phone.blogspot.com/2011/09/dictionary.html' title='Dictionaryクラスを使う。'/><author><name>s26</name><uri>http://www.blogger.com/profile/16758999971889803306</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-412839736396758393.post-2945204933342968250</id><published>2011-09-03T21:06:00.000+09:00</published><updated>2011-09-03T21:06:00.076+09:00</updated><title type='text'>配列を作成する。</title><content type='html'>NSArray *_array = [NSArray arrayWithObject:10,10,10,10,nil];&lt;br /&gt;
&lt;br /&gt;
nilで終えるのが一般的である。&lt;br /&gt;
&lt;br /&gt;
配列に含まれる要素の数は、countで取得ができる。&lt;br /&gt;
&lt;br /&gt;
_array.count&lt;br /&gt;
&lt;br /&gt;
、あた配列の中から特定のデータを取り出すには、&lt;br /&gt;
&lt;br /&gt;
[_array objectAtIndex:3];&lt;br /&gt;
ｄでarrayの中の４番目の要素を取得する事ができた。</content><link rel='replies' type='application/atom+xml' href='http://s26phone.blogspot.com/feeds/2945204933342968250/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://s26phone.blogspot.com/2011/09/blog-post_03.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/2945204933342968250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/2945204933342968250'/><link rel='alternate' type='text/html' href='http://s26phone.blogspot.com/2011/09/blog-post_03.html' title='配列を作成する。'/><author><name>s26</name><uri>http://www.blogger.com/profile/16758999971889803306</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-412839736396758393.post-3040151902242176630</id><published>2011-09-02T20:46:00.000+09:00</published><updated>2011-09-02T20:46:00.165+09:00</updated><title type='text'>文字データを組み合わせて文字列を作成する。</title><content type='html'>&lt;br /&gt;
_str1とある文字列を合成したい場合に&lt;br /&gt;
&lt;br /&gt;
NSSTring *_str2 = [NSString StringWidthFormat: @&quot;%@付け加えたい言葉&quot;,_str1];&lt;br /&gt;
&lt;br /&gt;
とすると、%@の部分が_str1に置き換わるので、&lt;br /&gt;
言葉の合成が簡単にできた。</content><link rel='replies' type='application/atom+xml' href='http://s26phone.blogspot.com/feeds/3040151902242176630/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://s26phone.blogspot.com/2011/09/blog-post_02.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/3040151902242176630'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/3040151902242176630'/><link rel='alternate' type='text/html' href='http://s26phone.blogspot.com/2011/09/blog-post_02.html' title='文字データを組み合わせて文字列を作成する。'/><author><name>s26</name><uri>http://www.blogger.com/profile/16758999971889803306</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-412839736396758393.post-619781355396849654</id><published>2011-09-01T20:45:00.000+09:00</published><updated>2011-09-01T20:45:00.317+09:00</updated><title type='text'>整数の値を文字列にする。</title><content type='html'>整数の値を文字列にする。&lt;br /&gt;
&lt;br /&gt;
[NSString stringWithFormat :@&quot;%d&quot;,202]&lt;br /&gt;
&lt;br /&gt;
と言う形にすると、%dの値が数値の文字列に置き換わる。&lt;br /&gt;
&lt;br /&gt;
数値（少数も含む）を文字列に変更する場合には、&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[NSString stringWithFormat :@&quot;%f&quot;,111.45]&lt;br /&gt;
&lt;br /&gt;
上記の形にすると、小数点も含んだ形で、文字列を生成できます。&lt;br /&gt;
&lt;br /&gt;
以上です。</content><link rel='replies' type='application/atom+xml' href='http://s26phone.blogspot.com/feeds/619781355396849654/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://s26phone.blogspot.com/2011/09/blog-post_01.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/619781355396849654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/412839736396758393/posts/default/619781355396849654'/><link rel='alternate' type='text/html' href='http://s26phone.blogspot.com/2011/09/blog-post_01.html' title='整数の値を文字列にする。'/><author><name>s26</name><uri>http://www.blogger.com/profile/16758999971889803306</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></feed>