UIActionSheet is not showing separator on the last item on iOS 7 GM

后端 未结 8 464
暗喜
暗喜 2020-12-03 04:31

It could be probably a bug on iOS7. But the last button is not separated from the previous one\"UIActionSheet

8条回答
  •  攒了一身酷
    2020-12-03 05:00

    The simplest fix is to pass @"" to the cancel button title instead of nil during allocation.

    UIActionSheet *actionSheet = [[UIActionSheet alloc]
                   initWithTitle:@"Title"
                   delegate:self
                   cancelButtonTitle:@"" // change is here
                   destructiveButtonTitle:nil
                   otherButtonTitles:@"First", @"Second", @"Third", @"Fourth", nil];
    [actionSheet showInView:self.view];
    

提交回复
热议问题