2013-01-29 初級者向け iOS デバッグ Tips こちらの良記事を拝見しまして、 中級者向け iOSデバッグTips 初級者向けを作ってみようかと。 とりあえず、 ブレイクポイント操作のステップ実行あたりと NSLog周りについて ブレイクポイント操作のステップ実行 まずブレイクポイントの張り方は、 .mファイルの行番号をクリックするだけで有効になります。 ※青くならない場合は、Toolbar上のBreakPointsをクリックしてください。 で、実際に実行し、その箇所にくると処理が止まってくれます。 ※今回はviewDidLoadに記載しているので、いきなり止まります。 そうすると、デバッグエリアが自動的に表示されます。 ここで重要なボタンがあるので、まずはそこから。 とりあえず、左から番号を振ってみましたが 1.Step over 一行ずつ処理を進めます。ただし、メソッドを
導入 iOS 開発者のみなさん、こんにちは。 このブログでは主にチュートリアルだったりフレームワークの紹介みたいなことを書いてきました。 そこで、たまには中級者向けのエントリを書いて「Xcode バリバリ使って、ビシバシ Objective-C 書いてますよ」アピールします。 iOS 開発をはじめて一通り Framework は理解したけど Xcode 使いこなせてる感が足りない方、夢にまで EXC_BAD_ACCESS が出てくる方に参考になる記事となればと思います。 といっても Xcode はマッシブな IDE なので、4つのデバッグツールに分けて「あれ、それ知らなかった!便利じゃん!」な方法を紹介します。 ブレークポイント デバッグには切っても切れない関係ですね。アプリを実行中に指定した行で処理を中断し、そこからステップ実行で細かいデバッグを可能にしてくれます。 ショートカットキー
@synthesize of 'weak' property is only allowed in ARC or GC mode @ '弱い' プロパティの合成は円弧または GC のモードでのみ許可されて(Bing Translator訳) 初めて見たエラー!!! なんだこりゃ!!! 誰か解決方法を教えてください(泣) わかった!! 犯人はコイツだ! http://gndo.blogspot.jp/2011/12/arc.html ARCとは? http://blog.natsuapps.com/2011/11/ios5-arc-overview.html というわけで、 @property (nonatomic, weak) id delegate; の "weak" はARC環境でしか使えないらしい。 ARCでない場合は、"unsafe_unretained" にすればいいみたい。 解
こんにちは。きんくまです。 今回はObjective-Cの@propertyについてのまとめです。 ARCは使ってないバージョンです。 公式のリファレンスです。 >> Declared Properties Obj-Cをはじめた当初はよくわからないながらも何となく使っていたのですが、 いろいろとわかってきたのでまとめておこうと思いました。 @propertyはカタカナに直すとプロパティだから、別言語から来た人(私)は 何か実体のあるもののような気がするのですが、そうではなくて 実際はアクセサメソッド(getter, setter)のことです。 なので、クラス外からアクセスするときに必要に応じて定義するとよいです。 最初私はよくわからず、インスタンス変数に全てプロパティを定義していたのはナイショです。 @propertyを使わないでインスタンス変数にアクセス = KVC ではまずは@prop
結構重要なんで備忘録。 順番は決まってまして、さらっというと次の5つの手順をふむだけで 変数を受け渡すことができます。 1.受け渡した後の.h画面で 変数を宣言(ここではdicを例にとる) @property (nonatomic) dic; 上の{...
今更感満載ですが、NSDictionaryとNSArrayのモダン記法です。 以前の書き方は //NSDictionary NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:@"hachinobu", @"name", [NSNumber numberWithInt:28], @"age", nil]; NSString *name = [dic valueForKey:@"name"]; NSString *age = [dic valueForKey:@"age"]; //NSArray NSArray *array = [NSArray arrayWithObjects:@"hachi", @"nobu", nil]; NSString *hachi = [array objectAtIndex:0]; 新し
iPhoneの新しいGoogle Mapsのアプリ、色々弄り倒してますがステキな感じ。 でこれひょっとして、「NimbusKit使ってない?」って思ったら、案の定で使ってた。 NimbusKitはiOS用のヘルパークラスと、コンポーネントと、デバッグツールの集合体。 以下のような機能がサクサクとつけられる。 CSSスキニング インターフェースの外見にCSSを適用できる。ビューのカスタマイズがラクチンに。 TextLabel iOSの微妙なTextLabelにリッチテキストやリンクがつけられるように。 バッジ 通知件数などのバッジを簡単に作成。 他アプリとの連動 他アプリ・・・マップ、ストア、電話、SMS、FB等の連携をラクチンに。 アプリ内ホーム画面 ホーム画面的なUIをアプリ内に簡単に追加できる。 キャッシュ/非同期通信つきのImageView 画像ローダー付きのImageView拡張。
「cocos2d for iPhone」(以下、cocos2d)は、iOS(iPhone/iPod touch/iPad)やMac OS X向けの2Dゲームやグラフィカルなインタラクティブアプリを開発するための、フレームワークです。物理エンジンの「Box2d」「Chipmunk」を持ち、サウンドエンジンも搭載しています。 cocos2dを使うと、スプライト・シーン・トランジション・アクション・メニュー・タッチ操作・加速度センサなどの機能を利用して、ゲームアプリやインタラクティブ系のアプリを素早く作ることが可能です。 本稿では、cocos2dの概要と基礎的な使い方を紹介します。 cocos2dの主な特徴5つ cocos2dには、以下のような特徴があります。 ■ 【1】テンプレートで使い方が簡単 使いやすいテンプレートやObjective-Cのクラスライブラリがそろっています。サンプルコードも
iPhone アプリ開発を初めてはや2年。わけわからんレベルからなんとかアプリをリリースするところまでこぎつけました。もともと趣味ではじめた事ですが今は仕事でも iPhone アプリ開発をしています。ここに至るまで自分が調べたことや参考にした文書をアプリの構想からアプリをリリースするまでの手順にそってまとめてみました。 iOSアプリ開発関連の本を書きました 初めて iOS アプリ開発をされるかた向けに「プロの力を身につける iPhone/iPadアプリケーション開発の教科書」という本を書きました。 この記事を読んで iOS アプリ開発に興味を持たれた方におすすめです(2013年2月26日発売)。2015年1月17日にSwiftに対応した改訂版がでました。 本の内容に関する詳しい記事はこちらです。 iOSアプリ開発の本を書きました 初期投資 8400円とプライベートな時間、iPhoneまたは
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く