简体   繁体   English

NSTextContainer exclusionPaths setter无法识别?

[英]NSTextContainer exclusionPaths setter unrecognised?

Sorry if the question looks trivial: 很抱歉,这个问题看起来很琐碎:

I'm trying to set a NSTextContainer instance property exclusionPaths using its underlying setter: [myNSTCInstance setExclusionPaths:arrayOfPaths]; 我正在尝试使用其基础的设置器来设置NSTextContainer实例属性exclusionPaths[myNSTCInstance setExclusionPaths:arrayOfPaths]; and I systematically get: 我系统地得到:

-[NSTextContainer setExclusionPaths:]: unrecognized selector sent to instance 0x12b8410"

Since (for some reasons) I can't use the dot notation myNSTCInstance.exclusionPaths = , I was wondering how to set this property the more classic way? 由于(由于某些原因)我无法使用点表示法myNSTCInstance.exclusionPaths = ,所以我想知道如何以更经典的方式设置此属性?

Thanks for your help! 谢谢你的帮助!

NSTextContainer on iOS has a exclusionPaths property, but NSTextContainer on OS X does not have this property. iOS上的NSTextContainer具有exclusionPaths属性,但OS X上的NSTextContainer 没有此属性。 According to the documentation, you have to subclass NSTextContainer on OS X to define non-rectangular regions. 根据文档,您必须在OS X上子类化NSTextContainer才能定义非矩形区域。

There are no reason that this does'n work. 没有理由不起作用。 exclusionPaths is a property of NSTextContainer class. exclusionPathsNSTextContainer类的属性。

  1. Are you sure that your object is of type NSTextContainer ? 您确定您的对象属于NSTextContainer类型吗?

  2. If Yes, try to remove your derived Data and relaunch Xcode. 如果是,请尝试删除您的派生数据并重新启动Xcode。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM