トピックの削除

トピックを削除するには、以下のようなコードを実行します。

Swift:

  • // Assume that the target topic has been instantiated.
    
    do{
      // Delete the topic.
      try topic.deleteSynchronous()
    } catch let error as NSError {
      // Handle the error.
      return
    }
  • // Assume that the target topic has been instantiated.
    
    // Delete the topic.
    topic.delete { (topic , error : Error?) -> Void in
      if error != nil {
        // Handle the error.
        return
      }
    }

Objective-C:

  • // Assume that the target topic has been instantiated.
    
    NSError *error = nil;
    
    // Delete the topic.
    [topic deleteSynchronous:&error];
    if (error != nil) {
      // Handle the error.
      return;
    }
  • // Assume that the target topic has been instantiated.
    
    // Delete the topic.
    [topic deleteWithBlock:^(KiiTopic *topic, NSError *error) {
      if (error != nil) {
        // Handle the error.
        return;
      }
    }];