2016-03-23 7 views
0

パーズで通知と同様の通知を作成(削除)していますが、コンソールにこのメッセージが表示されています: 2016-03-22 20:22:04.850 myapp [3081:645612] - [myapp.feedVCリフレッシュ:]:インスタンスに送信された認識できないセレクタ0x30fd4db725300パーズを使用した通知

通知が送信され、Parseで正常に更新される他のインスタンスを作成できましたが、何らかの理由でこの通知で問題が発生しました。事前の助けや指導に感謝します。

let object = PFObject(className: "likes") 
      object["by"] = PFUser.currentUser()?.username 
      object["to"] = uuidLbl.text 
      object.saveInBackgroundWithBlock({ (success:Bool, error:NSError?) -> Void in 
       if success { 
        print("liked") 
        self.likeBtn.setTitle("like", forState: .Normal) 
        self.likeBtn.setBackgroundImage(UIImage(named: "like.png"), forState: .Normal) 

        // send notification if we like to refresh tableView 
        NSNotificationCenter.defaultCenter().postNotificationName("liked", object: nil) 

        // send notification as like 
        if self.usernameBtn.titleLabel?.text != PFUser.currentUser()?.username { 
         let newsObj = PFObject(className: "news") 
         newsObj["by"] = PFUser.currentUser()?.username 
         newsObj["ava"] = PFUser.currentUser()?.objectForKey("ava") as! PFFile 
         newsObj["to"] = self.usernameBtn.titleLabel!.text 
         newsObj["owner"] = self.usernameBtn.titleLabel!.text 
         newsObj["uuid"] = self.uuidLbl.text 
         newsObj["type"] = "like" 
         newsObj["checked"] = "no" 
         newsObj.saveEventually() 
        } 
       } 
      }) 
+0

あなたのコードベースを 'refresh'のために検索したいと思います。あなた自身が' feedVC'のインスタンスに対して 'refresh'を呼び出すか、Parseがあなたのためにやっていますか? – sjwarner

+0

うん、それだった。ありがとう! – user3708224

答えて

0

私はrefreshのためにあなたのコードベースを検索したい - あなたはfeedVCのインスタンスを自分でリフレッシュを呼んでいる、またはパースはあなたのためにそれをやっているのどちらか。

関連する問題