ios - How can I use a PFImageView in Swift? -


i've tried dragging 1 storyboard, there can find uiimageview. in iboutlet uiimageview, changed pfimageview, , error saying: "use of undeclared type: 'pfimageview'"

do pfimageviews not exist in swift?

you need ensure have parse sdk installed. need ensure import parseui on class using, example:

import parseui 

you can then, on storyboard, select normal imageview, go identity inspector on interface builder, change class uiimageview pfimageview

connect outlet normal code, instead of connecting uiimageview ensure pfimageview, this:

@iboutlet weak var imgtestimage :pfimageview! 

you have access pfimageview attributes such as:

let theimage = yourobject.valueforkey("profileimage") as? pffile imgtestimage.file = theimage imgtestimage.loadinbackground() 

hope helps


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -