Copyright (c) 2025 Tencent. All rights reserved.
Module: TUILiveGiftManager @ TUIKitEngine
Function: 直播 礼物 相关接口
TUILiveGiftManager
TUILiveGiftObserver
TUILiveGiftManager
结构体类型
函数列表 | 描述 |
Gift 礼物信息 | |
Gift 分类信息 |
onGiftCountChanged:totalGiftsSent:totalGiftCoins:totalUniqueGiftSenders:
onGiftCountChanged:totalGiftsSent:totalGiftCoins:totalUniqueGiftSenders:
- (void)onGiftCountChanged: | (NSString *)roomId |
totalGiftsSent: | (NSUInteger)totalGiftsSent |
totalGiftCoins: | (NSUInteger)totalGiftCoins |
totalUniqueGiftSenders: | (NSUInteger)totalUniqueGiftSenders |
收到礼物数量变化的通知
参数 | 描述 |
roomId | 直播间ID |
totalGiftCoins | 礼物价值 |
totalGiftsSent | 礼物数量 |
totalUniqueGiftSenders | 礼物发送者数量 |
onReceiveGiftMessage:giftInfo:giftCount:sender:
onReceiveGiftMessage:giftInfo:giftCount:sender:
- (void)onReceiveGiftMessage: | (NSString *)roomId |
giftInfo: | |
giftCount: | (NSUInteger)giftCount |
sender: |
收到礼物消息的通知
参数 | 描述 |
giftCount | 礼物数量 |
giftInfo | 礼物信息 |
roomId | 直播间ID |
sender | 礼物发送者信息 |
onReceiveLikesMessage:totalLikesReceived:sender:
onReceiveLikesMessage:totalLikesReceived:sender:
- (void)onReceiveLikesMessage: | (NSString *)roomId |
totalLikesReceived: | (NSUInteger)totalLikesReceived |
sender: |
收到点赞消息的通知
参数 | 描述 |
roomId | 直播间ID |
sender | 点赞发送者信息 |
totalLikesReceived | 点赞数量 |
addObserver:
removeObserver:
getGiftList:onSuccess:onError:
getGiftList:onSuccess:onError:
- (void)getGiftList: | (NSString *)roomId |
onSuccess: | (TUIGetGiftListBlock)onSuccess |
onError: | (TUIErrorBlock)onError |
请求获取礼物列表。
参数 | 描述 |
roomId | 直播间ID |
sendGift:giftId:count:onSuccess:onError:
sendGift:giftId:count:onSuccess:onError:
- (void)sendGift: | (NSString *)roomId |
giftId: | (NSString *)giftId |
count: | (NSUInteger)count |
onSuccess: | (TUISuccessBlock)onSuccess |
onError: | (TUIErrorBlock)onError |
发送礼物
参数 | 描述 |
count | 礼物数量 |
giftId | 礼物ID |
roomId | 直播间ID |
sendLike:count:onSuccess:onError:
sendLike:count:onSuccess:onError:
- (void)sendLike: | (NSString *)roomId |
count: | (NSUInteger)count |
onSuccess: | (TUISuccessBlock)onSuccess |
onError: | (TUIErrorBlock)onError |
发送点赞
参数 | 描述 |
count | 点赞数量 |
roomId | 直播间ID |
getGiftCountByAnchor:onSuccess:onError:
getGiftCountByAnchor:onSuccess:onError:
- (void)getGiftCountByAnchor: | (NSString *)roomId |
onSuccess: | (TUIGetGiftCountBlock)onSuccess |
onError: | (TUIErrorBlock)onError |
房主获取礼物数量
参数 | 描述 |
roomId | 直播间ID |
getLikesCount:onSuccess:onError:
getLikesCount:onSuccess:onError:
- (void)getLikesCount: | (NSString *)roomId |
onSuccess: | (TUIGetLikesCountBlock)onSuccess |
onError: | (TUIErrorBlock)onError |
获取点赞数量
参数 | 描述 |
roomId | 直播间ID |
TUIGiftInfo
TUIGiftInfo
Gift 礼物信息
枚举类型 | 描述 |
coins | Gift 礼物价格 |
desc | Gift 礼物描述 |
extensionInfo | Gift 礼物扩展自定义信息 |
giftId | Gift 礼物ID |
iconUrl | Gift 礼物图标URL |
level | Gift 礼物等级 |
name | Gift 礼物名称 |
resourceUrl | Gift 礼物资源URL |
TUIGiftCategory
TUIGiftCategory
Gift 分类信息
枚举类型 | 描述 |
categoryId | Gift 分类ID |
desc | Gift 分类描述 |
extensionInfo | Gift 分类扩展自定义信息 |
giftList | Gift 分类礼物列表 |
name | Gift 分类名称 |