<?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-3283049350842200763</id><updated>2024-10-25T13:27:48.802+09:00</updated><category term="iPhone SDKの基礎"/><category term="xcode error"/><category term="xcode ショートカット"/><title type='text'>間違いだらけの iPhone 開発備忘録</title><subtitle type='html'>完全に備忘録。すっかり自分用。&lt;br&gt;&#xa;主にiPhoneアプリの開発についてのプログラムです。基本的にInterface Builder(IB)は使いません。&lt;br&gt;</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://rosetta-works.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3283049350842200763/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://rosetta-works.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Author :: Rosetta</name><uri>http://www.blogger.com/profile/16792776332325733651</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>17</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3283049350842200763.post-7661862677081962102</id><published>2010-11-23T16:00:00.001+09:00</published><updated>2010-11-23T16:06:56.446+09:00</updated><title type='text'>引っ越しました。</title><content type='html'>&lt;a href=&quot;http://programming.lugn-design.com/&quot;&gt;間違いだらけの iPhone 開発備忘録&lt;/a&gt;へ引っ越しました。&lt;br /&gt;
以後はそちらで更新を続けます。&lt;br /&gt;
&lt;br /&gt;
こちらは数ヶ月後に削除しますのでよろしくお願いします。&lt;br /&gt;
&lt;br /&gt;
引越し先URL : &lt;a href=&quot;http://programming.lugn-design.com/&quot;&gt;http://programming.lugn-design.com/&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://rosetta-works.blogspot.com/feeds/7661862677081962102/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://rosetta-works.blogspot.com/2010/11/blog-post.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3283049350842200763/posts/default/7661862677081962102'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3283049350842200763/posts/default/7661862677081962102'/><link rel='alternate' type='text/html' href='http://rosetta-works.blogspot.com/2010/11/blog-post.html' title='引っ越しました。'/><author><name>Author :: Rosetta</name><uri>http://www.blogger.com/profile/16792776332325733651</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-3283049350842200763.post-6182426034465493046</id><published>2010-11-22T17:41:00.001+09:00</published><updated>2010-11-22T17:50:49.356+09:00</updated><title type='text'>cocos2dでの色々設定</title><content type='html'>RxRAppDelegate.mの&lt;br /&gt;
if( ! [director enableRetinaDisplay:YES] )&lt;br /&gt;
CCLOG(@&quot;Retina Display Not supported&quot;);&lt;br /&gt;
の部分のコメントアウトをはずす。&lt;br /&gt;
&lt;br /&gt;
また画面を縦に固定するなら同ファイルの&lt;br /&gt;
[director setDeviceOrientation:kCCDeviceOrientationLandscapeLeft];&lt;br /&gt;
をコメントアウト。&lt;br /&gt;
&lt;br /&gt;
ランドスケープをオフにするなら&lt;br /&gt;
GameDonfig.hの&lt;br /&gt;
define GAME_AUTOROTATIONをkGameAutorotationNoneに設定する。&lt;br /&gt;
&lt;br /&gt;
#define GAME_AUTOROTATION kGameAutorotationNone&lt;br /&gt;
&lt;br /&gt;
またシーンなどの画面推移系で使うAPIが&lt;br /&gt;
&lt;br /&gt;
CCFadeTransition&lt;br /&gt;
CCFlipAngularTransition&lt;br /&gt;
CCShrinkGrowTransition&lt;br /&gt;
CCMoveInBTransition&lt;br /&gt;
CCMoveInTTransition&lt;br /&gt;
CCMoveInLTransition&lt;br /&gt;
CCMoveInRTransition&lt;br /&gt;
CCFadeTRTransition&lt;br /&gt;
CCFadeUpTransition&lt;br /&gt;
CCFlipXTransition&lt;br /&gt;
CCFlipYTransition&lt;br /&gt;
CCPageTurnTransition&lt;br /&gt;
CCCrossFadeTransition&lt;br /&gt;
&lt;br /&gt;
から&lt;br /&gt;
&lt;br /&gt;
CCTransitionFade&lt;br /&gt;
CCTransitionFlipAngular&lt;br /&gt;
CCTransitionShrinkGrow&lt;br /&gt;
CCTransitionMoveInB&lt;br /&gt;
CCTransitionMoveInT&lt;br /&gt;
CCTransitionMoveInL&lt;br /&gt;
CCTransitionMoveInR&lt;br /&gt;
CCTransitionFadeTR&lt;br /&gt;
CCTransitionFadeUp&lt;br /&gt;
CCTransitionFlipX&lt;br /&gt;
CCTransitionFlipY&lt;br /&gt;
CCTransitionPageTurn&lt;br /&gt;
CCTransitionCrossFade&lt;br /&gt;
&lt;br /&gt;
に変更されている。</content><link rel='replies' type='application/atom+xml' href='http://rosetta-works.blogspot.com/feeds/6182426034465493046/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://rosetta-works.blogspot.com/2010/11/cocos2d_22.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3283049350842200763/posts/default/6182426034465493046'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3283049350842200763/posts/default/6182426034465493046'/><link rel='alternate' type='text/html' href='http://rosetta-works.blogspot.com/2010/11/cocos2d_22.html' title='cocos2dでの色々設定'/><author><name>Author :: Rosetta</name><uri>http://www.blogger.com/profile/16792776332325733651</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-3283049350842200763.post-1110417190697200002</id><published>2010-11-22T12:21:00.003+09:00</published><updated>2010-11-22T16:10:31.333+09:00</updated><title type='text'>cocos2D導入方法</title><content type='html'>cocos2dの導入方法。&lt;br /&gt;
こちらの&lt;a href=&quot;http://tusk.jp/cocoa/cocos2d_001.html&quot;&gt; cocos2dを使ったiPhoneアプリ制作を解説してみる&lt;/a&gt;が非常に分かりやすかったのですがいくつか戸惑った部分があるので引用しながら自分用メモ。&lt;br /&gt;
&lt;br /&gt;
まずは有無をいわさずにcocos2D本体をダウンロードしましょう。&lt;br /&gt;
http://www.cocos2d-iphone.org/&lt;br /&gt;
(※2010/11/22時点では0.99.4が安定版です。この記事では0.99.4で行います。)&lt;br /&gt;
&lt;br /&gt;
ダウンロードしたらとりあえず解凍しましょう。&lt;br /&gt;
基本的にダウンロードフォルダの中にあるはずです。&lt;br /&gt;
以下のコマンドをターミナルで打ち込みます。&lt;br /&gt;
(標準で$は入っているので「cd ~/Downloads」だけコピペして下さい。)&lt;br /&gt;
&lt;br /&gt;
$ cd ~/Downloads&lt;br /&gt;
$ cd cocos2d-iphone-0.99.4 (※自分のダウンロードして解凍したフォルダ名。バージョンが違うと後ろの数字が変わりますので注意。)&lt;br /&gt;
$ ./install-templates.sh&lt;br /&gt;
&lt;br /&gt;
この時macにパスワードをかけているとエラーが出るので「$ ./install-templates.sh」の代わりに&lt;br /&gt;
$ sudo ./install-templates.sh&lt;br /&gt;
を実行してあげるとインストール出来ます。&lt;br /&gt;
その際パスワードを求められるので自分のパスワードを入力してくださいね。&lt;br /&gt;
&lt;br /&gt;
以上でxcodeにcocos2Dのテンプレートが追加されます。&lt;br /&gt;
&lt;br /&gt;
導入はこれでOKですね。&lt;br /&gt;
&lt;br /&gt;
参考URL&lt;a href=&quot;http://tusk.jp/cocoa/cocos2d_001.html&quot;&gt; cocos2dを使ったiPhoneアプリ制作を解説してみる&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://rosetta-works.blogspot.com/feeds/1110417190697200002/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://rosetta-works.blogspot.com/2010/11/cocos2d.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3283049350842200763/posts/default/1110417190697200002'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3283049350842200763/posts/default/1110417190697200002'/><link rel='alternate' type='text/html' href='http://rosetta-works.blogspot.com/2010/11/cocos2d.html' title='cocos2D導入方法'/><author><name>Author :: Rosetta</name><uri>http://www.blogger.com/profile/16792776332325733651</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-3283049350842200763.post-5562450413152037709</id><published>2010-10-24T14:38:00.002+09:00</published><updated>2010-10-24T14:38:05.435+09:00</updated><title type='text'>移行中</title><content type='html'>現在ブログを移行中です。&lt;br /&gt;
ある程度移行が完了しましたらまたお知らせします。</content><link rel='replies' type='application/atom+xml' href='http://rosetta-works.blogspot.com/feeds/5562450413152037709/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://rosetta-works.blogspot.com/2010/10/blog-post.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3283049350842200763/posts/default/5562450413152037709'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3283049350842200763/posts/default/5562450413152037709'/><link rel='alternate' type='text/html' href='http://rosetta-works.blogspot.com/2010/10/blog-post.html' title='移行中'/><author><name>Author :: Rosetta</name><uri>http://www.blogger.com/profile/16792776332325733651</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-3283049350842200763.post-4978666728824689777</id><published>2010-07-12T16:33:00.001+09:00</published><updated>2011-07-22T09:41:29.532+09:00</updated><title type='text'>UIviewはUIViewControllerを知らない</title><content type='html'>ブログ移行しました。&lt;br /&gt;
&lt;b&gt;新しいブログでのこの記事は&lt;a href=&quot;http://programming.lugn-design.com/uikit/uiview%E3%81%AFuiviewcontroller%E3%82%92%E7%9F%A5%E3%82%89%E3%81%AA%E3%81%84/&quot;&gt;UIviewはUIViewControllerを知らない&lt;/a&gt;こちらです。&lt;/b&gt;&lt;br /&gt;
シンタックスカラーなど導入しているのでソースコードが見やすくなっているはずなので是非っ。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
UIView上でモーダルビューを実装しようとして必死にpresentModalViewController呼んでた。&lt;br /&gt;
先日ようやくViewDidLoadとInitWithFrameの違い覚えたばかりだというのに。&lt;br /&gt;
&lt;br /&gt;
UIViewはUIViewControllerの存在を知らない。&lt;br /&gt;
ちぃ覚えた。&lt;br /&gt;
&lt;br /&gt;
参考サイト&lt;br /&gt;
&lt;a href=&quot;http://stack3.net/blogdev/?p=299&quot;&gt;viewDidAppear/viewDidDisappearが呼ばれない&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://rosetta-works.blogspot.com/feeds/4978666728824689777/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://rosetta-works.blogspot.com/2010/07/uiviewuiviewcontroller.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3283049350842200763/posts/default/4978666728824689777'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3283049350842200763/posts/default/4978666728824689777'/><link rel='alternate' type='text/html' href='http://rosetta-works.blogspot.com/2010/07/uiviewuiviewcontroller.html' title='UIviewはUIViewControllerを知らない'/><author><name>Author :: Rosetta</name><uri>http://www.blogger.com/profile/16792776332325733651</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-3283049350842200763.post-5116990670182311283</id><published>2010-07-12T10:23:00.022+09:00</published><updated>2010-07-12T17:43:46.805+09:00</updated><title type='text'>モーダルビューを表示した時に前のビューのツールバー、ナビゲーションバーが残る時の対処法</title><content type='html'>タイトル通りの症状。&lt;br /&gt;
この症状が出た人は恐らく下のソースと似たようなソースになってるんじゃないかと。&lt;br /&gt;
自分はTestViewClassでモーダルを呼び出したときにこの症状が出ました。&lt;br /&gt;
&lt;br /&gt;
AppliNameAppDelegate.h&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;@interface AppliNameAppDelegate : NSObject &lt;uiapplicationdelegate&gt; {
 UIWindow* window_;
 TestViewClass *testClass;
}

@property (nonatomic, retain) IBOutlet UIWindow *window;

@end
&lt;/pre&gt;AppliNameAppDelegate.m&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    

 // windowを自分で作成
 CGRect bounds = [[UIScreen mainScreen] bounds];
 window_ = [[UIWindow alloc] initWithFrame:bounds];

 testClass = [[[TestViewClass alloc]init]autorelease];
 
 UINavigationController *NavigationController =
  [[UINavigationController alloc] initWithRootViewController:testClass] ;
 
 [window_ addSubview:NavigationController.view];
 [window_ makeKeyAndVisible];
 
 return YES;
}
&lt;/pre&gt;&lt;br /&gt;
対処としてはAppliNameAppDelegate.mの下記の部分で&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;UINavigationController *NavigationController =
[[[UINavigationController alloc] initWithRootViewController:paging] autorelease];
&lt;/pre&gt;NavigationControllerをautoreleaseしていたらこれを消してやる。&lt;br /&gt;
んでUINavigationControllerは.mじゃなく.hの方で宣言しておく。&lt;br /&gt;
deallocでreleaseするの忘れずにね。&lt;br /&gt;
これで新しくモーダルビューを表示した時にもちゃんとツールバーやナビゲーションバーが表示されるみたい。&lt;br /&gt;
&lt;br /&gt;
TestViewClass上(呼び出した先)でモーダルを表示するとNavigationControllerのautoreleaseが動いて上手く処理されないのかも。&lt;br /&gt;
&lt;br /&gt;
※追記&lt;br /&gt;
他の場所で同じような現象が起きたので例のごとく総当りでautorelease, release関係消してみたけど駄目でした。&lt;br /&gt;
今回の現象が起きたところは元々処理のさせ方が無理矢理だったからそれが原因なのかもしれないのですが。&lt;br /&gt;
とりあえずこの問題解決の糸口はrelease関係じゃないのかもしれません。&lt;br /&gt;
…という投げっぱなしな記事。</content><link rel='replies' type='application/atom+xml' href='http://rosetta-works.blogspot.com/feeds/5116990670182311283/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://rosetta-works.blogspot.com/2010/07/blog-post.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3283049350842200763/posts/default/5116990670182311283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3283049350842200763/posts/default/5116990670182311283'/><link rel='alternate' type='text/html' href='http://rosetta-works.blogspot.com/2010/07/blog-post.html' title='モーダルビューを表示した時に前のビューのツールバー、ナビゲーションバーが残る時の対処法'/><author><name>Author :: Rosetta</name><uri>http://www.blogger.com/profile/16792776332325733651</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-3283049350842200763.post-2610563997608285499</id><published>2010-07-12T09:34:00.013+09:00</published><updated>2010-07-12T17:48:07.251+09:00</updated><title type='text'>warning: class &#39;ClassName&#39; does not implement the &#39;UI***Delegate&#39; protocol の警告を消す</title><content type='html'>warning: class &#39;ClassName&#39; does not implement the &#39;UI***Delegate&#39; protocol&lt;br /&gt;
の警告を消す方法。&lt;br /&gt;
&lt;br /&gt;
クラスの宣言を&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;@interface ClassName : UIViewController
&lt;/pre&gt;から&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;@interface ClassName : UIViewController＜UI***Delegate＞
&lt;/pre&gt;に変えるだけ。&lt;br /&gt;
＜＞は半角の&lt;&gt;に直してね。&lt;br /&gt;
&lt;br /&gt;
参考サイト&lt;br /&gt;
&lt;a href=&quot;http://sunlight.cocolog-nifty.com/sunlight/2009/10/uiactionsheet-6.html&quot;&gt;・『UIActionSheet』を使う時にチョットはまった…。&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://appteam.blog114.fc2.com/blog-entry-121.html&quot;&gt;・warning、error → 検索・翻訳で余計意味不明&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://rosetta-works.blogspot.com/feeds/2610563997608285499/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://rosetta-works.blogspot.com/2010/07/warning-class-name-does-not-implement.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3283049350842200763/posts/default/2610563997608285499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3283049350842200763/posts/default/2610563997608285499'/><link rel='alternate' type='text/html' href='http://rosetta-works.blogspot.com/2010/07/warning-class-name-does-not-implement.html' title='warning: class &#39;ClassName&#39; does not implement the &#39;UI***Delegate&#39; protocol の警告を消す'/><author><name>Author :: Rosetta</name><uri>http://www.blogger.com/profile/16792776332325733651</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-3283049350842200763.post-6052435491765651184</id><published>2010-07-01T14:14:00.023+09:00</published><updated>2010-07-12T09:17:50.298+09:00</updated><title type='text'>UIButtonをクラス化</title><content type='html'>&lt;s&gt;初級程度の知識しかないと意外と手こずったのでメモメモ。&lt;br /&gt;
自分の場合はScrollView上に貼り付けて使うことを想定しているので他の処理をするときは上手くいかないかもしれません。&lt;br /&gt;
&lt;br /&gt;
大体こんな感じ。&lt;/s&gt;&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&lt;s&gt;@interface CButton : UIViewController {
 UIButton* button;
}
- (UIButton*)getButton;
@end
&lt;/pre&gt;&lt;pre class=&quot;prettyprint&quot;&gt;#import &quot;CButton.h&quot;

@implementation CButton

- (void)viewDidLoad : (NSString*)imageName : (CGPoint)center
{
 button = [UIButton buttonWithType:UIButtonTypeCustom];
 UIImage* img = [UIImage imageNamed: imageName];
 button.frame = CGRectMake( 0, 0, 128, 128 );
 [button setImage:img forState:UIControlStateNormal];
 [button setImage:img forState:UIControlStateHighlighted];
 [button addTarget:super.view.superview
  action:@selector(DidPushButton:)
  forControlEvents:UIControlEventTouchUpInside];
 button.center = center;
}

- (UIButton*)getButton
{
 return btn;
}
@end&lt;/s&gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;s&gt;以上です。&lt;br /&gt;
引数のimageNameはファイル名(UIButtonTypeRoundRectなど自分で用意した画像を表示しないなら省略)、centerはボタンの中心位置。&lt;br /&gt;
基本的に普通のUIButtonと変わらないです。&lt;br /&gt;
違うのはaddTarget。&lt;br /&gt;
addTargetはいつも通りのselfだとタップした時点でエラーで落ちます。&lt;br /&gt;
ScrollView上に描画するこの場合は自分より1個上のビュー(要するにScrollViewこと)のsuper.view.superviewを指定してやります。&lt;br /&gt;
よくよく考えると「ですよねー」な感じだけど気づくのに時間かかりました…。&lt;br /&gt;
&lt;br /&gt;
あとはボタンのサイズや透過度など別途引数で渡してあげれば汎用性も上がるんじゃないじゃないかと。&lt;br /&gt;
&lt;/s&gt;&lt;br /&gt;
※追記&lt;br /&gt;
この状態だとScrollView上で用意されてるDidPushButtonの処理になります。&lt;br /&gt;
…全然クラス化出来てなくね？&lt;br /&gt;
CButtonで宣言したDidPushButtonを処理させるにはどうすればいいだろう。&lt;br /&gt;
&lt;br /&gt;
※追記&lt;br /&gt;
複数の違う処理をするボタンはTagを使うといいみたいです。&lt;br /&gt;
button.tagでそれぞれの処理に振り分ける、みたいなやり方。</content><link rel='replies' type='application/atom+xml' href='http://rosetta-works.blogspot.com/feeds/6052435491765651184/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://rosetta-works.blogspot.com/2010/07/uibutton.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3283049350842200763/posts/default/6052435491765651184'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3283049350842200763/posts/default/6052435491765651184'/><link rel='alternate' type='text/html' href='http://rosetta-works.blogspot.com/2010/07/uibutton.html' title='UIButtonをクラス化'/><author><name>Author :: Rosetta</name><uri>http://www.blogger.com/profile/16792776332325733651</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-3283049350842200763.post-110435920431635324</id><published>2010-06-28T15:28:00.004+09:00</published><updated>2011-07-22T09:43:04.223+09:00</updated><title type='text'>ModalViewにNavigationControllerを追加する方法</title><content type='html'>ブログ移行しました。&lt;br /&gt;
&lt;b&gt;新しいブログでのこの記事は&lt;a href=&quot;http://programming.lugn-design.com/uikit/modalview%E3%81%ABnavigationcontroller%E3%82%92%E8%BF%BD%E5%8A%A0%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95/&quot;&gt; ModalViewにNavigationControllerを追加する方法 &lt;/a&gt;こちらです。&lt;/b&gt;&lt;br /&gt;
シンタックスカラーなど導入しているのでソースコードが見やすくなっているはずなので是非っ。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
通常のモーダルは&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;ModalView* dialog = [[[ModalView alloc] init] autorelease];
dialog.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
[self presentModalViewController:dialog animated:YES];
&lt;/pre&gt;でモーダルに推移する。&lt;br /&gt;
このモーダルにナビゲーションバーを追加表示する。&lt;br /&gt;
方法は超簡単。&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;ModalView* dialog = [[[ModalView alloc] init] autorelease];
dialog.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
UINavigationController *NavigationController =
[[UINavigationController alloc] initWithRootViewController:dialog];
[self presentModalViewController:NavigationController animated:YES];
&lt;/pre&gt;以上でおｋ。&lt;br /&gt;
あとはバーのカスタマイズでボタンを色々追加すると良いよ。&lt;br /&gt;
&lt;br /&gt;
っていうかUINavigationControllerにモーダルビューだろうとラベルビューだろうと突っ込んでおけばとりあえずナビゲーションバーは表示されるはず。&lt;br /&gt;
…はず。</content><link rel='replies' type='application/atom+xml' href='http://rosetta-works.blogspot.com/feeds/110435920431635324/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://rosetta-works.blogspot.com/2010/06/modalviewnavigationcontroller.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3283049350842200763/posts/default/110435920431635324'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3283049350842200763/posts/default/110435920431635324'/><link rel='alternate' type='text/html' href='http://rosetta-works.blogspot.com/2010/06/modalviewnavigationcontroller.html' title='ModalViewにNavigationControllerを追加する方法'/><author><name>Author :: Rosetta</name><uri>http://www.blogger.com/profile/16792776332325733651</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-3283049350842200763.post-4488659645202722669</id><published>2010-06-28T11:00:00.022+09:00</published><updated>2011-07-22T09:41:36.236+09:00</updated><title type='text'>UIGestureRecognizerまとめ？</title><content type='html'>ブログ移行しました。&lt;br /&gt;
&lt;b&gt;新しいブログでのこの記事は&lt;a href=&quot;http://programming.lugn-design.com/uikit/uigesturerecognizer/&quot;&gt;UIGestureRecognizerまとめ？&lt;/a&gt;こちらです。&lt;/b&gt;&lt;br /&gt;
シンタックスカラーなど導入しているのでソースコードが見やすくなっているはずなので是非っ。&lt;br /&gt;
&lt;br /&gt;
OS3.2以降のOSで対応。&lt;br /&gt;
つまりiPadかiOS4が入ったiPhoneじゃないと動かない。&lt;br /&gt;
でも涙が出るくらい便利。&lt;br /&gt;
&lt;br /&gt;
UITapGestureRecognizer :       タップ(タップの数は任意で取得)&lt;br /&gt;
UIPinchGestureRecognizer :     ピンチインとピンチアウト(拡大縮小用。二本指でくぱぁするアレ)&lt;br /&gt;
UIPanGestureRecognizer :       パニング(ドラッグのこと)&lt;br /&gt;
UISwipeGestureRecognizer :     スワイプ(ページ送りなど。ドラッグと似てる？)&lt;br /&gt;
UIRotationGestureRecognizer :  回転(指二本での回転)&lt;br /&gt;
UILongPressGestureRecognizer : 長押し(safariの新規タブを開くときに使うなど)&lt;br /&gt;
&lt;br /&gt;
使い方は簡単。&lt;br /&gt;
タップの場合はUITapGestureRecognizerのインスタンスを作成してactionで動作したときに飛ぶ関数の指定。&lt;br /&gt;
あとはnumberOfTapsRequiredでタップの回数を指定。&lt;br /&gt;
ビューに追加して終わり。&lt;br /&gt;
&lt;br /&gt;
以下ソース。&lt;br /&gt;
これはダブルタップの場合です。&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;UITapGestureRecognizer *tapRec = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(DetectionDoubleTap:)];
tapRec.numberOfTapsRequired = 2;
[self.view addGestureRecognizer:tapRec];
[tapRec release];
&lt;/pre&gt;んで後はタップ判定後に飛ぶ実際の処理をする関数を作るだけ。&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;- (void)DetectionDoubleTap:(id)sender {
NSLog(@&quot;DoubleTap!&quot;);
}
&lt;/pre&gt;これでおｋ。&lt;br /&gt;
&lt;br /&gt;
独自のUIをUIViewで作ったものにも簡単にタップやジェスチャを実装できるのはいいね。&lt;br /&gt;
&lt;br /&gt;
ちなみにScrollView上に追加したUIButtonとどっちが優先されるかやってみた。&lt;br /&gt;
結果的にはタップ回数が1回の判定時はUIGestureRecognizerが優先されました。&lt;br /&gt;
ダブルタップ時はボタンが優先されました。&lt;br /&gt;
まぁダブルタップはともかくシングルタップ時はUIGestureRecognizerが優先されるみたいです。</content><link rel='replies' type='application/atom+xml' href='http://rosetta-works.blogspot.com/feeds/4488659645202722669/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://rosetta-works.blogspot.com/2010/06/uigesturerecognizer.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3283049350842200763/posts/default/4488659645202722669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3283049350842200763/posts/default/4488659645202722669'/><link rel='alternate' type='text/html' href='http://rosetta-works.blogspot.com/2010/06/uigesturerecognizer.html' title='UIGestureRecognizerまとめ？'/><author><name>Author :: Rosetta</name><uri>http://www.blogger.com/profile/16792776332325733651</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-3283049350842200763.post-150029720264510438</id><published>2010-06-25T16:37:00.004+09:00</published><updated>2010-07-05T11:18:22.131+09:00</updated><title type='text'>iphone The bundle identifier cannot be changed from the previous minor version.の解決ヒント</title><content type='html'>iphone The bundle identifier cannot be changed from the previous minor version.&lt;br /&gt;
はその名の通りbundle identifierが原因。&lt;br /&gt;
&lt;br /&gt;
このエラーが出たらとりあえずバイナリ(アプリ本体)のアップロードは後にして他のを進める。&lt;br /&gt;
バイナリ以外をアップロードしたらWaiting For Upload状態になるはず。&lt;br /&gt;
この時アプリ管理画面にApp Detailsの項目があるはずなのでそのリンクをクリックするとBundle Identifierという項目がある。&lt;br /&gt;
とりあえずその横に表記されてる文をコピー。&lt;br /&gt;
xcodeを開いてplistを開く。&lt;br /&gt;
Bundle Identifierの項目にさっきコピーした文をペースト。&lt;br /&gt;
その状態でアップロード。&lt;br /&gt;
私はその状態で無事完了しました。</content><link rel='replies' type='application/atom+xml' href='http://rosetta-works.blogspot.com/feeds/150029720264510438/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://rosetta-works.blogspot.com/2010/06/iphone-bundle-identifier-cannot-be.html#comment-form' title='2 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3283049350842200763/posts/default/150029720264510438'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3283049350842200763/posts/default/150029720264510438'/><link rel='alternate' type='text/html' href='http://rosetta-works.blogspot.com/2010/06/iphone-bundle-identifier-cannot-be.html' title='iphone The bundle identifier cannot be changed from the previous minor version.の解決ヒント'/><author><name>Author :: Rosetta</name><uri>http://www.blogger.com/profile/16792776332325733651</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>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3283049350842200763.post-5219245145745056041</id><published>2010-06-23T15:38:00.000+09:00</published><updated>2010-06-23T15:41:23.995+09:00</updated><title type='text'>iPhoneのUiKitの表示サイズ</title><content type='html'>それぞれ高さが&lt;br /&gt;ナビゲーションバー 44px&lt;br /&gt;タブバー 48px&lt;br /&gt;ステータスバー 20px&lt;br /&gt;残り 368px</content><link rel='replies' type='application/atom+xml' href='http://rosetta-works.blogspot.com/feeds/5219245145745056041/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://rosetta-works.blogspot.com/2010/06/iphoneuikit.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3283049350842200763/posts/default/5219245145745056041'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3283049350842200763/posts/default/5219245145745056041'/><link rel='alternate' type='text/html' href='http://rosetta-works.blogspot.com/2010/06/iphoneuikit.html' title='iPhoneのUiKitの表示サイズ'/><author><name>Author :: Rosetta</name><uri>http://www.blogger.com/profile/16792776332325733651</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-3283049350842200763.post-8173357996355009776</id><published>2010-06-21T16:54:00.020+09:00</published><updated>2010-07-08T12:31:05.877+09:00</updated><title type='text'>画像のメモリ削減管理</title><content type='html'>複数の、それも大量の画像を扱う場合の話。&lt;br /&gt;
メモリ的に効率のよい管理、なのでUIImageViewにすべての画像を読み込んでaddSubViewで表示、はもちろん却下。&lt;br /&gt;
UIImageviewは数個に抑えておく。&lt;br /&gt;
&lt;br /&gt;
もっと効率のよいやり方はあるだろうけど自分の場合は下記の方法でやりました。&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;NSString  *imageName = [NSString stringWithFormat: @&quot;img&quot; ];
NSString  *imagePath = [[NSBundle mainBundle] pathForResource:imageName ofType:@&quot;png&quot;];
UIImage* img = [[UIImage alloc] initWithContentsOfFile:imagePath];
UIImageView* viewImage = [[[UIImageView alloc] initWithImage:img] autorelease];
&lt;/pre&gt;初期化は上記の方法でおｋ。&lt;br /&gt;
※以前公開していたコードはミスがあったので修正しました。&lt;br /&gt;
&lt;br /&gt;
処理の途中での画像の差し替えは下記の方法。&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;viewImage.image = nil;
NSString *imageName = [NSString stringWithFormat: @&quot;img2&quot;];
NSString *imagePath = [[NSBundle mainBundle] pathForResource:imageName ofType:@&quot;png&quot;];
img = [[UIImage alloc] initWithContentsOfFile:imagePath];
viewImage.image = img;
viewImage.contentMode = UIViewContentModeScaleAspectFill;
[img release];
&lt;/pre&gt;とすればOK。&lt;br /&gt;
contentModeは画像を差し替えても初回に読み込んだアスペクト比で画像を表示してしまうので色々なアスペクト比のものを扱う場合はここでリセットしておく。&lt;br /&gt;
プロパティの値はここを参照。&lt;br /&gt;
http://d.hatena.ne.jp/rnamiki/20090226/1235667228&lt;br /&gt;
&lt;br /&gt;
複数のviewを扱う場合は表示する(画面に写る)画像以外はhiddenプロパティをオフにしておく。&lt;br /&gt;
これで大体はおｋなんじゃないかなぁ。&lt;br /&gt;
&lt;br /&gt;
参考サイト&lt;br /&gt;
&lt;a href=&quot;http://amsoft.minidns.net/node/187&quot;&gt;iPhone 開発　画像ロード方法３種まとめ&lt;br /&gt;
&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://rosetta-works.blogspot.com/feeds/8173357996355009776/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://rosetta-works.blogspot.com/2010/06/blog-post.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3283049350842200763/posts/default/8173357996355009776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3283049350842200763/posts/default/8173357996355009776'/><link rel='alternate' type='text/html' href='http://rosetta-works.blogspot.com/2010/06/blog-post.html' title='画像のメモリ削減管理'/><author><name>Author :: Rosetta</name><uri>http://www.blogger.com/profile/16792776332325733651</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-3283049350842200763.post-5589020450795292024</id><published>2010-04-30T16:19:00.001+09:00</published><updated>2010-04-30T16:19:33.019+09:00</updated><title type='text'>設定しておくと便利なカスタマイズ</title><content type='html'>http://iphone.longearth.net/2009/08/09/【xcode】設定しておくと便利なカスタマイズいろい/</content><link rel='replies' type='application/atom+xml' href='http://rosetta-works.blogspot.com/feeds/5589020450795292024/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://rosetta-works.blogspot.com/2010/04/blog-post.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3283049350842200763/posts/default/5589020450795292024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3283049350842200763/posts/default/5589020450795292024'/><link rel='alternate' type='text/html' href='http://rosetta-works.blogspot.com/2010/04/blog-post.html' title='設定しておくと便利なカスタマイズ'/><author><name>Author :: Rosetta</name><uri>http://www.blogger.com/profile/16792776332325733651</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-3283049350842200763.post-2735368752614871329</id><published>2010-02-19T06:01:00.003+09:00</published><updated>2010-02-20T01:42:37.585+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="xcode error"/><title type='text'>エラー メッセージ</title><content type='html'>&lt;div&gt;*** not declared in this scope&lt;/div&gt;scodeで新規にC++ファイルを作成すると拡張子が.cppになるので注意。&lt;div&gt;このままだとライブラリ(自分の場合はM_PIなどの数学ライブラリ)が &quot;*** not declared in this scope&quot;と出て使用出来ない。&lt;/div&gt;&lt;div&gt;拡張子を.mmに直しておく。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;ISO C++ forbids declaration of &#39;*&#39; with no type&lt;/div&gt;&lt;div&gt;これは「ISO C++ は、タイプ指定のないXXXX宣言を禁止しているんだぞ」ということ。&lt;/div&gt;&lt;div&gt;インポートした後に&lt;/div&gt;&lt;div&gt;@class ClassName&lt;/div&gt;&lt;div&gt;で解決おｋ！&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rosetta-works.blogspot.com/feeds/2735368752614871329/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://rosetta-works.blogspot.com/2010/02/not-declared-in-this-scope.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3283049350842200763/posts/default/2735368752614871329'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3283049350842200763/posts/default/2735368752614871329'/><link rel='alternate' type='text/html' href='http://rosetta-works.blogspot.com/2010/02/not-declared-in-this-scope.html' title='エラー メッセージ'/><author><name>Author :: Rosetta</name><uri>http://www.blogger.com/profile/16792776332325733651</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-3283049350842200763.post-4486829198748570222</id><published>2010-02-03T23:22:00.007+09:00</published><updated>2010-07-05T12:08:56.904+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="xcode ショートカット"/><title type='text'>ショートカット</title><content type='html'>基本的なショートカット。 &lt;br /&gt;
&lt;br /&gt;
esc コードヒント&lt;br /&gt;
ctrl + , コードヒント&lt;br /&gt;
ctrl + . 補完を実行&lt;br /&gt;
cmd + / 選択している行を//でコメントアウトorコメントアウトを解除&lt;br /&gt;
cmd + [　　インデントを下げる&lt;br /&gt;
cmd + ]　　インデントを上げる&lt;br /&gt;
cmd + shift + F　プロジェクト内検索&lt;br /&gt;
cmd + shift + J　リファクタリング&lt;br /&gt;
cmd + L　 指定行に移動&lt;br /&gt;
cmd + shift + enter&lt;br /&gt;
ワードの上で cmd + ダブルクリック　ワードの定義へジャンプ&lt;br /&gt;
ワードの上で alt + ダブルクリック　ワードのヘルプへジャンプ&lt;br /&gt;
cmd + option + 上キー .h/.mファイルの切り替え&lt;br /&gt;
&lt;br /&gt;
cmd + B　　　　　ビルド&lt;br /&gt;
cmd + shift + K　 クリーニング&lt;br /&gt;
cmd + enter　　　ビルドして実行&lt;br /&gt;
cmd + alt + P　一時停止／続ける&lt;br /&gt;
cmd + \　ブレークポイントON/OFF&lt;br /&gt;
&lt;br /&gt;
参考サイト&lt;br /&gt;
&lt;a href=&quot;http://viva.viva-mambo.co.jp/obj-c4aser/index.php?Xcode&quot;&gt;xcode ショートカット&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://rosetta-works.blogspot.com/feeds/4486829198748570222/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://rosetta-works.blogspot.com/2010/02/blog-post.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3283049350842200763/posts/default/4486829198748570222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3283049350842200763/posts/default/4486829198748570222'/><link rel='alternate' type='text/html' href='http://rosetta-works.blogspot.com/2010/02/blog-post.html' title='ショートカット'/><author><name>Author :: Rosetta</name><uri>http://www.blogger.com/profile/16792776332325733651</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-3283049350842200763.post-4718134017104399646</id><published>2010-01-29T20:09:00.009+09:00</published><updated>2010-06-29T18:37:44.281+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iPhone SDKの基礎"/><title type='text'>iPhone 基本</title><content type='html'>ここにiPhone SDKで学んだ超絶基本的なことを書いていく。&lt;br /&gt;
今回はIB使用。&lt;br /&gt;
次回からはIB排除の方向で！&lt;br /&gt;
&lt;br /&gt;
□ ステータスバーの非表示&lt;br /&gt;
書類ビューで&quot;View&quot;を選択してStatus Barの項目をNoneにするとステータスバーが非表示になる。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
□ 画面を横にしたい。&lt;br /&gt;
Classesの&quot;Project Name.m&quot;のコメントアウトされている&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {

// この返り値が開始時のビューの向きを変更している
return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
&lt;/pre&gt;&lt;p&gt;の部分を上記に置き換えるとホームボタンを右にした状態の横画面になる。&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;□ビュー毎の色分け&lt;/p&gt;&lt;p&gt;ビュー毎にラベルや実際に色付して管理すると見やすい(…かも)。&lt;/p&gt;&lt;p&gt;ビューに色をつけた場合、後から画像などを登録した時にインスペクラウィンドウのBackGroundからOpacityを0%にしておくと色が透明になる。&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://rosetta-works.blogspot.com/feeds/4718134017104399646/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://rosetta-works.blogspot.com/2010/01/iphone.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3283049350842200763/posts/default/4718134017104399646'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3283049350842200763/posts/default/4718134017104399646'/><link rel='alternate' type='text/html' href='http://rosetta-works.blogspot.com/2010/01/iphone.html' title='iPhone 基本'/><author><name>Author :: Rosetta</name><uri>http://www.blogger.com/profile/16792776332325733651</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>