Results 1 to 3 of 3

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: SDK: UIAlertView buggy?

  1. #1
    Default SDK: UIAlertView buggy?
    hi guys,
    I post this thread because I believe that one of the classes apple provides in cocoa touch is somehow buggy, and I wanted to know if others encountered problems with it too or if I'm just too stupid to use it.
    I'm talking about the UIAlertView API.
    I encountered so many problems with it that I either use it completly wrong or there is something wrong with it that is apples "fault".
    So here are the problems I had with it so far:

    First of all: When I create an alertView using
    Code:
    – initWithTitle:message:delegate:cancelButtonTitle:otherButtonTitles:
    and I set anything besides nil for "otherButtonTitles" my app crashes as soon as the initWithTitle-method is executed. If I add a button later with addButtonWithTitle: it works fine.

    next thing: the methods provided by UIModalViewDelegate don't seem to work. if any of those is called my app crashes as well, so for example if I define
    Code:
    – modalView:didDismissWithButtonIndex:
    or any of the other methods in the UIModalViewDelegate-Protocol my app crashes as soon as the method is called (so, for the method above, my app crashes as soon as the alertView is dismissed).

    Next thing I encountered, which cost me three hours to figure out and finally brought me here: I showed an alertview and below that alertview was a normal UIView. that view had a button on it. the button was supposed to call a custom method as soon as it gets clicked. but when I clicked it (after dismissing the alertview), my app crashed. I tried three hours to figure it out and finally found out that it works perfectly as soon as I took the alertview out. I have no idea how those are related, especially considering that the alertview was already dismissed and released, but this was definetly the reason.

    so any others encountered problems with UIAlertView? if not, how did you create/show one? maybe I did something wrong.

    thanks
    blackwolf
    Last edited by BlackWolf; 2008-03-27 at 09:02 PM.

  2. #2
    I found that it depends on where and how the alert view was called. My big find with it, was when I called the UIAlertView it appeared behind the current view instead of on top, but the screen would go dark like it was on top and wait for the "Okay" button to be pressed.

    Rather annoying. But a friend of mine got his Alert working just fine. Try putting the alert in the top most view and see what happens.

  3. #3
    Quote Originally Posted by SnakeDiver View Post
    I found that it depends on where and how the alert view was called. My big find with it, was when I called the UIAlertView it appeared behind the current view instead of on top, but the screen would go dark like it was on top and wait for the "Okay" button to be pressed.

    Rather annoying. But a friend of mine got his Alert working just fine. Try putting the alert in the top most view and see what happens.
    maybe a stupid question but: how can I put an alertview "on" a view? I just called the view using the "show" method, I never had to define anykind of view except maybe for the ModalViewDelegate. maybe you could give me a quick code snippet? that would be super.

    thanks
    blackwolf

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •