Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ok and Cancel button not visible in ios 8 #51

Closed
kalpesh22m opened this issue Sep 19, 2014 · 5 comments
Closed

Ok and Cancel button not visible in ios 8 #51

kalpesh22m opened this issue Sep 19, 2014 · 5 comments
Labels

Comments

@kalpesh22m
Copy link

sdcalertissu1
sdcalertissu2

Hi,
I am getting issue in ios 8 . in ios 7 it works perfectly. I am attaching screen shot .
i have also post my question on stackoverflow https://stackoverflow.com/questions/25933306/sdalertview-buttons-are-not-visible-in-ios-8..
Thanks in advance
Kalpesh

@sberrevoets
Copy link
Owner

Have you updated to 1.4.1? This was a known problem, but was supposedly got fixed in 1.4.1. If not, please post the code you use to initialize your alert.

@kalpesh22m
Copy link
Author

Thanks. After updating to 1.4.1 it is fixed..

@sberrevoets
Copy link
Owner

Great!

@kalpesh22m
Copy link
Author

Hi one more query . In my project i am showing UIActionSheet . On action sheet button click method i was trying to show SDCAlertview. It showing properly but after dismissing the alertview , view touch are not working.
Here is my code :

- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
     NSString *buttonTitle = [actionSheet buttonTitleAtIndex:buttonIndex];
    if ([buttonTitle isEqualToString:@"Invite via E-mail"])
   {
    viewTrans.hidden=NO;
    viewMailPopup.hidden=NO;
    }
    else if (![buttonTitle isEqualToString:@"Cancel"])
   {
    //message
   [self inviteViaTextMessage:buttonTitle];
    //[self sendRequestToServer:@"P-Phone"];
     }

 }

 -(void)inviteViaTextMessage:(NSString *)number
  {
    if([MFMessageComposeViewController canSendText])
     {
     }
   else
     {
       if (SYSTEM_VERSION_GREATER_THAN(@"7.0"))
         {
        SDCAlertView *alert = [[SDCAlertView alloc] initWithTitle:@"Failure"
                                                          message:@"Your device doesn't support the message"
                                                         delegate:nil
                                                cancelButtonTitle:@"OK"
                                                otherButtonTitles:nil];
       [alert show];
       }
    else
    {
        ios6AlertView *alert = [[ios6AlertView alloc] initWithTitle:@"Failure"
                                                          message:@"Your device doesn't support the message"
                                                         delegate:nil
                                                cancelButtonTitle:@"OK"
                                                otherButtonTitles:nil];
        [alert show];
    }


    }
}

Thanks in advance

@sberrevoets
Copy link
Owner

Yeah, that's one of the known limitations of SDCAlertView. Both UIActionSheet and SDCAlertView create separate windows, so that goes wrong. See this issue #39, which is basically the same.

Unfortunately, there is no (easy) way to fix that. I'm working on a UIAlertController clone, but it may be a while before that's ready. In the mean time, I'd suggest using a default alert (since it doesn't look like you're using any of the additional features of SDCAlertView).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants