使用 Storyboard 创建并管理 UI 时,在运行 app 的时候出现了 2013-10-15 09:21:03.212 TestMSR[610:11303] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<MainViewController 0x7557c30> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key star.'
检查 storyboard 的 outlet 时也没发现自己连接过 star.....甚是奇怪。
在此处http://stackoverflow.com/questions/9950938/setvalueforundefinedkey/12302157#12302157
发现 了答案。
原来是昨天创建过 star outlet ,后来把它删除了,但是 storyboard 的 source code 并没有更新。
solutions: open .storyboard as source code, 删除关于 “star” 的 links,返回 xcode 重新编译。
问题解决!
分享到:
相关推荐
reason: '[<ViewController> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key label1.' 多余的连线没有删除(创建了多余的IBOutlet) 5.9 UILabel和UIImageView: UIKit中的...
这个demo有以下几个知识点 1、tabbar的使用 2、scrollview的滚动使用 3、nsuserdefault的使用 4、tableview的使用 5、数组的逻辑与循环 本demo采用纯代码编写,易于理解。 如果有问题请直接在csdn回复我...
[item_dic setValue:title forKey:ITEM_TITLE]; [item_dic setValue:pic forKey:ITEM_PIC]; [item_dic setValue:url forKey:ITEM_URL]; [item_dic setValue:price forKey:ITEM_PRICE]; [self.item_Array ...
[_recordSetting setValue:[NSNumber numberWithInt:kAudioFormatLinearPCM] forKey:AVFormatIDKey]; [_recordSetting setValue:[NSNumber numberWithFloat:44100.0] forKey:AVSampleRateKey]; [_recordSetting ...
生成setter方法,然后用方法respondsToSelector:判断Model是否定义了该属性,在Model中定义的属性,要和服务器返回字典中的Key一样,写错属性变量,程序不会崩溃,不需要重写setValue:(id)value forUndefinedKey:...
setValue: function( e ) { this.setState({ value: e.target.value }); }, render: function() { return ( <input value={this.state.value} 标签:Deepstream
Registry类的SetValue和GetValue详解
警告:这个包不被积极支持。...[[KVDB sharedDB ] setValue: @" apple " forKey: @" fruit " ]; [[KVDB sharedDB ] setValue: @" Chicago " forKey: @" city " ]; MyObject *object = [[MyObject alloc
[self setValue:baseTabBar forKey:@tabBar]; //正常 [_textField setValue:[UIColor redColor] forKeyPath:@_placeholderLabel.textColor];///崩溃 [_textField setValue:[UIFont systemFontOfSize:14] forKeyPath:...
[textField setValue:[UIColor whiteColor]forKeyPath:@_placeholderLabel.textColor]; //字体大小 [textField setValue:[UIFont boldSystemFontOfSize:16] forKeyPath:@_placeholderLabel.font]; //水平居中 ...
setObject:ForKey: 是NSMutableDictionary特有的;setValue:ForKey:是KVC的主要方法。接下来通过本文给大家分享iOS中setValue和setObject的区别,需要的朋友参考下
- (void)creatTabBarView { XPFTabBar *tabBar = [[XPFTabBar alloc] init];... [self setValue:tabBar forKey:@"tabBar"]; [tabBar setDidMiddBtn:^{ NSLog(@" 放学不要走。。。。 "); [self creatView]; }]; }
[request setValue:length forHTTPHeaderField:@"Content-Length"];//设置数据长度 [request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Contene-Type"];//设置数据格式 [request ...
ios获取字典里的内容并不区分它到底是什么类型(数组、字符、字典等等),...往里面保存东西的时候,用setValue:forKey:或者setObject:forKey:。就是给你所要保存的对象(value),起一个名字(key),然后set进入到字典里。
[view.layer setValue:finalValue forKeyPath:keyPath]; SKBounceAnimation *bounceAnimation = [SKBounceAnimation animationWithKeyPath:keyPath]; bounceAnimation.fromValue = [NSNumber numbe
如果想正确显示,一般的方法都是改后台代码,使日期时间格式变为... }, setValue: function (v) { this.value = v; this.setRawValue(this.formatValue(v)); return this; }, formatValue: function (v) { if (v.length
Redux Chillout 根据任何东西(变压器)生成动作和减速器。 设计用于删除香草redux样板代码。... setValue : [ 'value' ] , addValue : state => ( { amount : state . amount + 1 } ) , removeValue : ( state , a
它由一种方法提供动力: - ( void )setValue:( id )value forKeyPath:( NSString *)keyPath state:(UIControlState)state; 这使您可以为给定控件状态的任何键路径设置任何值。 它还为一些常见任务提供了便利设置器...
作者631106979,源码...调用setValue: forKey:这个方法 [self.textField setValue:@4 forKey:@"limit"] 注意事项: forKey 后面的属性 必须是limit,如果你不想是这个,你要在TextLimit中修改,当然我希望你不要修改