一个聊天输入框的工具栏,类似微信聊天工具栏,可自定义,集成方便
如图功能,集成方便
1.“LQIMInputView”目录文件即为集成所需文件:
InputItem .h&.m
InputItemModel .h&.m
LQCollectionViewHorizontalLayout .h&.m
LQIMInputVie .h&.m
2.使用方法:
//第一步
self.inputView = [[LQIMInputView alloc] initWithFrame:CGRectMake(0, [UIScreen mainScreen].bounds.size.height-210, [UIScreen mainScreen].bounds.size.width, 210)];
//第二步
self.inputView.backgroundColor = [UIColor colorWithRed:248.0/255.0 green:248.0/255.0 blue:248.0/255.0 alpha:1.0];
//第三步
[self.inputView addItem:[InputItemModel initWithTitle:@"相册" imageName:@"tupian" clickedBlock:^{
NSLog(@"相册");
}]];
[self.inputView addItem:[InputItemModel initWithTitle:@"拍照" imageName:@"zhaoxian" clickedBlock:^{
NSLog(@"拍照");
}]];
[self.inputView addItem:[InputItemModel initWithTitle:@"加价" imageName:@"jiajia" clickedBlock:^{
NSLog(@"加价");
}]];
[self.inputView addItem:[InputItemModel initWithTitle:@"确认完成" imageName:@"queren" clickedBlock:^{
NSLog(@"确认完成");
}]];
[self.inputView addItem:[InputItemModel initWithTitle:@"联系客服" imageName:@"kefu" clickedBlock:^{
NSLog(@"联系客服");
}]];
[self.inputView addItem:[InputItemModel initWithTitle:@"电话联系" imageName:@"dianhau" clickedBlock:^{
NSLog(@"电话联系");
}]];
//第四步
[self.view addSubview:self.inputView];