DDLog 打印日志,可以改变打印等级,也可以彩色显示。
封装约束,就不用写一堆代码来写约束了。可以很方便就定义一个view的位置。
https://github.com/SnapKit/Masonry
点击事件或者其他事件的block
https://github.com/zwaldowski/BlocksKit
eg. 例如点击
在tableview一层就赋予好点击后会执行什么函数
cell.itemClickedBlock = ^(NSInteger index){
[weakSelf goToIndex:index];
};
----------------------------------------------------------------
在cell里写好点击后会回调上面赋予的block
[item bk_addEventHandler:^(id sender) {
if (self.itemClickedBlock) {
self.itemClickedBlock(index);
}
} forControlEvents:UIControlEventTouchUpInside];
----------------------------------------
actionsheet
UIActionSheet *actionSheet = [UIActionSheet bk_actionSheetCustomWithTitle:@"删除此评论" buttonTitles:nil destructiveTitle:@"确认删除" cancelTitle:@"取消" andDidDismissBlock:^(UIActionSheet *sheet, NSInteger index) {
ESStrongSelf
if (index == 0 && _self.commentIndex >= 0) {
Comment *comment = [_self.commentTweet.comment_list objectAtIndex:_self.commentIndex];
[_self deleteComment:comment ofTweet:_self.commentTweet];
}
}];