iPhone App简单计算器-客观C错误 [英] iPhone app simple calculator - objective c error

查看:40
本文介绍了iPhone App简单计算器-客观C错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是iOS开发的新手,目标是c.所以我想从一个简单的应用程序开始.我正在尝试制作一个玩纸牌游戏的应用程序,该应用程序记录每个回合的得分.因此,它只是将每支球队(两支球队)的分数相加.在应用程序界面中,将有三个按钮和两个文本字段以添加分数,并在文本视图中查看记录的所有分数.

i'm new in iOS developing and the objective c. so i want to start with a simple app. i'm trying to make an app for a play cards game that records the score each round. so it just adds up each team (two teams ) score. in the app interface there will be three buttons and two text fields to add the scores and a text view to see all the scores recorded.

所以现在我在使用记录方法n在iPhone模拟器中按下记录后,我遇到了运行时错误:

so now i'm on the record method n i get a runtime error after pressing record in the iPhone simulator :

- (IBAction)record:(id)sender {
  //  NSString *slna = lna.text;
   // NSString *slhm = lhm.text;
    int x, y, resultx, resulty;
x  = [lna.text integerValue];
y  = [lhm.text integerValue];
resultx = 0;
resulty = 0;
resultx= resultx+x;
resulty= resulty+y;
alnashrah.text = [NSString stringWithFormat:@"%d      %d", resultx,resulty];    

我得到的错误消息是:线程1:断点2.1"

the error message i get : " Thread 1 : breakpoint 2.1 "

推荐答案

如果这是控制台告诉我们的所有信息,这不是错误消息,则意味着您添加了一个断点.在您的代码旁边,您将看到一条装订线,如果按下它,您可以添加断点,这些是蓝色箭头.这是一张图片:

IF that is all the information the console is telling us, this is not an error message, it means you added a breakpoint. Beside your code, you will see a gutter line, if you press it you can add breakpoints which are these blue arrow things. Here is an image:

因此要取消选择断点,只需单击它或右键单击它,然后按Delete键即可.

So to unselect the breakpoint, just click it or right click it and press delete.

也可以禁用断点:command + Y或按停止按钮,方案栏和构建状态栏附近顶部的断点选择按钮

Also to disable breakpoints: command+Y or press the breakpoints select button at the top near the stop button and the scheme bar and the build status bar

这篇关于iPhone App简单计算器-客观C错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆