Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8535095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:21:09+00:00 2026-06-11T10:21:09+00:00

I created a UIAlertView that is in ViewDidLoad, as the following: prompt = [[UIAlertView

  • 0

I created a UIAlertView that is in ViewDidLoad, as the following:

    prompt = [[UIAlertView alloc] init];
    prompt.title = @"تسجيل الدخول";
    prompt.message = @"\n\n\n";
    prompt.delegate = self;
    [prompt addButtonWithTitle:@"الغاء"];
    [prompt addButtonWithTitle:@"دخول"];

    userNameTxtField = [[UITextField alloc] initWithFrame:CGRectMake(12.0, 50.0, 260.0, 25.0)];  
    [userNameTxtField setBackgroundColor:[UIColor whiteColor]]; 
    [userNameTxtField setPlaceholder:@"اسم المستخدم"]; 
    [prompt addSubview:userNameTxtField];

    passwordTxtField = [[UITextField alloc] initWithFrame:CGRectMake(12.0, 85.0, 260.0, 25.0)];  
    [passwordTxtField setBackgroundColor:[UIColor whiteColor]]; 
    [passwordTxtField setPlaceholder:@"كلمة المرور"]; 
    [passwordTxtField setSecureTextEntry:YES]; 
    [prompt addSubview:passwordTxtField];

    [prompt show];  
    //[prompt release];

    // set cursor and show keyboard 
    [userNameTxtField becomeFirstResponder];

and the clickedButtonAtIndex function is as following:

 -(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
if (buttonIndex ==0) {
    NSLog(@"cancel");
}else {
    NSLog(@"will login isA");
}
}

but when I click any buttons, I see the output and then the app crashes and gives me the following Exception:

   [MaktabatyTableViewController respondsToSelector:]: message sent to deallocated instance 0x894cfa0

Any help ????

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T10:21:10+00:00Added an answer on June 11, 2026 at 10:21 am

    i have tried your code. your code working nicely .

    -(void)viewDidLoad
    {
    
        UIAlertView *prompt = [[UIAlertView alloc] init];
        prompt.title = @"تسجيل الدخول";
        prompt.message = @"\n\n\n";
        prompt.delegate = self;
        [prompt addButtonWithTitle:@"الغاء"];
        [prompt addButtonWithTitle:@"دخول"];
    
        UITextField *userNameTxtField = [[UITextField alloc] initWithFrame:CGRectMake(12.0, 50.0, 260.0, 25.0)];
        [userNameTxtField setBackgroundColor:[UIColor whiteColor]];
        [userNameTxtField setPlaceholder:@"اسم المستخدم"];
        [prompt addSubview:userNameTxtField];
    
        UITextField *passwordTxtField = [[UITextField alloc] initWithFrame:CGRectMake(12.0, 85.0, 260.0, 25.0)];
        [passwordTxtField setBackgroundColor:[UIColor whiteColor]];
        [passwordTxtField setPlaceholder:@"كلمة المرور"];
        [passwordTxtField setSecureTextEntry:YES];
        [prompt addSubview:passwordTxtField];
    
        [prompt show];
        //[prompt release];
    
        // set cursor and show keyboard
        [userNameTxtField becomeFirstResponder];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created an alert view with two buttons using the following code: UIAlertView
i create an apps that i want to prompt an message for the user..
I'm trying to instantiate UiAlertView like this: UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@Error message:@Incorrect
How can I create a UIAlertView that allows a user to select a single
I created an instance of UIAlertView with two buttons and in the interface file
Created Private Key & Self signed certficate in a Key Store keytool -genkey -alias
The title of this question should be pretty self explanatory. I am making an
I created a SQLite database that currently has only one table. I connected it
I've added an UIAlertView that has UIActivityIndicatior as a subview on my application. This
I'm attempting to create a Please wait UIAlertView that will appear while my code

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.