Deleting a topic is simple. Just call the deleteSynchronous: method like in the following sample code:
deleteSynchronous:
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; } }];