Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 857109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:20:50+00:00 2026-05-15T08:20:50+00:00

I was going through Apple’s documentation and I saw something like this (void (^)(void))

  • 0

I was going through Apple’s documentation and I saw something like this (void (^)(void)). Can somebody explain what this statement means? ^ is XOR, right? void XOR void doesn’t makes much sense to me?

There was also something like (void (^)(BOOL finished))

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T08:20:51+00:00Added an answer on May 15, 2026 at 8:20 am

    These are blocks which add anonymous functions and function objects to Objective-C. See e.g. Introducing Blocks and Grand Central Dispatch :

    Block objects (informally, “blocks”) are an extension to C, as well as Objective-C and C++, that make it easy for programmers to define self-contained units of work. Blocks are similar to — but far more powerful than — traditional function pointers. The key differences are:

    • Blocks can be defined inline, as “anonymous functions.”
    • Blocks capture read-only copies of local variables, similar to “closures” in other languages

    Declaring a block variable:

    void (^my_block)(void);
    

    Assigning a block object to it:

    my_block = ^(void){ printf("hello world\n"); };
    

    Invoking it:

    my_block(); // prints “hello world\n”
    

    Accepting a block as an argument:

    - (void)doSomething:(void (^)(void))block;
    

    Using that method with an inline block:

    [obj doSomeThing:^(void){ printf("block was called"); }];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 522k
  • Answers 522k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer If you don't want to lose your data, stick with… May 16, 2026 at 9:29 pm
  • Editorial Team
    Editorial Team added an answer I am not sure but you can try with NSString… May 16, 2026 at 9:29 pm
  • Editorial Team
    Editorial Team added an answer Short answer: you cannot. Controls should have default behavior if… May 16, 2026 at 9:29 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I am going through the Apple provisioning profile walkthrough documentation to create the binary
I have been going through and re-creating Apple's Advanced Table View Cells example to
I'm going through SICP and I'd like to have an interpreter analogous to the
I am going through this document and this is what I gathered. <Esc> Escape
I have some XML that looks something like this: <Root> <Documents> <Document id=1/> </Documents>
I am going through the Hello World example on the Chrome dev pages (
I'm trying to get into android development and I'm going through the tutorials, however
I am using R 2.11.1 and XML package 3.1-0, and I was going through
I am just trying to learn some Lisp, so I am going through project
I'm just starting iPhone development (coming fron a .Net world) and have been going

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.