iOS/Objective-C

[Objective-C] Functions / Paul Hudson의 Objective-C cheat sheet

TDCIAN 2023. 4. 12. 09:05

사진에 원본 링크 걸어놨습니다!

 

3. Functions

 

(1) A function that accepts no parameters and returns nothing

 

 

 

(2) A function that accepts no parameters and returns a string

 

 

 

(3) A function that accpets a string and returns a string

 

 

 

(4) A function that accpets a string and an integer, and returns a string

 

 

 

(5) Returning multiple values from a function

 

 

 

(5) A closure that accepts no parameters and returns nothing.

 

 

 

(6) A closure that accepts no parameters and returns a string.

 

 

 

(7) A closure that accepts a string parameter and returns a string.