mobiledevelopertips.com 2024 著作権. 不許複製 プライバシーポリシー
mobiledevelopertips.com 2024 著作権. 不許複製 プライバシーポリシー
iPhone や iPad でデバイス回転時に UI のレイアウトを調整するプログラムを作成していたときのことでした。 キーボードを表示した際に、キーボードが邪魔をしないように入力フィールドの位置を移動させておいて、キーボードを隠した際に元に戻すというプログラムを組んでいたのですけど、デバイスを回転した際に、それを上手く制御できないことがありました。 キーボードの表示非表示を切り替えた際には、通知センター (NSNotificationCenter) から UIKeyboardWillShowNotification, UIKeyboardDidShowNotification, UIKeyboardHideShowNotification, UIKeyboardDidHideNotification を受け取ることが出来ますけど、この通知はデバイスを回転して、ユーザーインターフェイスが回
iOSアプリでPrivate APIが使用されてないかチェックしたり、ビルドしたものをいろいろと調べるツールの紹介です。 基本的には、iOSアプリのバイナリの中身を見たりするアプリなので、 まずはバイナリを手元においておく必要があります。 開発してるアプリのプロジェクトをXCodeで開いてArchiveから、OrganizerでShareからipaファイルを出力します。 ipaファイルはzipファイルなので、拡張子をzipにするなどして解凍すると、中にアプリ名.appのフォルダがあるので、 その中に、アプリ名(拡張子なし)のファイルがバイナリファイルです sample というアプリなら、sample.ipaを解凍してsampleディレクトリができるので、 sample/Payload/sample.app/sample が対象のバイナリファイルとなっています。 ツール紹介 otool バイ
Xcode 4には、ターゲットのサマリーに「Version」と「Build」の欄があります。このBuild番号をビルドの度に自動的に増やしていく方法のメモ。こちらのQ&Aページを参考にしました。 バージョン番号とビルド番号の付け方について ターゲットのサマリーの"Version"はInfo.plistの"Bundle versions string, short" (CFBundleShortVersionString)、"Build"は"Bundle Version (CFBundleVersion)"に相当します。 バージョン番号とビルド番号の使い方の流儀はいろいろあり、プロジェクトにあった方法を選べばよいわけですが、私の場合は上のQ&Aページで説明されているのとほぼ同じように、次のようなルールで付けることにしました。 バージョン番号は、 {メジャーバージョン}.{マイナーバージョン}
Xcode4が軽くなったので感動を共有します。 (以下、自己責任で) Xcode4が重い。最初から軽くはなかったけど、さらに重くなってきた感じです。 プロジェクトファイルのパッケージを開いてproject.xcworkspaceを削除するといいらしいというPostを見つけたので試してみました。 https://twitter.com/#!/hotmiyacchi/status/89881185458733056 project.xcworkspaceの中にUserInterfaceState.xcuserstateというXMLがありました。見たらサイズが8.1MB。 消してみた: project.xcworkspaceを(バックアップをとって)削除したら、アホみたいに軽くなりました。カーソルもちゃんと動くし、補完も実用的な速さ。 再生成されたUserInterfaceState.xcuse
self.tableView.backgroundColor = [UIColor clearColor]; iPhone の時にやっていた上記が効かず困っていたのだが、そういことか。 - (void)viewDidLoad { [super viewDidLoad]; [self.tableView setBackgroundView:nil]; [self.tableView setBackgroundView:[[[UIView alloc] init] autorelease]]; self.tableView.backgroundColor = [UIColor clearColor]; 透明になった。
こうすると - (void)viewDidLoad { : NSLog(@"1: %s", __PRETTY_FUNCTION__); : }こう出力される。 1: -[ViewController viewDidLoad]おーこれは便利だ。 さらに @hkato193 さんのツィートが気になっていたので確認してみた。 こんなコードを書いた。 - (void)viewDidLoad { [super viewDidLoad]; NSLog(@"1: %s", __PRETTY_FUNCTION__); [UIView animateWithDuration:1.0 animations:^{ NSLog(@"2: %s", __PRETTY_FUNCTION__); }]; [UIView animateWithDuration:1.0 animations:^{ NSLog(@"3: %
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く