You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
I need to invoke an initial GET HTTP request with Basic Authentication. This would be the first time the request is sent to the server and I already have the username & password so there's no need for a challenge from the server for authorization. First question: Does NSURLConnection have to be set as synchronous to do Basic Auth? According to the answer on this post, it seems that you can't do Ba
セレクタを指定してオブジェクトにメッセージを送る処理について。 SEL sel = @selector(doSomething); if ([obj respondsToSelector:sel]) { [obj performSelector:sel]; } このようなコードをビルドすると、ARC有効時にperformSelector:の行について次の警告が出る。 PerformSelector may cause a leak because its selector is unknown 指示子@selectorによりセレクタを指定するのではなくSEL型変数を使用する場合にのみ警告が出る。実際、次のような場合には警告は出ない。 if ([obj respondsToSelector:@selector(doSomething)]) { [obj doSomething]; } if
既存記事のまとめのため新しい要素があるわけではないのですが、Appleから発表されたXcode 5が正式にリリースされる前の復習ということで。 Tipsを適用する前のコード #pragma mark - Private Category @interface Sample () @property (strong) NSNumber* i; @property (strong) NSNumber* c; @property (strong) NSNumber* f; @property (strong) NSArray* array; @property (strong) NSDictionary* dictionary; @property (strong) Sample* child; @property (strong) UIColor* color; @property (assi
ファイルから文字列を読み込むには、NSStringを初期化するときにファイルパスを指定する方法が使えます。 そして、文字列を改行コードで区切って1行ずつ取得する機能はNSStringクラスに備わっているので、次のようなコードで簡単に実装できます。 NSString *path = @"/path/for/file.txt"; NSString *str = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil]; // 1行ずつ文字列を列挙 [str enumerateLinesUsingBlock:^(NSString *line, BOOL *stop) { NSLog(@"%@", line); }]; 大抵の場合はこの方法で良いのですが、NSStringのインスタンスを作るとき
鸟归巢:夜趣福利导第一导航|性交描述小说|男人插曲女视频40分钟|影音先峰男人资源,一部不行就来两部,身体要紧且看且珍惜。
Summary 新リテラル - NSNumberリテラル,Boxed Expression, NSArrayリテラル,NSDictionaryリテラル, 添字アクセス コンパイラがメモリ管理を肩代わり - ARC (Automatic Retain Count) Cでも無名関数 - Blocks マルチスレッドプログラミングを簡単に - GCD (Grand Central Dispatch) Bundlerライクなライブラリ管理 - CocoaPods はじめに Objective-C のプログラミング環境はどんどん良くなってる コーディングを楽に エンバグの軽減 一方、Web上の記事や書籍のコードは古いまま 古い情報に流されないためにも、新しいコンパイラやツールの機能を確認しておこう NSNumberリテラル void main(int argc, const char *argv[]
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く