Akimbo App Studio

2011-08-02

UIColor-Expanded

02:13

結構、今更感のあるおなじみのライブラリ群になりますが、iPhoneUIにおいて使えるライブラリ群。

まだまだ使い勝手は結構あります。

UIColor-Expanded

HTMLカラーコード、文字列などで、Color指定できる。

iphone-color-picker - An HSL color-picker for the iPhone - Google Project Hosting

Three20

02:13

facebook謹製のUIPack集。

なかなか癖の多いライブラリ群ですが、

画像キャッシュ機能を備えたTTimageViewとか、アプリブラウザ実装のWebViewControllerあたりは頻繁に利用します。

facebook/three20 ? GitHub

GradientButtons

02:13

グラデーションボタンを簡単実装。

ActionSheetのボタン風など、簡単にデザイン可能。

定義済みのボタンデザインが、なかなか秀逸。既存のボタン(UIButton)との簡単な差し替えも出来ます。

Downloads - iphonegradientbuttons - iPhone Gradient Buttons - Google Project Hosting

Number Badge View

02:13

アプリケーションバッジをソロで表示。

表示崩れが若干あるので、かなり使用範囲はあるのでしょうか。

http://www.claireware.com/blog_files/iphone_badge_view.html

EgoTableViewPullRefresh

02:13

既存のUITableViewControllerに対して,pulldown更新機能を追加する。

UITableViewには利用できないので、注意が必要。

https://github.com/enormego/EGOTableViewPullRefresh

2011-07-31

NSHTTPCookieStorageの指定ドメインのCookie削除について

06:14

NSHTTPCookie Storageのcookie削除についてハマった件について。

まず、NSHTTPCookieStorageのCookieOSでシェアしているとの情報を見かけますが、Cookieが処理されるのは、指定アプリ内だけですね。

さて、NSHTTPCookieStorageのcookiesForURLでは、指定ドメインセッションCookieが取得できません。セッションCookieを取得するには、.をドメインの前に付与する必要があり、

これは、全取得を行って、下のようなやり方でとりあえず対処できました。


About to delete NSHTTPCookie by specified domain.

At first I used [NSHTTPCookieCtorage cookiesForURL:domain] to delete specified cookie.

but session cookie doesn't match and cannot delete.

It has to push '.' before specified domain to get session cookie.

This way is able to delete both normal and usual cookie by domain.

    NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
    for(NSHTTPCookie *cookie in [storage cookies]){
        NSDictionary *cookieProperty = [cookie properties];
        
        if([[cookieProperty objectForKey:NSHTTPCookieDomain] isEqualToString:@"twitter.com"] ||
           [[cookieProperty objectForKey:NSHTTPCookieDomain] isEqualToString:@".twitter.com"] ){
            [storage deleteCookie:cookie];
        }
    }

2011-07-28

UIWebViewでBASIC認証のページを見る時

00:14

UIWebViewでアクセスURLアクセス先のLINK内にBasic認証がかかっているとページの読み込み中になりっぱなしで画面が真っ白いままになってしまいます。

http://user:password@domain.com/みたいな形で、暫定対応はできますが、

アクセス先ページ内のLINKが認証かかっていたら、同じ結果です。

BASIC認証先のID/PWが解っている場合は、NSURLCredentialを使って、あらかじめ登録しておく事で対応できます。

ただID/PASSWORDだけでなく、realmまで知っておく必要があります。

realmは HTTP Response HeaderのAuthenticate: Basicの項目で確認できます。


Access to basic authorization page by UIWebview.

The page content is empty and continues loading accessing to page protected by Basic Auth with UIWebview.

If you know the ID/Password on that page, using NSURLCredential and solute this problem.

this code.

To know realm seeing HTTP Response Header 'Authenticate: Basic realm="realm"'

		
NSURLCredentialStorage *storage = [NSURLCredentialStorage sharedCredentialStorage];
NSURLCredential *credential = [NSURLCredential credentialWithUser:@"USER"
password:@"PASSWORD"
persistence:NSURLCredentialPersistenceForSession];
NSURLProtectionSpace *protectionSpace = [[NSURLProtectionSpace alloc] initWithHost:@"www.domain.com"
port:80
protocol:@"http"
realm:@"Authorization required"
authenticationMethod:NSURLAuthenticationMethodHTTPBasic];
[storage setCredential:credential
forProtectionSpace:protectionSpace];

UIViewController とUITableViewControllerを両方継承したい場合

00:14

例えばUIViewControllerとUITableViewControllerに対して共通の処理を実装したい場合には、どうすれば良いかという話。

まず、ObjectiveCは多重継承を許していません。

本来であれば、TableViewのviewForHeaderとかviewForFooterを巧く使えればベストですが、

UITableViewControllerを使用するのを止めて、UIViewController+UITableViewの構成にし、tableView自体をproperyで持つ事でクリアできるかと思います。

言ってみれば、疑似UITableViewControllerですね。

この場合、UIViewDidScrollなどのUIScrollViewのDelegateメソッドも取得できないので、その辺も要注意。

(プルダウン更新を実装する時とか、問題が残ります。ex EGORefreshTableHeaderView)


How do I add same logic on UITableViewController And UIViewController?

Then Objective-c doesn't allow multi inheritance.

Of course we want to avoid double maintenance.

So It is best way is using only UITableViewcontroller's tableheaderview and tablefooterview. But that way isn't suitable in some situation.

So I made the inheritance of UIViewController that has tableview propery.

This way is avaiable to access self.tableView.

But in this case some problems remain that cannnot catch UIViewScroll's delegate message.

for example this way doesn't work binding EGORefreshTableHeaderView.

2011-01-09

COCOS2D 0.99.5 がリリース

16:26

当サイトのiPhoneゲームプロジェクトは全てCOCOS2Dを使用していますが、

昨年の12月16日にupdateされていました。

約半年ぶりのVerupですね。

http://www.cocos2d-iphone.org/wiki/doku.php/release_notes:0_99_5

特筆はretinaのサポートでしょうか。

また物理エンジンもChipmunk5.3.4をサポート。

枯れたBox2Dから進化中のChipmunkへの乗り換えは検討中。

2010-12-15

Cosmic Orb

14:40

Cosmic orbは重力パズルゲームです。

オーブは中央の特異点に集まってきます。

オーブを白いリングの外に呼び出す事ができます。

3つのオーブをつなげるとオーブが消えます。

全てのオーブを壊すと次のステージに行きます。

残りオーブがなくなるとゲーム終了です。

Game Center Leaderboard対応、スコアを他のユーザーと競う事ができます。

LITE版は広告を含みます。

f:id:akimbo_apps:20101215143853j:image