I have been trying to come out a solution for using swipe gesture to the right and makes the text on a label.text with strike through effect, swipe again to remove the strike through and leaves the original text intact. Any example of codes as to how to do this? This is a XCode question.
if ([***this is the part i need help with***])
{
NSMutableAttributedString *attributeString = [[NSMutableAttributedString alloc] initWithString:[self.EditItem valueForKey:@"eventName"]];
[attributeString addAttribute:NSStrikethroughStyleAttributeName
value:@1
range:NSMakeRange(0, [attributeString length])];
self.nameTextField.attributedText = attributeString;
[self.EditItem setValue:[NSString stringWithFormat:@"Completed"] forKey:@"eventName"];
NSLog(@"Swiped to the right");
}
else
{
[NSString initWithString:[self.EditItem valueForKey:@"eventName"]];
NSLog(@"normal text no strike through");
}