Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
August 18, 2017, 09:36:31 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register Chat  
Pages: [1]   Go Down
  Print  
Author Topic: Questions about Functions and Blocks  (Read 14605 times)
shinx2ran
Newbie
*
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?

 Huh

---------------------

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)=
^(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
  Print  
 
Jump to:  

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 ゥ 2009 classroomM.com. All rights reserved.