1
This commit is contained in:
@@ -14,8 +14,11 @@
|
|||||||
+ (NSDictionary *)mj_replacedKeyFromPropertyName {
|
+ (NSDictionary *)mj_replacedKeyFromPropertyName {
|
||||||
return @{
|
return @{
|
||||||
@"commentId" : @"id",
|
@"commentId" : @"id",
|
||||||
@"userName" : @[ @"userName", @"nickname", @"name" ],
|
@"userId" : @"userId",
|
||||||
@"avatarUrl" : @[ @"avatarUrl", @"avatar" ],
|
@"userName" : @"userName",
|
||||||
|
@"avatarUrl" : @"userAvatar",
|
||||||
|
@"createTime" : @"createdAt",
|
||||||
|
@"totalReplyCount" : @"replyCount",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -23,6 +26,24 @@
|
|||||||
return @{@"replies" : [KBAIReplyModel class]};
|
return @{@"replies" : [KBAIReplyModel class]};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)setLiked:(NSInteger)liked {
|
||||||
|
// 后端返回的是 NSInteger (0/1),转换为 BOOL
|
||||||
|
_isLiked = (liked == 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setCreatedAt:(NSString *)createdAt {
|
||||||
|
// 后端返回的是字符串时间,转换为时间戳
|
||||||
|
if (createdAt && createdAt.length > 0) {
|
||||||
|
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
|
||||||
|
formatter.dateFormat = @"yyyy-MM-dd HH:mm:ss";
|
||||||
|
formatter.timeZone = [NSTimeZone timeZoneWithName:@"Asia/Shanghai"];
|
||||||
|
NSDate *date = [formatter dateFromString:createdAt];
|
||||||
|
if (date) {
|
||||||
|
_createTime = [date timeIntervalSince1970];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
- (instancetype)init {
|
- (instancetype)init {
|
||||||
self = [super init];
|
self = [super init];
|
||||||
if (self) {
|
if (self) {
|
||||||
|
|||||||
@@ -7,17 +7,39 @@
|
|||||||
|
|
||||||
#import "KBAIReplyModel.h"
|
#import "KBAIReplyModel.h"
|
||||||
#import <MJExtension/MJExtension.h>
|
#import <MJExtension/MJExtension.h>
|
||||||
|
#import "KBAIReplyModel.h"
|
||||||
|
|
||||||
|
|
||||||
@implementation KBAIReplyModel
|
@implementation KBAIReplyModel
|
||||||
|
|
||||||
+ (NSDictionary *)mj_replacedKeyFromPropertyName {
|
+ (NSDictionary *)mj_replacedKeyFromPropertyName {
|
||||||
return @{
|
return @{
|
||||||
@"replyId" : @"id",
|
@"replyId" : @"id",
|
||||||
@"userName" : @[ @"userName", @"nickname", @"name" ],
|
@"userId" : @"userId",
|
||||||
@"avatarUrl" : @[ @"avatarUrl", @"avatar" ],
|
@"userName" : @"userName",
|
||||||
|
@"avatarUrl" : @"userAvatar",
|
||||||
|
@"createTime" : @"createdAt",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)setLiked:(NSInteger)liked {
|
||||||
|
// 后端返回的是 NSInteger (0/1),转换为 BOOL
|
||||||
|
_isLiked = (liked == 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setCreatedAt:(NSString *)createdAt {
|
||||||
|
// 后端返回的是字符串时间,转换为时间戳
|
||||||
|
if (createdAt && createdAt.length > 0) {
|
||||||
|
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
|
||||||
|
formatter.dateFormat = @"yyyy-MM-dd HH:mm:ss";
|
||||||
|
formatter.timeZone = [NSTimeZone timeZoneWithName:@"Asia/Shanghai"];
|
||||||
|
NSDate *date = [formatter dateFromString:createdAt];
|
||||||
|
if (date) {
|
||||||
|
_createTime = [date timeIntervalSince1970];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
- (NSString *)formattedTime {
|
- (NSString *)formattedTime {
|
||||||
NSDate *date = [NSDate dateWithTimeIntervalSince1970:self.createTime];
|
NSDate *date = [NSDate dateWithTimeIntervalSince1970:self.createTime];
|
||||||
NSTimeInterval interval = [[NSDate date] timeIntervalSinceDate:date];
|
NSTimeInterval interval = [[NSDate date] timeIntervalSinceDate:date];
|
||||||
|
|||||||
@@ -6,17 +6,23 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
|
#import <LSTPopView/LSTPopView.h>
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
/// 抖音风格评论视图
|
/// 抖音风格评论视图
|
||||||
@interface KBAICommentView : UIView
|
@interface KBAICommentView : UIView
|
||||||
|
|
||||||
/// 加载评论数据(从本地 JSON 文件)
|
/// AI 陪聊角色 ID
|
||||||
|
@property(nonatomic, assign) NSInteger companionId;
|
||||||
|
|
||||||
|
/// 加载评论数据(从网络)
|
||||||
- (void)loadComments;
|
- (void)loadComments;
|
||||||
|
|
||||||
/// 评论总数
|
/// 评论总数
|
||||||
@property(nonatomic, readonly) NSInteger totalCommentCount;
|
@property(nonatomic, readonly) NSInteger totalCommentCount;
|
||||||
|
@property(nonatomic, weak) LSTPopView *popView
|
||||||
|
;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,8 @@
|
|||||||
#import "KBAICommentModel.h"
|
#import "KBAICommentModel.h"
|
||||||
#import "KBAIReplyCell.h"
|
#import "KBAIReplyCell.h"
|
||||||
#import "KBAIReplyModel.h"
|
#import "KBAIReplyModel.h"
|
||||||
|
#import "KBCommentModel.h"
|
||||||
|
#import "AiVM.h"
|
||||||
#import <MJExtension/MJExtension.h>
|
#import <MJExtension/MJExtension.h>
|
||||||
#import <Masonry/Masonry.h>
|
#import <Masonry/Masonry.h>
|
||||||
|
|
||||||
@@ -40,6 +42,9 @@ static NSString *const kCommentFooterIdentifier = @"CommentFooter";
|
|||||||
/// 当前回复的目标(二级评论)
|
/// 当前回复的目标(二级评论)
|
||||||
@property(nonatomic, weak) KBAIReplyModel *replyToReply;
|
@property(nonatomic, weak) KBAIReplyModel *replyToReply;
|
||||||
|
|
||||||
|
/// AiVM 实例
|
||||||
|
@property(nonatomic, strong) AiVM *aiVM;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation KBAICommentView
|
@implementation KBAICommentView
|
||||||
@@ -52,7 +57,6 @@ static NSString *const kCommentFooterIdentifier = @"CommentFooter";
|
|||||||
self.comments = [NSMutableArray array];
|
self.comments = [NSMutableArray array];
|
||||||
[self setupUI];
|
[self setupUI];
|
||||||
[self setupKeyboardObservers];
|
[self setupKeyboardObservers];
|
||||||
[self loadComments];
|
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
@@ -162,30 +166,40 @@ static NSString *const kCommentFooterIdentifier = @"CommentFooter";
|
|||||||
#pragma mark - Data Loading
|
#pragma mark - Data Loading
|
||||||
|
|
||||||
- (void)loadComments {
|
- (void)loadComments {
|
||||||
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"comments_mock"
|
if (self.companionId <= 0) {
|
||||||
ofType:@"json"];
|
NSLog(@"[KBAICommentView] companionId 未设置,无法加载评论");
|
||||||
if (!filePath) {
|
|
||||||
NSLog(@"[KBAICommentView] comments_mock.json not found");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
NSData *data = [NSData dataWithContentsOfFile:filePath];
|
__weak typeof(self) weakSelf = self;
|
||||||
if (!data) {
|
[self.aiVM fetchCommentsWithCompanionId:self.companionId
|
||||||
NSLog(@"[KBAICommentView] Failed to read comments_mock.json");
|
pageNum:1
|
||||||
|
pageSize:20
|
||||||
|
completion:^(KBCommentPageModel *pageModel, NSError *error) {
|
||||||
|
__strong typeof(weakSelf) strongSelf = weakSelf;
|
||||||
|
if (!strongSelf) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
NSError *error;
|
|
||||||
NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data
|
|
||||||
options:0
|
|
||||||
error:&error];
|
|
||||||
if (error) {
|
if (error) {
|
||||||
NSLog(@"[KBAICommentView] JSON parse error: %@", error);
|
NSLog(@"[KBAICommentView] 加载评论失败:%@", error.localizedDescription);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
self.totalCommentCount = [json[@"totalCount"] integerValue];
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
NSArray *commentsArray = json[@"comments"];
|
[strongSelf updateCommentsWithPageModel:pageModel];
|
||||||
|
});
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 更新评论数据(从后端返回的 KBCommentPageModel 转换为 UI 层的 KBAICommentModel)
|
||||||
|
- (void)updateCommentsWithPageModel:(KBCommentPageModel *)pageModel {
|
||||||
|
if (!pageModel) {
|
||||||
|
NSLog(@"[KBAICommentView] pageModel 为空");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
self.totalCommentCount = pageModel.total;
|
||||||
|
|
||||||
[self.comments removeAllObjects];
|
[self.comments removeAllObjects];
|
||||||
|
|
||||||
@@ -195,16 +209,20 @@ static NSString *const kCommentFooterIdentifier = @"CommentFooter";
|
|||||||
tableWidth = [UIScreen mainScreen].bounds.size.width;
|
tableWidth = [UIScreen mainScreen].bounds.size.width;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (NSDictionary *dict in commentsArray) {
|
NSLog(@"[KBAICommentView] 加载到 %ld 条评论,共 %ld 条", (long)pageModel.records.count, (long)pageModel.total);
|
||||||
KBAICommentModel *comment = [KBAICommentModel mj_objectWithKeyValues:dict];
|
|
||||||
|
for (KBCommentItem *item in pageModel.records) {
|
||||||
|
// 转换为 KBAICommentModel(使用 MJExtension)
|
||||||
|
KBAICommentModel *comment = [KBAICommentModel mj_objectWithKeyValues:[item mj_keyValues]];
|
||||||
|
|
||||||
// 预先计算并缓存 Header 高度
|
// 预先计算并缓存 Header 高度
|
||||||
comment.cachedHeaderHeight =
|
comment.cachedHeaderHeight = [comment calculateHeaderHeightWithMaxWidth:tableWidth];
|
||||||
[comment calculateHeaderHeightWithMaxWidth:tableWidth];
|
|
||||||
// 预先计算并缓存所有 Reply 高度
|
// 预先计算并缓存所有 Reply 高度
|
||||||
for (KBAIReplyModel *reply in comment.replies) {
|
for (KBAIReplyModel *reply in comment.replies) {
|
||||||
reply.cachedCellHeight =
|
reply.cachedCellHeight = [reply calculateCellHeightWithMaxWidth:tableWidth];
|
||||||
[reply calculateCellHeightWithMaxWidth:tableWidth];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[self.comments addObject:comment];
|
[self.comments addObject:comment];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -422,10 +440,11 @@ static NSInteger const kRepliesLoadCount = 5;
|
|||||||
#pragma mark - Actions
|
#pragma mark - Actions
|
||||||
|
|
||||||
- (void)closeButtonTapped {
|
- (void)closeButtonTapped {
|
||||||
|
[self.popView dismiss];
|
||||||
// 关闭评论视图(由外部处理)
|
// 关闭评论视图(由外部处理)
|
||||||
[[NSNotificationCenter defaultCenter]
|
// [[NSNotificationCenter defaultCenter]
|
||||||
postNotificationName:@"KBAICommentViewCloseNotification"
|
// postNotificationName:@"KBAICommentViewCloseNotification"
|
||||||
object:nil];
|
// object:nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - Lazy Loading
|
#pragma mark - Lazy Loading
|
||||||
@@ -555,33 +574,34 @@ static NSInteger const kRepliesLoadCount = 5;
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)sendNewCommentWithText:(NSString *)text tableWidth:(CGFloat)tableWidth {
|
- (void)sendNewCommentWithText:(NSString *)text tableWidth:(CGFloat)tableWidth {
|
||||||
// 创建新一级评论
|
// TODO: 调用网络接口发送一级评论
|
||||||
KBAICommentModel *newComment = [[KBAICommentModel alloc] init];
|
NSLog(@"[KBAICommentView] 发送一级评论:%@", text);
|
||||||
newComment.commentId = [NSUUID UUID].UUIDString;
|
|
||||||
newComment.userId = @"current_user";
|
|
||||||
newComment.userName = @"我";
|
|
||||||
newComment.avatarUrl = @"";
|
|
||||||
newComment.content = text;
|
|
||||||
newComment.likeCount = 0;
|
|
||||||
newComment.isLiked = NO;
|
|
||||||
newComment.createTime = [[NSDate date] timeIntervalSince1970];
|
|
||||||
newComment.replies = @[];
|
|
||||||
|
|
||||||
// 计算高度缓存
|
// 示例代码:
|
||||||
newComment.cachedHeaderHeight =
|
// [self.aiVM sendCommentWithCompanionId:self.companionId
|
||||||
[newComment calculateHeaderHeightWithMaxWidth:tableWidth];
|
// content:text
|
||||||
|
// completion:^(KBCommentItem *newItem, NSError *error) {
|
||||||
// 插入到数组第一个
|
// if (error) {
|
||||||
[self.comments insertObject:newComment atIndex:0];
|
// NSLog(@"[KBAICommentView] 发送评论失败:%@", error.localizedDescription);
|
||||||
self.totalCommentCount++;
|
// return;
|
||||||
[self updateTitle];
|
// }
|
||||||
|
//
|
||||||
// 插入新 section
|
// // 转换为 KBAICommentModel
|
||||||
[self.tableView insertSections:[NSIndexSet indexSetWithIndex:0]
|
// KBAICommentModel *comment = [KBAICommentModel mj_objectWithKeyValues:[newItem mj_keyValues]];
|
||||||
withRowAnimation:UITableViewRowAnimationAutomatic];
|
// comment.cachedHeaderHeight = [comment calculateHeaderHeightWithMaxWidth:tableWidth];
|
||||||
|
//
|
||||||
// 滚动到顶部
|
// // 插入到数组第一个
|
||||||
[self.tableView setContentOffset:CGPointZero animated:YES];
|
// [self.comments insertObject:comment atIndex:0];
|
||||||
|
// self.totalCommentCount++;
|
||||||
|
// [self updateTitle];
|
||||||
|
//
|
||||||
|
// // 插入新 section
|
||||||
|
// [self.tableView insertSections:[NSIndexSet indexSetWithIndex:0]
|
||||||
|
// withRowAnimation:UITableViewRowAnimationAutomatic];
|
||||||
|
//
|
||||||
|
// // 滚动到顶部
|
||||||
|
// [self.tableView setContentOffset:CGPointZero animated:YES];
|
||||||
|
// }];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)sendReplyWithText:(NSString *)text tableWidth:(CGFloat)tableWidth {
|
- (void)sendReplyWithText:(NSString *)text tableWidth:(CGFloat)tableWidth {
|
||||||
@@ -589,66 +609,67 @@ static NSInteger const kRepliesLoadCount = 5;
|
|||||||
if (!comment)
|
if (!comment)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// 创建新二级评论
|
// TODO: 调用网络接口发送二级评论(回复)
|
||||||
KBAIReplyModel *newReply = [[KBAIReplyModel alloc] init];
|
NSLog(@"[KBAICommentView] 回复评论 %@:%@", comment.commentId, text);
|
||||||
newReply.replyId = [NSUUID UUID].UUIDString;
|
|
||||||
newReply.userId = @"current_user";
|
|
||||||
newReply.userName = @"我";
|
|
||||||
newReply.avatarUrl = @"";
|
|
||||||
newReply.content = text;
|
|
||||||
newReply.likeCount = 0;
|
|
||||||
newReply.isLiked = NO;
|
|
||||||
newReply.createTime = [[NSDate date] timeIntervalSince1970];
|
|
||||||
|
|
||||||
// 如果是回复二级评论,设置被回复用户
|
// 示例代码:
|
||||||
if (self.replyToReply) {
|
// NSInteger parentId = [comment.commentId integerValue];
|
||||||
newReply.replyToUserName = self.replyToReply.userName;
|
// [self.aiVM replyCommentWithParentId:parentId
|
||||||
|
// content:text
|
||||||
|
// completion:^(KBCommentItem *newItem, NSError *error) {
|
||||||
|
// if (error) {
|
||||||
|
// NSLog(@"[KBAICommentView] 回复评论失败:%@", error.localizedDescription);
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// // 转换为 KBAIReplyModel
|
||||||
|
// KBAIReplyModel *newReply = [KBAIReplyModel mj_objectWithKeyValues:[newItem mj_keyValues]];
|
||||||
|
// newReply.cachedCellHeight = [newReply calculateCellHeightWithMaxWidth:tableWidth];
|
||||||
|
//
|
||||||
|
// // 添加到 replies 数组
|
||||||
|
// NSMutableArray *newReplies = [NSMutableArray arrayWithArray:comment.replies];
|
||||||
|
// [newReplies addObject:newReply];
|
||||||
|
// comment.replies = newReplies;
|
||||||
|
// comment.totalReplyCount = newReplies.count;
|
||||||
|
//
|
||||||
|
// // 找到该评论的 section
|
||||||
|
// NSInteger section = [self.comments indexOfObject:comment];
|
||||||
|
// if (section == NSNotFound) return;
|
||||||
|
//
|
||||||
|
// // 如果已展开,添加到 displayedReplies 并插入行
|
||||||
|
// if (comment.isRepliesExpanded) {
|
||||||
|
// NSInteger newRowIndex = comment.displayedReplies.count;
|
||||||
|
// [comment.displayedReplies addObject:newReply];
|
||||||
|
//
|
||||||
|
// NSIndexPath *indexPath = [NSIndexPath indexPathForRow:newRowIndex inSection:section];
|
||||||
|
// [self.tableView insertRowsAtIndexPaths:@[indexPath]
|
||||||
|
// withRowAnimation:UITableViewRowAnimationAutomatic];
|
||||||
|
//
|
||||||
|
// // 刷新 Footer
|
||||||
|
// KBAICommentFooterView *footerView = (KBAICommentFooterView *)[self.tableView footerViewForSection:section];
|
||||||
|
// if (footerView) {
|
||||||
|
// [footerView configureWithComment:comment];
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// // 滚动到新回复
|
||||||
|
// [self.tableView scrollToRowAtIndexPath:indexPath
|
||||||
|
// atScrollPosition:UITableViewScrollPositionBottom
|
||||||
|
// animated:YES];
|
||||||
|
// } else {
|
||||||
|
// // 未展开,刷新 Footer 显示新的回复数
|
||||||
|
// KBAICommentFooterView *footerView = (KBAICommentFooterView *)[self.tableView footerViewForSection:section];
|
||||||
|
// if (footerView) {
|
||||||
|
// [footerView configureWithComment:comment];
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }];
|
||||||
}
|
}
|
||||||
|
|
||||||
// 计算高度缓存
|
- (AiVM *)aiVM {
|
||||||
newReply.cachedCellHeight =
|
if (!_aiVM) {
|
||||||
[newReply calculateCellHeightWithMaxWidth:tableWidth];
|
_aiVM = [[AiVM alloc] init];
|
||||||
|
|
||||||
// 添加到 replies 数组
|
|
||||||
NSMutableArray *newReplies = [NSMutableArray arrayWithArray:comment.replies];
|
|
||||||
[newReplies addObject:newReply];
|
|
||||||
comment.replies = newReplies;
|
|
||||||
comment.totalReplyCount = newReplies.count;
|
|
||||||
|
|
||||||
// 找到该评论的 section
|
|
||||||
NSInteger section = [self.comments indexOfObject:comment];
|
|
||||||
if (section == NSNotFound)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// 如果已展开,添加到 displayedReplies 并插入行
|
|
||||||
if (comment.isRepliesExpanded) {
|
|
||||||
NSInteger newRowIndex = comment.displayedReplies.count;
|
|
||||||
[comment.displayedReplies addObject:newReply];
|
|
||||||
|
|
||||||
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:newRowIndex
|
|
||||||
inSection:section];
|
|
||||||
[self.tableView insertRowsAtIndexPaths:@[ indexPath ]
|
|
||||||
withRowAnimation:UITableViewRowAnimationAutomatic];
|
|
||||||
|
|
||||||
// 刷新 Footer
|
|
||||||
KBAICommentFooterView *footerView =
|
|
||||||
(KBAICommentFooterView *)[self.tableView footerViewForSection:section];
|
|
||||||
if (footerView) {
|
|
||||||
[footerView configureWithComment:comment];
|
|
||||||
}
|
|
||||||
|
|
||||||
// 滚动到新回复
|
|
||||||
[self.tableView scrollToRowAtIndexPath:indexPath
|
|
||||||
atScrollPosition:UITableViewScrollPositionBottom
|
|
||||||
animated:YES];
|
|
||||||
} else {
|
|
||||||
// 未展开,刷新 Footer 显示新的回复数
|
|
||||||
KBAICommentFooterView *footerView =
|
|
||||||
(KBAICommentFooterView *)[self.tableView footerViewForSection:section];
|
|
||||||
if (footerView) {
|
|
||||||
[footerView configureWithComment:comment];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
return _aiVM;
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -531,12 +531,16 @@
|
|||||||
initWithFrame:CGRectMake(0, 0, KB_SCREEN_WIDTH, customViewHeight)];
|
initWithFrame:CGRectMake(0, 0, KB_SCREEN_WIDTH, customViewHeight)];
|
||||||
|
|
||||||
// 设置评论视图的人设 ID
|
// 设置评论视图的人设 ID
|
||||||
// customView.companionId = self.persona.personaId;
|
customView.companionId = self.persona.personaId;
|
||||||
|
|
||||||
|
// 加载评论数据
|
||||||
|
[customView loadComments];
|
||||||
|
|
||||||
LSTPopView *popView = [LSTPopView initWithCustomView:customView
|
LSTPopView *popView = [LSTPopView initWithCustomView:customView
|
||||||
parentView:nil
|
parentView:nil
|
||||||
popStyle:LSTPopStyleSmoothFromBottom
|
popStyle:LSTPopStyleSmoothFromBottom
|
||||||
dismissStyle:LSTDismissStyleSmoothToBottom];
|
dismissStyle:LSTDismissStyleSmoothToBottom];
|
||||||
|
customView.popView = popView;
|
||||||
self.popView = popView;
|
self.popView = popView;
|
||||||
popView.priority = 1000;
|
popView.priority = 1000;
|
||||||
popView.isAvoidKeyboard = NO;
|
popView.isAvoidKeyboard = NO;
|
||||||
|
|||||||
Reference in New Issue
Block a user