boolValue
//OC
[[userInfo objectForKey:@"xxx"] boolValue];
//JS
userInfo().objectForKey("xxx");
mj_header
//OC
[self.tableView.mj_header beginRefreshing];
//JS
self.tableView().mj__header().beginRefreshing();
block传值
//OC
self.selectedValueBlock(self.selectedValue);
//JS
var blk = self.selectedValueBlock();
blk(self.selectedValue());
block("id", blk);
重写setter方法
//OC
- (void)setModel:(Model *)model {
_model = model;
}
//JS
setModel: function(model) {
_model = model;
self.ORIGsetModel(model);
}
保留1位小数
parseFloat(s).toFixed(1)
button设置图片
self.btn().setImage_forState(UIImage.imageNamed("xxx"), 0);
网友评论