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

后端 未结 8 487
暗喜
暗喜 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 04:54

    UIActionSheet *asAccounts = [[UIActionSheet alloc]
                                initWithTitle:Localized(@"select_an_account")
                                delegate:self
                                cancelButtonTitle:nil
                                destructiveButtonTitle:nil
                                otherButtonTitles: nil];
    
    for (int i=0; i<[result count]; i++) {
        ACAccount *acct = [result objectAtIndex:i];
        [asAccounts addButtonWithTitle:[acct username]];
        asAccounts.tag = i;
    }
    
    [asAccounts addButtonWithTitle:Localized(@"Cancel")];                
    asAccounts.cancelButtonIndex = result.count;
    [asAccounts showInView:self.view];
    

提交回复
热议问题