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

  • SEARCH
  • Home
  • 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 6122639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:55:22+00:00 2026-05-23T15:55:22+00:00

-(void)buPressed{ UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@Game Over message:@YOU LOST! ALL YOUR BASE ARE

  • 0
 -(void)buPressed{

    UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Game Over"
                                                        message:@"YOU LOST! ALL YOUR BASE ARE BELONG TO US!"
                                                       delegate:self
                                              cancelButtonTitle:@"Cancel"
                                              otherButtonTitles:@"Publish", nil];

    [alertView show];
    [alertView release];

    }

    - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
    if(buttonIndex==0){
        NSLog(@"%d",buttonIndex);

    }
    else{
        [self bPressed];
    }   

    }

    -(void)bPressed{

    ModalViewConroller *yeniSayfa=[[ModalViewConroller alloc] init];

    yeniSayfa.modalTransitionStyle=UIModalTransitionStyleFlipHorizontal;

    [self presentModalViewController:yeniSayfa animated:YES];

    [yeniSayfa release];

    //Restore to Defaults
    [button_1 setSelected:NO];
    [button_2 setSelected:NO];
    [button_3 setSelected:NO];
    [button_4 setSelected:NO];
    [button_5 setSelected:NO];
    [button_6 setSelected:NO];
    slider.value=50.00;
    UIImage *image = [UIImage imageNamed:@"Smiley_00025.png"];
    imageView = [[UIImageView alloc] initWithImage:image];
    imageView.frame = CGRectMake(81, 43, image.size.width, image.size.height);  
    [self.view addSubview:imageView];


    }

This is my code i want to make the publish button to call bPressed function but it is giving a warning and the program crashes when i touch the publish button i want to open a modalview when i push the publish button can anybody help me?

  • 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-05-23T15:55:22+00:00Added an answer on May 23, 2026 at 3:55 pm

    You need to declare the function in your header file so that other objects (in this case an instance of UIAlertView, since its delegate is set to your class) know that this method exists.

    So, in your whatever_class.h file, add the following line below the @interface{ }:

    -(void)bPressed;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

-(void) alertView: ( UIAlertView *) alertView clickedButtonAtIndex: ( NSInteger ) buttonIndex { // do
- (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error { NSMutableString *message=[[NSMutableString alloc]init]; // Notifies users about errors associated
-(void)connectionDidFinishLoading:(NSURLConnection *)connection { NSString *theXML = [[NSString alloc] initWithBytes: [myWebData mutableBytes] length:[myWebData length] encoding:NSUTF8StringEncoding];
-(void)setUserFilters{ //init the user filters array userFilters = [[NSMutableArray alloc] init]; SearchCriteria *tmpSc= [[SearchCriteria
- (void)main { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; // Warning goes here NSRunLoop
-(void)viewWillAppear:(BOOL)animated { AppDelegate *appDelegate = (AppDelegate *) [ [UIApplication sharedApplication] delegate]; List = [appDelegate
void (int a[]) { a[5] = 3; // this is wrong? } Can I
void addNewNode (struct node *head, int n) { struct node* temp = (struct node*)
void some_func(int param = get_default_param_value());
void foo(void **Pointer); int main () { int *IntPtr; foo(&((void*)IntPtr)); } Why do I

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.