このウェブサイトは販売用です! icodeblog.com は、あなたがお探しの情報の全ての最新かつ最適なソースです。一般トピックからここから検索できる内容は、icodeblog.comが全てとなります。あなたがお探しの内容が見つかることを願っています!
Blocks are perhaps the most significant new language feature introduced by Apple in years, and I've written a lot about them before. The new C++ standard, C++0x, introduces lambdas, a similar feature. Today, I want to discuss the two features and how they are alike and how they differ, a topic suggested by David Dunham. Terminology I will refer to Apple's blocks extension as "Objective-C blocks" e
IntroductionWhen Mac OS X 10.6 was introduced, the Mac got a very powerful duo of developer tools that made development on a lot easier. With iOS 4.0 developers finally got access to these tools as well. These tools are known as Blocks & Grand Central Dispatch. This article is not an introduction to these technologies as i've already covered them before here http://cocoasamurai.blogspot.com/2009/0
Welcome back to another edition of Friday Q&A. I'm back from my break and ready to bring you more programming goodies. This week I want to take Landon Fuller's suggestion to write a followup to my original Friday Q&A on blocks now that the design is finalized and code available for them. Although Apple has yet to ship blocks with any of their developer tools, they have released code for their bloc
Programming with C Blocks On Apple Devices by Joachim Bengtsson What are Blocks? What are Blocks Good For? Getting Started On and for Mac OS X 10.6 Snow Leopard, or for iOS 4 On Mac OS X 10.5 Leopard or for iPhone Blocks in C Syntax and Usage Memory Management Blocks in Objective-C Blocks and ARC (Automatic Reference Counting) Blocks in C++ Block Goodies References and Additional Sources Version H
iOS/iPhone/iPad/MacOSX プログラミング, Objective-C, Cocoaなど iOS4から UIView のアニメーション関連のメソッドで Blocksが利用できるようになった。最近よく利用しているがこれは非常に便利。一方、UIActionSheet で不便を感じていたので試しに Blocksが使える実装を書いてみた。 使い方はこんなイメージ: ActionSheetBlocksExtension* sheet = [[ActionSheetBlocksExtension alloc] initWithTitle:@"Action sheet sample" didClick:^(UIActionSheet* actionSheet, NSInteger buttonIndex) { NSLog(@"[1] index %d: %@", buttonIndex,
Inspired by Jonathan Wight’s CInvocationGrabber and Dave Dribin’s DDInvocationGrabber, I realized Objective-C’s newish support for blocks could make generating NSInvocations even easier. Say hello to NSInvocation+blocks. Let’s have a bake-off! Manual: NSInvocation *theInvocation = [NSInvocation invocationWithMethodSignature:[theString methodSignatureForSelector:@selector(insertString:atIndex:)]];
OS X 10.6 以降の xcode では Objective-C に Blocks というシンタックスが追加されている。 Blocks Programming Topics: Introduction Perl でいうところの無名関数(コードブロック)を作ることができる機能で、Perlでいうところの my $f = sub { ... }; $f->(); は void (^f)() = ^{ ... }; f(); のように書ける。書式がきもいのはObjective-Cの定めなのであきらめましょう。 より詳しい書式については上記ドキュメントを見ると良い。 しかしデフォルトではPerlのコードブロックとはレキシカル変数の扱いが異なる。 my $i = 0; my $f = sub { return $i + 1 }; $i++; $f->(); # 2 を返す perlではこのようにレ
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く