ビルドしたアプリケーションをapp storeに申請する(itunesconnect)

4月 15, 2011 · Posted in iOS SDK, iPhone開発, Xcode, 基礎 · Comment 

手順メモ。そして今さらXcode3.

1.itunesconnectでアプリ情報を登録。

Waiting For Uploadの状態にする。

2. ビルド

XCodeでビルド設定をDistributionにして、「ビルド」→「Build and Archive」。
すこし前までは、ビルド→Zip圧縮→アップロードという手順だったが、今はXcode上ですべて完結するようになっている。

ビルドが問題なく完了したら、Xcodeのメニューから「ウィンドウ」→「オーガナイザ」をひらき、左側のメニューから「ARCHIVED APPLICATIONS」を選択すると、ビルドしたファイルが追加されている。

あとは、Validateして、SubmitするとAppStoreに送信されるので、状態がWaiting For Reviewになっていることを確認したら、祈りながら待ちましょう。

簡単!

画像付きのアラートビューを表示する – iPhoneアプリ開発

12月 17, 2010 · Posted in iOS SDK, iPhone開発, Objective-C, Xcode, 応用 · Comment 

概要

iPhone(iOS)標準のアラートビュー(UIAlertView)に、画像(UIImage)を表示する方法。

内容

APIの標準機能では、画像表示機能が提供されていない。

実現のために、アラートダイアログに表示するメッセージ内に改行コードを挿入して、スペースを確保し、そのスペースに、UIImageViewを表示する方法で、カスタマイズをおこなうことができる。

NSString *alertMessage = @"ボスに電話します。\nよろしいですか?\n\n\n\n\n\n0000-0000-0000";
UIAlertView *infoAlertView = [[UIAlertView alloc] initWithTitle:nil
	message:alertMessage delegate:nil
	cancelButtonTitle:@"いいえ" otherButtonTitles:@"はい", nil];
UIImageView *i = [[UIImageView alloc]initWithFrame:CGRectMake(85, 70, 110, 73)];
i.image = [UIImage imageNamed:@"boss.jpg"];
[infoAlertView addSubview:i];
[infoAlertView show];

イメージ

QuartzCoreとの組み合わせで、角丸画像ももちろん表示できる!

#import "QuartzCore/QuartzCore.h"

// (略)

NSString *alertMessage = @"ボスに電話します。\nよろしいですか?\n\n\n\n\n\n0000-0000-0000";
UIAlertView *infoAlertView = [[UIAlertView alloc] initWithTitle:nil
	message:alertMessage delegate:nil
	cancelButtonTitle:@"いいえ" otherButtonTitles:@"はい", nil];
UIImageView *i = [[UIImageView alloc]initWithFrame:CGRectMake(85, 70, 110, 73)];
i.image = [UIImage imageNamed:@"boss.jpg"];

i.layer.cornerRadius = 6;
i.clipsToBounds = YES;

[infoAlertView addSubview:i];
[infoAlertView show];

ビューや画像の角を丸くする – iphoneアプリケーション開発

概要

appleらしい、角丸ビューや角丸画像を作る方法。簡単。

サンプルコード

#import "QuartzCore/QuartzCore.h"

// (略)

view.layer.cornerRadius = 4;
view.clipsToBounds = YES;

手順

1.ビューを参照できるクラス内で、QuartzCoreフレームワークをインポートする。

#import "QuartzCore/QuartzCore.h"

2.UIViewクラスのオブジェクトのlayer(CALayer)を取り出し、cornerRadiusプロパティを設定する。

view.layer.cornerRadius = 4;

3.UIViewオブジェクトのclipsToBoundsプロパティの値をYESにする。

view.clipsToBounds = YES;

4.完成
角丸完成。

※イメージのcornerRadiusの値は、左上から右下に向かって、0,6,12,18,24,30

次ページへ »