Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2017, 06:54:40 PM
Home Help Search chat Login Register 
News: Read this please.The Great Kangaroo Escape Looking for reviews of the 4th ed on Amazon!   Twitter:  @skochan

+ Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
|-+ Programming in Objective-C, 4th edition
| |-+ Chapter 14
| | |-+ Questions about Functions and Blocks
Pages: [1] Go Down
Author Topic: Questions about Functions and Blocks (Read 13978 times)
Posts: 25

on: February 07, 2014, 12:50:25 AM

Where do usually programmers put their blocks and functions?

in header files? or .m? are blocks and functions can be used on another class (imported) ?

from textbook it is said that blocks can be defined inside functions, it looks more flexible. But, when or on what conditions are more appropriate to use functions, blocks or methods?



How about using typdef on blocks?
Xcode provide convenience auto options (dropdown list of functions) such as :

Code: (Objective-C)
typedef <return type>(^block name)(arguments);

How do I apply it in my program?

Code: (Objective-C)
typdef void(^sotBlock)(void)=
    NSLog(@"programming is fun");
this one wont work

Last Edit: February 07, 2014, 01:10:28 AM by shinx2ran Logged
Pages: [1] Go Up
Jump to:

Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents (c) 2009 classroomM.com. All rights reserved.