We are using Initially UITableView
with MKSlidingTableViewCell
now i facing the issue with scrolling. To overcome this i choose ASyncDisplayKit
(AS tableview)
But these two(MKSlidingTableViewCell
, ASCellNodeBlock
) are not working in the same cell.
Can anyone please suggest me.
While using ASTableView:
func tableView(tableView: ASTableView, nodeForRowAtIndexPath indexPath: NSIndexPath) -> ASCellNode {
let post = postData[indexPath.row];
let cell = UserProfileCell(currentPostData: post, index: indexPath.row, commentsOpenedIndex: openedCommentIndex);
if post.post_type == "post"{
cell.userInteractionEnabled = true;
cell.cellDelegate = self;
cell.FullPicDelegate = self;
let height = cell.configureCell(post, index: indexPath.row, commentsOpenedIndex: openedCommentIndex);
// let height = cell.configureCell(post, index: indexPath.row, commentsOpenedIndex: indexPath.row);
heights[indexPath] = height;
return { cell; }()
}
return { cell; }()
}
While using MKSlidingTableView
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let post = postData[indexPath.row];
if post.post_type == "post"{
let cell = UserProfileCell();
cell.userInteractionEnabled = true;
cell.cellDelegate = self;
cell.FullPicDelegate = self;
let height = cell.configureCell(post, index: indexPath.row, commentsOpenedIndex: openedCommentIndex);
// let height = cell.configureCell(post, index: indexPath.row, commentsOpenedIndex: indexPath.row);
heights[indexPath] = height;
// return cell;
let container = MKSlidingTableViewCell();
let backgroundCell = OptionsViewHomeEvents();
backgroundCell.indexPath = indexPath
backgroundCell.type = OptionsViewType.HomePosts;
backgroundCell.reference = self;
container.drawerView = backgroundCell;
container.foregroundView = cell;
container.delegate = self;
container.drawerRevealAmount = OptionsDrawerWidth.HomePosts;
if(APIHelper.logged_user_id != post.user_id){
container.drawerRevealAmount = 0;
}
return container;
}
}