ios - Use RSSBlockParser success block with Swift -


i wanna use rssblockparser new swift programming language.

everything works, expect of 'how work blocks'. example elementary call of rss parser:

    let request = nsurlrequest(url: nsurl(string:"http://www.codebuddies.de/feed"))     let parser = rssparser()     parser.parserssfeedforrequest(request, success: <#((anyobject[]!) -> void)?#>, failure: <#((nserror!) -> void)?#>) 

i hove no idea, how replace placeholder success , failure. or links missed find on own googleing.

thanks helping newbie!

in swift, closures used in place of blocks. https://developer.apple.com/library/prerelease/ios/documentation/swift/conceptual/swift_programming_language/closures.html#//apple_ref/doc/uid/tp40014097-ch11-xid_117

success: { (objects: anyobject[]!) in     // things objects }  error: { (error: nserror!) in     // things error } 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -