2

次のコードを見てください。問題は、コードが実行されていることをデバッグで確認しても、AlertView が表示されないことです。

ご意見をお聞かせください。

どうもありがとう

エラン

    -(void)displayABC:(id)sender
{

    static int index = 0;
    NSString *path = [[NSBundle mainBundle] pathForResource:@"ABC" ofType:@"plist"];
    NSArray *ABCArray = [NSArray arrayWithContentsOfFile:path];
    if(index < [ABCArray count])
        [authButton setTitle:[ABCArray objectAtIndex:index] forState:UIControlStateNormal];
    index++;


    if (index > [ABCArray count]){

        UIAlertView *endOfABCAlertView = [[UIAlertView alloc] initWithTitle:@"XXX" message:@"XXX" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:nil];
        [self.view addSubview:endOfABCAlertView];

    }
}

最新の Xcode 4.6.3 を使用しています (シミュレーターのバグですか? 多分?)

4

3 に答える 3