投稿

2011の投稿を表示しています

Xcode 4.2にしてみた

イメージ
【環境】 MacOSX 10.7.2 Xcode 4.0.1 【インストール手順】 1.App Storeを起動 2.Xcodeで検索 3.インストールボタンを押す 4.Lanunchpad→XcodeInstallを押す 以下の画面が表示されるので、『Update』を押す。 インストール完了すると、Xcodeが起動されるので、Xcode→『About Xcode』でバージョンを確認する。 以上でインストール完了。

CentOS のファイアーウォールの停止方法

ファイアーウォールのステータス確認 /etc/init.d/iptables status ファイアーウォールの停止 /etc/init.d/iptables stop ファイアーウォールの開始 /etc/init.d/iptables start

CentOS 5.5のnasマウント方法

sambaのパッケージをインストール。 yum -install samba-client マウントするディレクトリの作成(任意) mkdir /mnt/nas 作成したディレクトリにマウントする。 mount -t cifs -o user=(ユーザー名),password=(パスワード) //(IPアドレス等)/share /mnt/nas

Implementation of the USB 2.0 Controller not foundの対処法

VirtualBox 4.0.8 にバージョンアップ。 仮想マシン起動時に以下の様なメッセージが表示された。 Implementation of the USB 2.0 Controller not found どうやらVirtualBox 4.0.8 Oracle VM VirtualBox Extension Packがインストールされていなかったためらしい。 ここから(http://www.virtualbox.org/wiki/Downloads)をダウンロード&インストールで解決しました。

UIAvtionSheetのキャンセルボタンが効かない?

ツールバーがあるとActionSheetのキャンセルボタンの下半分がきかない。 変更前 UIActionSheet *actionSheet = [[UIActionSheet alloc] init]; actionSheet.title = @"タイトル"; [actionSheet addButtonWithTitle:@"決定"]; [actionSheet addButtonWithTitle:@"キャンセル"]; actionSheet.cancelButtonIndex = 1; actionSheet.destructiveButtonIndex = 0; actionSheet.delegate = self; [actionSheet showInView:self.view]; 変更後 UIActionSheet *actionSheet = [[UIActionSheet alloc] init]; actionSheet.title = @"タイトル"; [actionSheet addButtonWithTitle:@"決定"]; [actionSheet addButtonWithTitle:@"キャンセル"]; actionSheet.cancelButtonIndex = 1; actionSheet.destructiveButtonIndex = 0; actionSheet.delegate = self; [sheet showInView:self.view.window];

UIAlertViewをカスタマイズするには

イメージ
UIAlertViewのカスタマイズにつまずいたのでメモ。 通常UIAlertViewを表示したい場合、以下のようなコードを作成する...と思う。 UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:@"タイトル" message:@"メッセージ" delegate:self cancelButtonTitle:@"キャンセル" otherButtonTitles:@"決定", nil] autorelease]; [alert show]; サイズを変更したかったので、showメソッドの前でframeを変更する。 が、考慮されない模様。 UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:@"タイトル" message:@"メッセージ" delegate:self cancelButtonTitle:@"キャンセル" otherButtonTitles:@"決定", nil] autorelease]; alert.frame = CGRectMake(0,0,150,150);//サイズ変更が考慮されない [alert show]; どうやら[alert show]した後でないとカスタマイズできない。 なので、以下のようにUIAlertViewDelegateの- (void)willPresentAlertView:(UIAlertView *)alertViewの中でalertViewのサイズを変更する。 -(void)willPresentAlertView:(UIAlertView *)alertView{ CGRect alertFrame = CGRectMake(0,0,320,360); alertView.frame = alertFrame; } 当然ながらサイズを変更するとボタンの位置も変更したくなるので、以下のコードで無理

MacでAndroid開発環境を整える

イメージ
Andoroisd開発の機会があったので、メモを残しておきます。 【流れ】 1.Eclipse のインストール 2.Android SDK のインストール 3.emulator の設定 1.Eclipseのインストール Eclipse 3.5(Galileo)をインストールします。 http://www.eclipse.org/downloads/ からEclipse IDE for Developersをダウンロードします。 ダウンロードしたzipファイルを展開して、アプリケーションフォルダに保存します。 (日本語化する場合) http://sourceforge.jp/projects/mergedoc/svn/view/trunk/Pleiades/build/pleiades.zip?view=co&root=mergedoc から日本語化プラグインインストールをダウンロードします。 ダウンロードしたzipファイルを解凍し、フォルダ内にあるpluginsとfeaturesの中にあるファイルを、Eclipseのpluginsとfeaturesに移動する。 次に、eclipse.ini ファイルを編集します。 アプリケーションフォルダからeclipse/Eclipse.app/Contents/MacOS/eclipse.iniを開いて、最後の行に以下を追加します。 -javaagent:../../../plugins/jp.sourceforge.mergedoc.pleiades/pleiades.jar 2.Android SDKのインストール Download the Android SDK( http://developer.android.com/sdk/index.html )から android-sdk_r06-mac_86.zipをダウンロードします。 展開した後、アプリケーションフォルダに移動します。(どこでもOK?) Eclipse.appを起動して、[ヘルプ]>[新規ソフトウェアのインストール…]を開きます。 [追加…]をクリックするとダイアログが開くので、任意の名前をつけてロケーションに
 https://dl-ssl.google.com/andro