iBomBomというアプリ
先日。iBomBomというアプリをリリースしました。
- なんでも良いからアプリを作ってみたかった!
- appleに申請からリリースまでのフローが知りたかった!
という理由で、アプリはとてもシンプルなものです。
それでも申請からリリースまで約10日ほどかかりました。
初めてなので勝手がわかりませんでしたが、とりあえず出来て良かったです。
http://itunes.apple.com/jp/app/ibombom/id386596744?mt=8
そういえば、アプリってblogとかで紹介するためのバナーリンクとか用意されてないのかな??
amazon見たくバナー出ればいいんだけどなー
いろいろ
配列
// 配列 NSArray *array = [NSArray arrayWithObjects: @"hoge", @"fuga", @"foo", @"bar", nil]; // 長さ NSLog(@"%d", [array count]); //4 // 要素を表示 for (id i in array) { NSLog(@"%@", i); } //hoge //fuga //foo //bar // n番目の要素 NSLog(@"%@", [array objectAtIndex: 0]);//一個目は0 //hoge
alert
UIAlertView * alert = [[UIAlertView alloc] initWithTitle:@"ココにTitle" message:@"ここにメッセージ" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; //ボタン複数設置したいとき //otherButtonTitles:@"Item1", @"Item2", nil] [alert show]; [alert release];
alertで押されたボタンを取得
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { switch (buttonIndex){ //左のボタンから0,1,2? case 0: break; case 1: break; case 2: break; } }
近接センサー
//近接センサー有効にする [UIDevice currentDevice].proximityMonitoringEnabled = YES; //状態を取得 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeProximity) name:UIDeviceProximityStateDidChangeNotification object:nil]; //状態に変化があったら呼ばれる - (void)changeProximity{ //センサーに近づいたらYES はなれたらNO BOOL status = [UIDevice currentDevice].proximityState; }
UIWebViewでサイズ調整
iPhone用に構築したwebサイトをアプリ内で表示したらサイズが合わない!!
iPhoneのsafariで確認したら奇麗に表示されるのに、UIWebViewで表示すると上手くいかない。
なんで!!?
UIWebView - 福井高専IT研究会OfficialWiki
いつもお世話になってます。
scalesPageToFit っていうプロパティがあるじゃまいか。
WEBページのスケール(尺度)をビューに合わせ、ユーザがスケールを変更できるかどうかを決定する。
@property(nonatomic) BOOL scalesPageToFit
早速設定
: webView = [ [ UIWebView alloc ] initWithFrame:bounds]; webView.scalesPageToFit = YES; :
良い感じに表示されました。