Results 1 to 3 of 3

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


Thread: !! BIG Problem with UIAlertview

  1. #1
    Default !! 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 :
    #
    Code:
    import <UIKit/UIKit.h>
    #import <Foundation/Foundation.h>
    
    @interface alert : UIView {
    	
    }
    
    - (void) showAlert:(id)sender;
    @end
    Alert.m:
    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];
    }
    @end
    i used (void) and any code but still doesn't work !
    Last edited by imomeks; 2009-07-24 at 12:24 PM.

  2. #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.

  3. The Following User Says Thank You to gojohnnyboi For This Useful Post:

    imomeks (2009-07-31)

  4. #3
    thank you .. i solved my problem,

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