Browsing "iOS"
5月 16, 2011 - iOS, Xcode    1 Comment

iPhoneアプリをXcodeで開発中に急にインストールできなくなった場合

XcodeでiPhoneアプリの開発中に急にこんなメッセージが出てアプリが起動できない状態になった。

Couldn't register xxx.xxxxxx.xxxxxx with the bootstrap server. Error: unknown error code.
This generally means that another instance of this process was already running or is hung in the debugger.warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.3.3 (8J2)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib (file not found).

iPhoneを再起動したら直った。
いつの間にかiPhoneの状態に問題が出てたのかな。

5月 7, 2011 - Audio帳, iOS    No Comments

『Audio帳(仮)』開発 その5 NavigationBarの背景色

NavigationBarの背景色を好きなものに変える

UINavigationControllerのNavigationBarは背景色を自由にかえることができる。

アプリに合った色にすると見栄えも良くなるだろうか。

取りあえず仮で色を変えておく。

NavigationControllerを作っている所で変えておこう。このアプリではAppDelegateのところ。

AudioCardsAppDelegate_iPhone.m

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    [super application:application didFinishLaunchingWithOptions:launchOptions];

    AlbumListViewController *controller = [[[AlbumListViewController alloc]init]autorelease];
    UINavigationController *navigationController = [[[UINavigationController alloc]initWithRootViewController:controller]autorelease];

    navigationController.navigationBar.barStyle = UIBarStyleBlack;
    // NavigationBarの色を変える
    // 今は適当に#CF5B6Fにしておく
    navigationController.navigationBar.tintColor = [UIColor colorWithRed:0.761 green:0.333 blue:0.408 alpha:1.0];
    navigationController.toolbar.barStyle = UIBarStyleBlack;

    self.window.rootViewController = navigationController;

    return YES;
}

Read more »

4月 15, 2011 - Audio帳, iOS    No Comments

オーディオブックのアルバムの一覧を表示してみる

Audio帳(仮)を作るために、iPodのオーディオブックへのアクセスを試してみる。

とりあえず、TableViewにオーディオブックの一覧を表示をやってみる。

まず前提として

  • 「MediaPlayer.framework」ライブラリをリンクしていること

TableViewControllerを継承したControllerを作る。アルバムのコレクションを維持するNSArrayを持っておく。

#import <UIKit/UIKit.h>

@interface AlbumViewController : UITableViewController {
@private
    NSArray *_albums;
}

@property(nonatomic, retain) NSArray *albums;

@end

Read more »

3月 8, 2011 - iOS    No Comments

UIViewに図形を直接描画する

UIViewに直接図形を描画するにはコンテキストを使う。

CGContextをゲットして、それに対して図形を描いていく。

今回はUIViewのdrawRectメソッドをオーバーライドして描画してみる。

Read more »

2月 24, 2011 - iOS    No Comments

Interface Builderを使わないアプリ開発の為の準備

Interface Builderはなかなか完成されたツールだけど、nibファイルの変更のために立ち上げたり、細かい設定が面倒だったりするので、基本Interface Builder抜きで開発を進めてる。

nibファイルとInterface Builderを使わないでWindowベースアプリをビルドして起動させるまで、必要な作業を残しておく。

Read more »

ページ:12»