Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
June 23, 2018, 11:50:11 PM *
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
Author Topic: Questions about Functions and Blocks  (Read 18096 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:  

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 All rights reserved.