1
我有问题alertview
当我试图显示一些文本,如果用户取消alertivew
。uialertview与条件if语句在ios
- (void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset
{
UIALertView alertview = [[UIAlertView alloc] initWithTitle:@"New Answer"
message:@"Your text"
delegate:self
cancelButtonTitle:@"Cancel"
otherButtonTitles:@"OK", nil];
[alert show]
if (buttonIndex == 0)
{
NSLog(@"ok");
[[self sectionSelectedDisplay] setText:answerLabel];
}
else
{
NSLog(@"cancel");
}
}
+++++++++++++++++++++++++
谁能帮我解决这个问题?
所以,你要的NSLog的alertview按钮按下的指数? – Woodstock
该问题尚不清楚。你到底需要什么帮助? –
@Puneet:我编辑了代码。那是我的功能。这[[self sectionSelectedDisplay] setText:answerLabel];不在if语句内工作。 – Aragon