2011-06-01から1ヶ月間の記事一覧

iOS(iPhone/iPad)アプリケーション公開申請までの流れ(Xcode4)

iOS(iPhone/iPad)アプリケーション公開申請までの流れをなるべく分かりやすく確認できるように工夫して書きました。application1.xcodeprojというプロジェクトで開発を進めたということで話を進めています。プロジェクト名が違う場合は置き換えてください。 …

AVAudioPlayerでfadein/fadeout(フェードイン・フェードアウト)を実装したライブラリ

AVAudioPlayerを使ったライブラリを作りました。AVAudioPlayerの実例が少なかったからしっかりとまとめた。AudioQueueとかAudioUnitじゃないとできないんじゃないの?ということがAVAudioPlayerでできます。 AudioPlayerDelegateをdelegateして使いたいクラ…

AVAudioPlayerを使った音楽ファイルの再生

AVAudioPlayerを使って音楽を再生する方法です。再生時間をNSTimerを使って表示しています。NSRunLoopでも表示は可能かと思いますがNSTimerのほうがはるかに楽です。githubにもございます。 GitHub - kmusiclife/AudioPlayer: This is AudioPlayer class ext…

NSArray, NSMutableArrayをランダムに置き換える

- (NSMutableArray *)randomizedArray:(NSMutableArray *)filename{ srand([[NSDate date] timeIntervalSinceReferenceDate]); int i = [filenames count]; while(--i) { int j = rand() % (i+1); [filenames exchangeObjectAtIndex:i withObjectAtIndex:j];…

UIViewでよく使うのに覚えきれないメモ

UIViewContentMode typedef enum { UIViewContentModeScaleToFill, // これがデフォルト。UIImageViewにめいっぱいひろげる UIViewContentModeScaleAspectFit, // 画像のaspect比を維持し、ちょうどはいるようにする UIViewContentModeScaleAspectFill, // …

UIViewでUITouchを使って右フリック・左フリック・上フリック・下フリックを検出する

UIViewControllerを利用した上で右フリック・左フリック・上フリック・下フリックを検出する方法です。UIViewControllerのdelegateで実装される -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event -(void)touchesEnded:(NSSet *)touches wit…

UITabBarNavigationにUINavigationController+UITableViewControllerとUIViewControllerを同時に使う

長いタイトルですがタイトルの通りです。UITabBarNavigationにUINavigationController+UITableViewControllerとUIViewControllerを同時に使う。意外とややこしかったのでテンプレでまとめておきました。結構使うのにサンプルが少なかったりします。結局こう…

Objective-CでのTips UITableViewControllerのimplements

UITableViewControllerのimplementsを忘れるのでメモついでに。 #import "MyClass.h" @implementation MyClass @synthesize items; // 独自の拡張メソッド -(id) initWithTableObject:(UITableViewController *)tableView{ items = [[NSMutableArray alloc]i…

Objective-CのTips tableViewを動的に追加する

tableViewに動的に一行を追加する おもった以上に迷いました。 /* NSMutableArray * items; @property (nonatomic, retain) NSMutableArray * items; @synthesize items; */ [self.tableView beginUpdates]; [items addObject:@"ADD CEL"]; NSIndexPath * pa…

RhacoでRSS Feedを作る。

Rhaco1.xで動いているアプリがいくつかあるのでメンテナンス。 Rssをrhaco1.xで吐き出す方法。意外と忘れます。 Rhaco::import('tag.feed.Rss20'); Rhaco::import('tag.feed.model.RssItem20'); $rss = new Rss20(); $rssItem = new RssItem20(); $rssItem->…

English Lesson 264 (murmur, even if, conserve, sufficient, sustain)

Deep in thought, the captain murmured, "Even if we conserve our food, it will only be sufficient to sustain us for two weeks at most." deep in thought 考え、思考 murmur(v.i) ブツブツつぶやく(陰でつぶやく, 不平, 不満) http://ja.forvo.com/wo…

English lesson 262 (efficiency, favorable)

Capitalism, as opposed to socialism or communism, is believed to have favorable effect on the economy in that in promotes efficiency through competition. favorable(adj) 意見などが好意的な favorable opinion of〜 as opposed to 〜とは対照的に…

English Lesson 263 (oblige, persist, reiterated)

Colonel Sanders looked me in the eye and said, "If you presist in ignoring my commands, I'll be ogliged to transfer you somewhere else." persist(v.i) し続けるto persist in sayingyou persist in ignoring my commands persist in doing〜 oblige…