Objective-C

iphoneアプリ開発でsqliteを使いたい

あ、まだ全然記事にするようなことじゃないんですけどね! とりあえず、 ターミナルでsqlite3コマンドでDBを作ってそれをxcodeのResourcesに追加すれば良いらしい! FMDBっていう便利なライブラリがあるらしい! Litaっていう便利なGUIツールがあるらしい! …

いろいろ

配列 // 配列 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…

UIWebViewでサイズ調整

iPhone用に構築したwebサイトをアプリ内で表示したらサイズが合わない!! iPhoneのsafariで確認したら奇麗に表示されるのに、UIWebViewで表示すると上手くいかない。 なんで!!? UIWebView - 福井高専IT研究会OfficialWiki いつもお世話になってます。 scal…

UIViewで地味にはまってたところ

いつも基本を理解しないでとりあえずコピペで対応しちゃいます。 UIViewの部分でちょっとつまずきました。 最初はInterface Builderで画面側を作成していて、あとからプログラミングでUIViewの追加をしました UIView *View; View = [[UIView alloc] initWith…

パネルみたいに回ったりめくれたり

これiphoneぽいですよねw ちょっとやってみたxxxViewController.h #import <UIKit/UIKit.h> @interface xxxViewController : UIViewController { UIImageView *imageView; } @property (nonatomic, retain) IBOutlet UIImageView *imageView; - ( IBAction ) touch_image:(</uikit/uikit.h>…

UIImageViewでスライドショー

UIImageViewで画像表示 のコードをいじるxxxViewController.m imageView.animationImages = [ NSArray arrayWithObjects: // 変更する画像の設定 [ UIImage imageNamed: @"img1.jpg" ], [ UIImage imageNamed: @"img2.jpg" ], [ UIImage imageNamed: @"img3.…

UIImageViewで画像表示

xxxViewController.h #import <UIKit/UIKit.h> @interface xxxViewController : UIViewController { UIImageView *imageView; } @property (nonatomic, retain) IBOutlet UIImageView *imageView; @endxxxViewController.m @implementation xxxViewController @synthesize i</uikit/uikit.h>…

NSLogでデバッグしながら

logに出力したい場所で、 // 出力したい内容 NSLog(@"hogehoge");っていれる。logを確認するには、Xcodeのメニューから[実行] -> [コンソール]を開く