質問編集履歴
1
質問を完結にしました
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Swift3
|
1
|
+
Swift3 warning - Result of call is unused, but produces 'BFTask<NSNumber>
|
test
CHANGED
@@ -1,58 +1,18 @@
|
|
1
|
-
Xcode8+Parse(on heroku)でインスタグラム的なアプリを作っています。
|
1
|
+
Xcode8+Parse(on heroku)でインスタグラム的なアプリを作っています。下記の方法でParse上からオブジェクトを消去しようとしているのですが、Parse上にもデータを消すことができません。
|
2
2
|
|
3
|
-
ちなみに、Parse上で手動でフォロー中ユーザのオブジェクトを消去すると、アプリ上でもフォロー
|
3
|
+
ちなみに、Parse上で手動でフォロー中ユーザのオブジェクトを消去すると、アプリ上でもフォローを解除できます。このことから、Parseに対して消去の命令が伝わっていない感じがするのですが、解決方法が分かりません。アドバイスをお願い致します。
|
4
4
|
|
5
5
|
P.S. 気になるのは、プログラムを実行するとdeleteInBackground()の部分で、
|
6
6
|
|
7
|
-
Result of call is unused, but produces 'BFTask<NSNumber>'というwarningが出ている点です。
|
7
|
+
Result of call is unused, but produces 'BFTask<NSNumber>'というwarningが出ている点です。この部分をどの様に変更すれば良いのでしょうか。
|
8
|
+
|
9
|
+
|
8
10
|
|
9
11
|
```swift3
|
10
12
|
|
13
|
+
|
11
14
|
|
12
|
-
|
13
|
-
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
let cell:UITableViewCell = tableView.cellForRow(at: indexPath)!
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
let followedObjectId = userids[(indexPath as NSIndexPath).row]
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
// セル中のユーザーを選択した場合にフォローされているかを確認
|
26
|
-
|
27
|
-
if isFollowing[followedObjectId] == false {
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
// フォローされていない場合にはフォローする
|
32
|
-
|
33
|
-
isFollowing[followedObjectId] = true
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
cell.accessoryType = UITableViewCellAccessoryType.checkmark
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
let following = PFObject(className: "followers")
|
42
|
-
|
43
|
-
following["following"] = userids[(indexPath as NSIndexPath).row]
|
44
|
-
|
45
|
-
following["follower"] = PFUser.current()?.objectId
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
following.saveInBackground()
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
15
|
+
// ココから下でセル中のフォローしているユーザーをタップした場合にフォロー解除の処理
|
56
16
|
|
57
17
|
} else {
|
58
18
|
|