Iphone 在UIalertview中传递值

Iphone 在UIalertview中传递值,iphone,Iphone,我需要在单个警报视图中传递1个变量…例如。。。。我需要将用户名传递为“john videos deleted” 我将代码编写为 self.myAlert = [[[UIAlertView alloc] initWithTitle:@"MNB" message:@"Video deleted Successfully" delegate:self cancelButtonTitle:nil otherButtonTitles:@"OK",nil] autorelease]; 打开UIAl

我需要在单个警报视图中传递1个变量…例如。。。。我需要将用户名传递为“john videos deleted”

我将代码编写为

    self.myAlert = [[[UIAlertView alloc] initWithTitle:@"MNB" message:@"Video deleted Successfully" delegate:self cancelButtonTitle:nil otherButtonTitles:@"OK",nil] autorelease];

打开UIAlertView的视图控制器应保留此变量,而不是AlertView。

有人理解此问题吗?请以适当的方式提问,我们无法理解您到底想要什么。是否要在AlertView上显示变量中的任何内容。。
NSString *str = @"John";

self.myAlert = [[[UIAlertView alloc] initWithTitle:@"MNB" message:[NSString strinWithFormat:@"%@ video deleted successfully",str] delegate:self cancelButtonTitle:nil otherButtonTitles:@"OK",nil] autorelease];