注意:

这是PARSE附近的一些想法:

https://www.parse .com /问题/ ios-while-will-swift for-parse-ready

(注意问题是多受欢迎的 - 热门话题)。希望它有助于某人


这是ios7解析云代码调用...

如何在swift中这样做?干杯

要清除...... 你可以在swift 中使用“callfunctioninbackground”,或者您必须只打电话给objc类?

-(void)tableView:(UITableView *)tableView
        commitEditingStyle:(UITableViewCellEditingStyle)editingStyle
        forRowAtIndexPath:(NSIndexPath *)indexPath
    {
    int thisRow = indexPath.row;
    PFUser *delFriend = [self.theFriends objectAtIndex:thisRow];

    NSLog(@"you wish to delete .. %@", [delFriend fullName] );

    // note, this cloud call is happily is set and forget
    // there's no return either way. life's like that sometimes

    [PFCloud callFunctionInBackground:@"clientRequestFriendRemove"
            withParameters:@{
                            @"removeThisFriendId":delFriend.objectId
                            }
            block:^(NSString *serverResult, NSError *error)
            {
            if (!error)
                {
                NSLog(@"ok, Return (string) %@", serverResult);
                }
            }];

    [self back];    // that simple
    }
.


注意,我注意到这是一个google登陆页面,用于试图弄清楚“如何进行云代码调用”(与swift不相关)。以下是自定义云代码函数的iOS和Android 的完整,完整的示例代码,在Parse.com Universe https://stackoverflow.com/a/24010828/294884 希望它有助于某人

其他提示

无法调用此确切函数( callfunctioninbackground ),因为它是一个obj-c函数。

请参阅这个问题如何调用obj-c函数。

时间解析也会引入SWIFT实现。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top