【问题标题】:Code breakpoint代码断点
【发布时间】:2013-09-16 02:52:36
【问题描述】:

你好,我有一个代码,当我运行退出并说有一个断点

- (void)checkCollision{
    if(CGRectIntersectsRect(penny.frame, hand.frame))
    {
        [randomMain invalidate];
        [startButton setHidden:NO];

        pos= CGPointMake(0.0, 0.0);

        CGRect frame = [penny frame];
        frame.origin.x=137.0f;
        frame.origin.y=326.0;
        [penny setFrame:frame];     (the breakpoint is here)

        CGRect frame2 = [hand frame];
        frame2.origin.x=137.0f;
        frame2.origin.y=20.0;
        [hand setFrame:frame2];

        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"You Lose" message:[NSString stringWithFormat:@"He got the penny!"] delegate:nil cancelButtonTitle:@"Dismiss" otherButtonTitles:nil];
        [alert show];
        [alert release];
    }
}

有什么想法吗? 我对网站的草率表示歉意,我是新来的网站,谢谢!

【问题讨论】:

    标签: objective-c uiviewcontroller breakpoints


    【解决方案1】:

    有时断点与显示的代码不同步。尝试转到断点窗口(Command + 6 或 View->Navigators->Show Breakpoint Navigator。

    在该导航器中,您可能会看到活动断点。如果您可以找到错误的断点,请将其从列表中删除。否则,最好的办法是删除所有断点。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-09-28
      • 1970-01-01
      • 1970-01-01
      • 2011-03-08
      • 2013-03-21
      • 2012-11-01
      • 2017-04-26
      • 1970-01-01
      相关资源
      最近更新 更多