Objective-C Blocks - raywenderlich.com

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 ม.ค. 2025

ความคิดเห็น • 9

  • @cyberspacedweller637
    @cyberspacedweller637 7 ปีที่แล้ว +4

    Is the first carat supposed to be outside the parentheses in the code example? It's inconsistent with the explanation above it.... (01:46)

  • @armoredninja4975
    @armoredninja4975 5 ปีที่แล้ว +1

    By default, blocks are global in status. They turn into stackblocks when a local variable (outside the block literal) or an ivar gets captured. So if we were to NSLog(@"%@", self.block) before the assignment- "self.block= block" happens , we'd get something like . After the assignment- "self.block= block" runs, the the global-block gets copied into the heap section of the address-space of the currently running program. And so after this, were we to NSLog(@"%@", self.block), we'd get something like .

  • @pingnikhil
    @pingnikhil 5 ปีที่แล้ว +3

    All videos so far in this tutorial nice, thanks.
    Any good book or video tutorial recommendations for building Cocoa apps for macOS?

  • @jasondhindsa6774
    @jasondhindsa6774 5 ปีที่แล้ว

    What if you don't want a specific time delay and instead you want the next set of code to execute AFTER a certain set of code has executed??

  • @keerthanasiddu8217
    @keerthanasiddu8217 7 ปีที่แล้ว

    why we need to use blocks. what is the exact reason for introduction for blocks?

    • @Евгений-м4р5й
      @Евгений-м4р5й 7 ปีที่แล้ว

      this is the best instrument for async operation

    • @WouterStudioHD
      @WouterStudioHD 6 ปีที่แล้ว

      Yup, in Swift they're called Closures and in C++ (and Java too if I'm not mistaken) it's called a Lambda (which to me is the best name). Very useful stuff indeed.

  • @reachpms
    @reachpms 7 ปีที่แล้ว

    Wonderful

  • @Priyanga.V
    @Priyanga.V 4 ปีที่แล้ว

    add subtitles