iPhone開発のメモです。import <Foundation/Foundation.h> @interface UIColor (Hex) - (UIColor *) initWithHex:(NSString *)hexString alpha:(CGFloat)alpha; @end @implementation UIColor (Hex) - (UIColor *) initWithHex:(NSString *)string alpha:(CGFloat)alpha { UIColor *color = nil; if (string && [string length] == 7) { NSString *colorString = [NSString stringWithFormat: @"0x%@ 0x%@ 0x%@", [string substringWithRan
iPhone開発のメモです。縦書きで表示したいと言われた。 html + cssでやっている人がいたので、一応メモ バンドル内に、index.htmlとcss を入れる。 http://d.hatena.ne.jp/kimada/20090405/1238914098 NSString *path = [[NSBundle mainBundle] pathForResource:@"index" ofType:@"html"]; [myTextView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:path]]]; CSS @charset "UTF-8"; /* ------ 縦書きWebページ用cssファイル ------ tategaki.css URL -> http://freefielder.
iPhone開発のメモです。ググりまくって出来たのでメモ。 twitpicのoauthecho対応の、ほぼまるコピーです。 v1の時と同様に、 ・xauthのキー2つ ・twitpic api キー は、取得済みとします。 あ、ちなみに、XAuthTwitterEngineライブラリを使用します。 次に、準備。 OAuthConsumerの拡張を行います。 引用: XAuthTwitterEngineは中でOAuthConsumerを使っていますが、OAuthConsumerがOAuth認証文字列を組み立てています。具体的にはOAMutableURLRequestクラスです。ですが、認証文字列にアクセスするプロパティやメソッドがないのでカテゴリを使って認証文字列を引っ張り出せるメソッドを追加します。以下の2つのファイルを作成します。 OAMutableURLRequest+Add
iPhone開発のメモです。NSDate *tmpDate_1 = [NSDate date]; NSDate *tmpDate_2 = [[[NSDate date] addTimeInterval:1209600] retain]; NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; NSInteger unitFlags = NSDayCalendarUnit; NSDateComponents *components = [gregorian components:unitFlags fromDate:tmpDate_1 toDate:tmpDate_2 options:0]; NSInteger days = [components day]; m
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く