Objective-c

上部バーではなくビュー内部にインジケータを出す方法

ex.h @interface ForthViewController : UIViewController { UIView* loadingView; // 処理中インジケータ画面 UIActivityIndicatorView* indicator; // 処理中インジケータ } @property (nonatomic, retain) UIView *loadingView; @property (nonatomic, re…

オブジェクトのサイズを取得して位置を指定する

サンプル (CGRect)rect { CGSize s = [yellow_red contentSize]; return CGRectMake(-100, -60, s.width, s.height); }CGRectMake(x, y, w, h);x,yは画面中央からの座標みたい。 フレームワークの問題なのかしら・・・。 ここの制御は噛んでいないと思う・・…

cocos2dフレームワークで新規クラス作成の際にデフォルトで修正する箇所メモ

環境:MacOS10.7(Lion) xcode4.2 ios5.0まず新規クラスを作成。 名前は適当にGameScene とか。 AppDelegate.m を修正#if GAME_AUTOROTATION == kGameAutorotationUIViewController [director setDeviceOrientation:kCCDeviceOrientationPortrait];これはデバ…

cocos2dフレームワークのインストール

環境:MacOS10.7(Lion) xcode4.1http://www.cocos2d-iphone.org/downloadからStable versionをダウンロード今回はDownload: cocos2d-iphone-1.0.1.tar.gzターミナルを起動し、ダウンロードしたファイルのパスへ移動。$ cd /Users/tsukaharam/Downloads/cocos2…

インジケータ表示の方法

APIとかネットワーク負荷がかかるような処理がバックグラウンドで起きている場合に UIActivityIndicatorViewを用いてインジケータを表示する方法 UIActivityIndicatorView *indView = [[UIActivityIndicatorView alloc]initWithActivityIndicatorStyle:UIAct…