草庐IT

property_selector

全部标签

ios - [UICollectionViewCell cellImageView] : unrecognized selector sent to instance

在UICollectionView上,我想用图像填充CollectionViewCell。但是我收到以下错误:我的错误在哪里,我该如何解决?2013-01-2922:25:38.606foobar[1277:c07]CollectionViewControllerloadedwithsearches:222013-01-2922:25:38.609foobar[1277:c07]id:0->content:2013-01-2922:25:38.610foobar[1277:c07]-[UICollectionViewCellcellImageView]:unrecognizedsele

ios - 只读公共(public),读写私有(private)属性(property)

我看到了这个thread,但在iOS7中并不完全清楚,因为编程指南说您可以省略属性的@synthese关键字。我想要一个@property,它在外部是readonly,但在内部是readwrite。我可以像这样只使用@property关键字吗?编辑:在所提供的答案中,什么会被认为更正确,或者至少更惯用。要在类扩展中拥有单独的readwrite属性还是在实现中直接访问ivar?编辑:按照答案中的建议表明我正在使用类扩展。//.h@interfaceCACustomerAuthenticator:NSObject@property(nonatomic,copy,readonly)NSStr

ios - [UIImage imageWithRenderingMode :]: unrecognized selector sent to instance

关闭。这个问题不符合StackOverflowguidelines.它目前不接受答案。要求提供代码的问题必须表现出对所解决问题的最低限度理解。包括尝试过的解决方案、为什么它们不起作用,以及预期结果。另请参阅:StackOverflowquestionchecklist关闭9年前。Improvethisquestion我正在尝试显示原始标签栏图像。以下代码在iOS7中运行良好,但在iOS6.0中会出现上述崩溃。以下是AppDelegatesdidFinishLaunchingWithOptions中的代码UITabBar*tb=tabBarControllerProperty.tabBa

ios - 尝试从字典中检索字符串时出现 "[__NSArrayM objectForKey:]: unrecognized selector"

我正在尝试为我的标签设置文本。这是代码:-(UITableViewCell*)tableView:(UITableView*)tableViewcellForRowAtIndexPath:(NSIndexPath*)indexPath{newsDataCell*cell=(newsDataCell*)[tableViewdequeueReusableCellWithIdentifier:@"newsData"];if(cell==nil){cell=[[newsDataCellalloc]initWithStyle:UITableViewCellStyleDefaultreuseIde

ios - 由于这个原因应用程序崩溃 [NSConcreteValue boundingBox] : unrecognized selector sent to instance 0x12ecca40

我正在使用cocos2d3.x和Xcode5.1.1。我正在尝试在touchBegan时获取CCSprite位置,使用CCRectContainsPoint函数我遇到了上述错误,这是我的编码..这里checkpt是NSMutable数组,它有CCSprite,在此先感谢..-(void)touchBegan:(UITouch*)touchwithEvent:(UIEvent*)event{for(CCSprite*chekPt_copyin_checkpt){if(CGRectContainsPoint(chekPt_copy.boundingBox,touchLoc)){[selfr

ios - Application.Current.properties 在最新的 xamarin 表单版本中被破坏了吗?

由于我已将我的xamarin安装更新为xamarin4,因此在iOS上跨session保存本地属性不起作用。所以如果我有Application.Current.Properties.Add("key",value);Application.Current.SavePropertiesAsync();当应用程序关闭并重新启动时,它不会保存任何内容。任何指针? 最佳答案 这是通过不按原样保存复杂对象,而是使用JsonConvert将它们序列化为字符串然后存储字符串来解决的。这一直有效。当你想再次取回对象时,只需将字符串反序列化为对象类型

ios - subview 中的按钮操作出现 "unrecognized selector sent to instance"错误

这是我的场景:MainVC:ScrollView:[Multiple]MyPage:[Multiple]ObjectView:[Multple]UIButton我的主视图Controller包含一个UIScrollView。ScrollView应该加载多个启用分页的“MyPage”View。我使用IB创建“MyPage”界面(MyPage.xib)和ViewController文件(MyPage.h&.m)。MyPage.xib文件所有者设置为MyPage。此“MyPage”将再次加载我通过IB使用(ObjectView.xib,ObjectView.h,ObjectView.m)My

ios - NSNotificationCenter 'selector' working than once is single 网络状态变化

在我的应用程序中,我想检测网络状态变化以在当时执行一些操作。我在app-delegate中添加了以下代码。当我打开网络连接时,“networkStatusChanged:”方法被调用一次,这是正确的。当我关闭网络连接时,它会调用两次。谁能帮我找出问题所在......[[NSNotificationCenterdefaultCenter]addObserver:selfselector:@selector(networkStatusChanged:)name:kReachabilityChangedNotificationobject:nil];reachability=[[Reacha

ios - "Fixed"奇怪的 "unrecognized selector sent to instance"崩溃发生在 iOS8 beta5

我的应用在iOS7上运行良好,但在iOS8上崩溃。我见过关于这个主题的各种问题,但从未找到好的解决方案。我有一个使用UITableViewController的应用程序,UITableViewController有一个SearchDisplayController实例调用m_searchDisplayController。当我第一次点击搜索栏进行搜索时,表格View随后显示结果,搜索栏resignFirstResponder。但我再次点击搜索栏时,应用程序崩溃了:-[MyFavoritesViewController_searchController]:unrecognizedsele

ios - 台风不注入(inject)属性(property)(无 Storyboard)

我无法使用带有initWithNibName:bundle:的XIB将属性注入(inject)到ViewController中例子:这是我的程序集:@implementationAppAssembly-(ViewControllerC*)viewControllerC{return[TyphoonDefinitionwithClass:[ViewControllerCclass]configuration:^(TyphoonDefinition*definition){[definitioninjectProperty:@selector(name)with:@"Injectedstr