回车网络 2014-02-27 09:34 采纳率: 0%
浏览 2153

xcode界面按钮点完之后为什么label栏里没有反应

我很烦恼这个问题,比如我现在设计了1这个按钮,然后在模拟器中运行,为什么显示点1label栏没有显示呢,我连接label栏的代码是这样的:
@property (strong,nonatomic) IBOutlet UILabel * display;
我所有的代码是这样的:

#import
@interface HelloViewController : UIViewController
@property (strong,nonatomic) IBOutlet UILabel * display;
-(IBAction) anjian1;
-(IBAction) jia;
@end
#import \\"HelloViewController.h\\"
@interface HelloViewController ()
@end
@implementation HelloViewController
@synthesize display;

  • (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. }
  • (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } -(IBAction) anjian1{ display.text=@\\"1\\"; } -(IBAction) jia{ display.text=@\\"+\\"; } @end
  • 写回答

0条回答

    报告相同问题?

    悬赏问题

    • ¥20 sub地址DHCP问题
    • ¥15 delta降尺度计算的一些细节,有偿
    • ¥15 Arduino红外遥控代码有问题
    • ¥15 数值计算离散正交多项式
    • ¥30 数值计算均差系数编程
    • ¥15 redis-full-check比较 两个集群的数据出错
    • ¥15 Matlab编程问题
    • ¥15 训练的多模态特征融合模型准确度很低怎么办
    • ¥15 kylin启动报错log4j类冲突
    • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大