ios - What does this kind of declaration of parameters signal (swift)? -


i beginner programmer , reading book on ios programming.

enter image description here

what mean? takes parameter of cgsize, returns cgfloat, , uiimage? point of that?

the following declaration more readable when that:

func makeroundedrectanglemaker(_ sz:cgsize) -> ((cgfloat) -> uiimage?) {     return nil } 

this function takes cgsize parameter method , returns closure kind of function type. here at link can read more it.

also, can create typealias closures, function that:

typealias customnameofclosure = (cgfloat) -> (uiimage?)  func makeroundedrectanglemaker(_ sz:cgsize) -> customnameofclouse {     return nil } 

hope helps :)


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -