IOS类似于微信和qq的泡泡语音
来源:互联网 发布:淘宝怎样领取淘金币 编辑:程序博客网 时间:2024/04/30 21:21
// 未简化 不可复用 仅供参考
//泡泡语音
- (UIView *)yuyinView:(NSInteger)logntime from:(BOOL)fromSelf withIndexRow:(NSInteger)indexRow withPosition:(int)position{
//根据语音长度int yuyinwidth = 66+fromSelf;UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];button.tag = indexRow;if(fromSelf) button.frame =CGRectMake(320-position-yuyinwidth, 10, yuyinwidth, 54);else button.frame =CGRectMake(position, 10, yuyinwidth, 54);//image偏移量UIEdgeInsets imageInsert;imageInsert.top = -10;imageInsert.left = fromSelf?button.frame.size.width/3:-button.frame.size.width/3;button.imageEdgeInsets = imageInsert;[button setImage:[UIImage imageNamed:fromSelf?@"SenderVoiceNodePlaying":@"ReceiverVoiceNodePlaying"] forState:UIControlStateNormal];UIImage *backgroundImage = [UIImage imageNamed:fromSelf?@"SenderVoiceNodeDownloading":@"ReceiverVoiceNodeDownloading"];backgroundImage = [backgroundImage stretchableImageWithLeftCapWidth:20 topCapHeight:0];[button setBackgroundImage:backgroundImage forState:UIControlStateNormal];UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(fromSelf?-30:button.frame.size.width, 0, 30, button.frame.size.height)];label.text = [NSString stringWithFormat:@"%d''",logntime];label.textColor = [UIColor grayColor];label.font = [UIFont systemFontOfSize:13];label.textAlignment = NSTextAlignmentCenter;label.backgroundColor = [UIColor clearColor];[button addSubview:label];return button;
}
3 0
- IOS类似于微信和qq的泡泡语音
- QQ和微信语音音量分析
- 类似于微信和QQ消息列表的数字红点,拖拽消失
- iOS开发给UITableView的单元格做一个类似于QQ和微信的侧滑露出删除按钮的思路
- iOS适配后台打电话和qq微信视频语音通话
- 谁有类似于微信的实现语音聊天的android代码,求发
- IOS 微信分享和QQ分享的总结
- ios微信和QQ原生分享
- 关于微信、QQ语音消息,语音电话的时候控制应用音频播放以及暂停
- Android 仿QQ/微信语音功能。
- 创建类似于微信或QQ聊天视图的Android库:ChatMessageView
- ios微信语音播放之切换听筒和扬声器
- 类似于QQ的菜单
- 类似于QQ的菜单
- Js判断Android和IOS、微信和QQ
- 一个类似于QQ语音聊天时的拖拽移动悬浮小球
- 类似于微信通讯录的界面Demo
- 类似于微信通讯录的界面Demo
- Java中导出pdf文件,pdf工具类demo
- 何为程序员的自我修养?
- IntelliJ IDEA 常用快捷键列表及技巧大全
- 【HDU5922 2016CCPC东北地区大学生程序设计竞赛 - 重现赛 A】【水题】Minimum’s Revenge
- This version of the rendering library is more recent than your version of ADT plug-in. Please update
- IOS类似于微信和qq的泡泡语音
- ios AutoLayout中的Content Hugging 和 Content Compression Resistance 优先级问题
- CentOS 6.8 配置GO语言开发环境
- iOS平台下cookie实现自动登录
- 注册模块
- 关于排序算法的理解(一)
- 我的笔记
- esp8266-01板的arduino烧写方式
- 未来已来——划时代的 Hololens