You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 13, 2023. It is now read-only.
My question is really simple. Could you please let me know how do I use that?
My original code is here
in Tableviewcontroller
loadPost(){
blah blah~~~
//Get All of Post
let postQuery = PFQuery.orQuery(withSubqueries: [friendsPostQuery, myPostQuery, sellPostQuery])
postQuery.includeKeys(["postBy", "comment", "comment.commentBy"])
postQuery.limit = self.page
postQuery.addDescendingOrder("createdAt")
postQuery.findObjectsInBackground { (objects:[PFObject]?, error:Error?) in blah blah~~~
}
I want subscribe of postQuery.
So I changed my code like this
Step 1. Make "Post" Class
class Post: PFObject, PFSubclassing
Step 2. declare subscription variable in tableviewcontroller and postQuery variable.
var postQuery: PFQuery? {
return Post.query()?
.whereKey("hi", equalTo: "Something")
<-- How do I set like loadPost()?
}
//Post Subscription
private var subscription: Subscription<Post>?