The ModMyTM Family of Sites:
ModMyMotoModMyiModMyGphone




 
 
Register or Connect with Facebook

Discuss AppStore Apps | Browse / Search Cydia | MMi Cydia Stats




  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > 3rd Party Apps For iPhone | iPod Touch > iPhone / iPod Touch SDK | Development Discussion
Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 03-27-2008, 01:59 PM
Livin the iPhone Life
 
Join Date: Dec 2007
Posts: 1,439
Thanks: 15
Thanked 182 Times in 173 Posts
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; 03-27-2008 at 02:02 PM..
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #2  
Old 03-27-2008, 04:53 PM
What's Jailbreak?
 
Join Date: Sep 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

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.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #3  
Old 03-27-2008, 05:08 PM
Livin the iPhone Life
 
Join Date: Dec 2007
Posts: 1,439
Thanks: 15
Thanked 182 Times in 173 Posts

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
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
Reply

  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > 3rd Party Apps For iPhone | iPod Touch > iPhone / iPod Touch SDK | Development Discussion

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Go to Top
ModMyI

All times are GMT -6. The time now is 07:31 AM. Powered by vBulletin® Version 3.8.4
If you need Dedicated Server Hosting, you should check out SingleHop. | Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0 Copyright © 2007-09 by ModMy, LLC. All rights reserved.

iPhone News / iPhone Forums / Apple News / Apple Forums / RSS / Contact Us / / Privacy Statement / Top