JSPatch

作者: 西西西瓜sama | 来源:发表于2017-01-16 19:10 被阅读16次
//更改背景色
//JS
var redColor = UIColor.redColor();
self.setBackgroundColor(redColor);
//mesonry
require('UICollectionViewCell,UIColor,UIImageView,UIView')

defineClass("CategoryVideoCell",{
            
        drawCell: function() {
            
            var filmImgView = self.filmImgView();
            filmImgView = UIImageView.alloc().init();
            self.addSubview(filmImgView);
            filmImgView.mas__makeConstraints(block('MASConstraintMaker *',function(make){
                                                   
                                               make.left().mas__equalTo()(self.mas__left()).offset()(0);
                                               make.right().mas__equalTo()(self.mas__right()).offset()(0);
                                               make.top().mas__equalTo()(self.mas__top()).offset()(0);
                                               make.bottom().mas__equalTo()(self.mas__top()).offset()(99.5);
                                                   
                                                  }
                                                  
                                            )
                                            
            );
            
            
        }
            
})

相关文章

网友评论

      本文标题:JSPatch

      本文链接:https://www.haomeiwen.com/subject/laupbttx.html