Thread: !! BIG Problem with UIAlertview
-
07-24-2009, 03:29 AM #1
!! BIG Problem with UIAlertview
hi guys
i try make UIalert view messege but when i pressed the info button my application be lock !!! and crash from app ! i created my app with ViewBaseda pplication .. UIAlertview code is right but on the example Webview.xib i have this problem .. for example if i choose another SDK project my code run true !
!! this is like my app and same happen my orginal app
plz donwload and compile then tell me your result PLZ

RapidShare: 1-CLICK Web hosting - Easy Filehosting (600 KB)
i waiting to your answer
here is my code :
Alert.h :
#Alert.m:Code:import <UIKit/UIKit.h> #import <Foundation/Foundation.h> @interface alert : UIView { } - (void) showAlert:(id)sender; @end
i used (void) and any code but still doesn't work !Code:#import "alert.h" @implementation alert -(void)showAlert:(id)sender{ UIAlertView *Alert = [[UIAlertView alloc] initWithTitle:@"Alert" message:@"YOHOOOO" delegate:self cancelButtonTitle:nil otherButtonTitles:@"OK", nil]; [Alert show]; [Alert release]; } @endLast edited by imomeks; 07-24-2009 at 04:24 AM.
-
07-26-2009, 09:13 AM #2
Although you sound as if you don't know what you're talking about, I'll give you some tips. You're setting the delegate of the alert to self, when self does not implement the protocol methods of UIAlertView. Also, why create a UIView subclass just to show any alert? If you just want an easy way to create and show an alert, create a standard C function, or add it to an NSObject class. There should be no reason you need to write a view to the screen to show an alert, seeing that an alert is actually a UIWindow, just of a higher level than the rest.
iPhone Developer
Twitter: @Gojohnnyboi
Email: [email protected]
Anthrax ram disk kit developer, hacker.
-
The Following User Says Thank You to gojohnnyboi For This Useful Post:
imomeks (07-31-2009)
-
07-27-2009, 01:44 AM #3
thank you .. i solved my problem,



LinkBack URL
About LinkBacks
Reply With Quote
