Protocol - 8
2015-09-11 12:02
411 查看
又找到一处炫酷使用委托的例子,所以说学习优秀的代码才是学习好玩之处!
进入inputBarStyle方法一看:
代理部分:
太牛逼了吧!炫酷之处在于旨在意会!
if ([JSMessageInputView inputBarStyle] == JSInputBarStyleFlat) { sendButton = [UIButton buttonWithType:UIButtonTypeSystem]; } else { sendButton = [UIButton buttonWithType:UIButtonTypeCustom]; }
进入inputBarStyle方法一看:
+ (JSInputBarStyle)inputBarStyle { if ([__delegate respondsToSelector:@selector(inputBarStyle)]) return [__delegate inputBarStyle]; return JSInputBarStyleDefault; }
代理部分:
static id<JSMessageInputViewDelegate> __delegate;
@protocol JSMessageInputViewDelegate <NSObject> @optional - (JSInputBarStyle)inputBarStyle; @end
太牛逼了吧!炫酷之处在于旨在意会!
相关文章推荐
- JS计算滚动条的宽度
- C#值类型和引用类型浅析
- easy ui 下拉框绑定数据select控件
- 详解CSS选择器、优先级与匹配原理
- SQL server数据库连接问题汇总
- asp控制xml数据库的经典代码
- 登录的大屏背景
- CocoaPods安装和使用教程
- FastDFS常见命令
- 在ashx一般处理程序中使用session
- 记录一个try catch没有生效的原因,以便备忘
- #openstack-meeting: swift(2015-09-09)
- 使用Jenkins搭建持续集成(CI)环境
- 欢迎使用CSDN-markdown编辑器
- 求解无约束最优化问题方法
- 把自己主要在做的几个工程都传到了GitHub上
- 多级代理下获取客户端真实IP
- jquery的ajax()函数传值中文乱码解决方法介绍
- 03-修改器
- 系统性能测试及调优--转载