Xcode: How To Create A PopUp View Controller That Appears In Another View Controller

后端 未结 7 572
-上瘾入骨i
-上瘾入骨i 2021-01-31 12:27

Basically what I am trying to figure out to do is, say I have one View Controller, called V1, that has a regular view inside it and a button. Now, when you tap that button, I wa

7条回答
  •  既然无缘
    2021-01-31 12:38

    file .m ---> this is the implementation file

    -(IBAction)anyAlert:(id)sender{
    
       UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Title" message:@"A Message" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"OK!", @"Other Title", nil];
        [alert show];
        [alert release];
    }
    

    remember declare

    -(IBAction)anyAlert:(id)sender; 
    

    in the file .h ---> header file

    It works for me, hopefully for you...

提交回复
热议问题