Font With Strike through it

后端 未结 5 920
执念已碎
执念已碎 2020-12-16 08:15

I am doing one project of handling task of the day like taking notes.
So I assign daily task to do and when task is done I want one line strike through the task name.

5条回答
  •  感情败类
    2020-12-16 08:56

    If you use another simple idea its work fine and also very easy....

    just add another lable above your lable and lable code is

    UILabel *canceledlable = [[UILabel alloc] initWithFrame:yourmainlableframe];
    canceledlable.opaque = YES;
    canceledlable.backgroundColor = [UIColor clearColor];
    canceledlable.text = @"------------------------------------------------";
    canceledlable.lineBreakMode = UILineBreakModeClip;
    [self.view addSubview: canceledlable];
    

    here which lable want you strikethrough font just give its frame to here and add this lable when your task is done Hope,this help you...... :)

提交回复
热议问题