dmj
dmj
还是会崩溃信息依然: 用了两种写法: 第一种:崩溃依然 ``` js self.performSelectorInOC('setKeyWordText', [recordModel.match()], function(ret) { }); ``` setKeyWordText 方法: ``` js setKeyWordText:function(text) { var attrStr = require('NSAttributedString').alloc().initWithData_options_documentAttributes_error(text.dataUsingEncoding(10), { 'DocumentType': 'NSHTML' }, null, null); self.keyWordLabel().setAttributedText(attrStr); return attrStr...
我的setKeyWordText方法以前OC没有,是在JS里面新添加的,应该是调用不了 更换了一个写法,但是遇到一个问题,就是**attrStr**在block中为空,是我哪里不对吗? readFromData_options_documentAttributes_error返回值一直是0 ``` js var attrStr = require('NSMutableAttributedString').alloc().init() return attrStr.performSelectorInOC('readFromData_options_documentAttributes_error', [recordModel.match().dataUsingEncoding(10), { 'DocumentType': 'NSHTML' }, null, pError], function(ret) { console.log(attrStr); }); ```
**"readFromData_options_documentAttributes_error"** 这个方法返回的是bool值