首页
\
问答
\
从collectionView中的自定义tableView以编程方式进行查看(Segue programatically from custom tableView inside collectionView)
从collectionView中的自定义tableView以编程方式进行查看(Segue programatically from custom tableView inside collectionView)
我有两节课:
class FeedAndGroupsViewController: UIViewController, UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout {} class eventsCustomCollectionCell: UICollectionViewCell, UITableViewDataSource, UITableViewDelegate {}
... collectionView类创建UITableView的位置。
我正在尝试在单击tableViewCell时创建自定义segue。 我已经为tableView实现了tableView(didSelectRowAt)函数,它可以正常工作。 但是,我无法从此函数调用performSegue。 有谁知道如何解决这个问题?
I have two classes:
class FeedAndGroupsViewController: UIViewController, UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout {} class eventsCustomCollectionCell: UICollectionViewCell, UITableViewDataSource, UITableViewDelegate {}
... where the collectionView class creates a UITableView.
I am trying to create a custom segue when the tableViewCell is clicked. I have implemented the tableView(didSelectRowAt) function for tableView which works fine. However, I am not able to call performSegue from this function. Anyone know how to solve this?
原文:https://stackoverflow.com/questions/40436339
更新时间:2023-06-03 17:06
最满意答案
相关问答
更多-
代替 canvas.drawBitmap 呼叫 canvas.drawRect(0, 0, getWidth(), getHeight(), p) instead of canvas.drawBitmap call canvas.drawRect(0, 0, getWidth(), getHeight(), p)
-
看起来我想出来了 /[^\d,.]/g 所以功能是 var cleanInputOut = function (element) { element.value = element.value.replace(/[^\d,.]/g, '') } 我真的不明白为什么^字符既用于标记否定集和行的开头,但它似乎正在工作。 我之前尝试过这个正则表达式并且它不时表现得很奇怪,但我不确定问题出在正则表达式本身。 无论如何,欢迎任何关于方法或正则表达式的建议。 It looks like I figur ...
-
尝试将input maxlength设置为5 ; 利用.val(function(index, val)) ; RegExp /\d{3}|[^\d{2}\.]|^\./ $("#valueSconto").on("input", function() { $(this).val(function(i, val) { return val.replace(/\d{3}|[^\d{2}\.]|^\./g, ""); }); });