#import @interface ViewController : UITableViewController@property (weak, nonatomic) IBOutlet UILabel *Label1;- (IBAction)onClick:(id)sender;@end为了将事件...
分类:
其他好文 时间:
2014-12-02 20:36:08
阅读次数:
185
今天出现跟着MJ的思路敲的代码,自己最后运行出现这个 错误,发现是 自己在将属性和相关联的控件连线时出现了 错误。一开始取名时出现了错误,发现线连重复了。在网上又找到了一些出现该类错误的相关解释:一般此问题 都是由interface build与代码中IBOutlet的连接所引起的。可能是在代码中对...
分类:
其他好文 时间:
2014-12-01 20:37:17
阅读次数:
137
#import "ViewController.h"@interface ViewController ()@property (weak, nonatomic) IBOutlet UITextField *标题; //用的是一个text按键@property (weak, nonatomic) I...
分类:
移动开发 时间:
2014-11-29 17:35:12
阅读次数:
454
#import "ViewController.h"@interface ViewController ()@property (weak, nonatomic) IBOutlet UITextField *one;//能够输入的第一个文本文框 用的是text按键@property (weak, n...
分类:
移动开发 时间:
2014-11-29 17:30:43
阅读次数:
710
storyboard中的控件,比如标签,图片,按钮什么的。拖到对应的类文件以后,跳出来的属性是IBOutlet,是弱引用,为什么不是强引用呢,因为storyboard已经强引用他了,所以呢,当你把它removeFromSuperView以后,再想...
分类:
其他好文 时间:
2014-11-28 21:30:39
阅读次数:
369
#import@interface ViewController : UIViewController@property (retain, nonatomic) IBOutlet UIImageView *imgV;- (IBAction)openCamera:(id)sender;- (IBAct...
分类:
移动开发 时间:
2014-11-20 06:48:42
阅读次数:
257
#import #import "ViewController.h"@interface ViewController ()@property(nonatomic, weak) IBOutlet UILabel *label1;@end@implementation ViewController- ...
分类:
其他好文 时间:
2014-11-20 06:44:28
阅读次数:
307
重现问题: 新建一个UILabel控件 与viewcontroller绑定 @IBOutlet weak var height: UILabel! ………… ………… println("\(height.text)") 打印结果: Optional("170厘米") (有默认值) 问: 为什么不是打印1...
分类:
编程语言 时间:
2014-11-13 14:51:45
阅读次数:
398
1.IBAction:1> 能保证方法可以连线2> 相当于void2.IBOutlet:1> 能保证属性可以连线3.常见错误setValue:forUndefinedKey:]: this class is not key value coding错误原因是:连线出问题了4.Xcode5开始的一些建...
分类:
移动开发 时间:
2014-11-13 00:34:38
阅读次数:
162
#import @interface FirstViewController : UIViewController@property (weak, nonatomic) IBOutlet UITextField *contentTxtField;@end#import "SecondViewCont...
分类:
移动开发 时间:
2014-11-11 16:04:06
阅读次数:
157