首页
\
问答
\
选择UICollectionViewCell时以编程方式显示新窗口/视图(Programmatically showing new window/view when selecting UICollectionViewCell)
选择UICollectionViewCell时以编程方式显示新窗口/视图(Programmatically showing new window/view when selecting UICollectionViewCell)
我现在的didSelectItemAtIndexPath代码如下:
- (void)collectionView:(AFIndexedCollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{ if(collectionView.index == 0){ NSLog(@"Reordenador contenido por columna %li",indexPath.item); self.my_data = [self.my_data sortByColumn:indexPath.item skip:1 areAllNumbers:TRUE]; [self.tableView reloadData]; }else{ //show a new window with the content of the cell in a Text Field NSLog(@"Row = %li; Column = %li - content = %@",collectionView.index,indexPath.item,[self.my_data objectInRow:collectionView.index column:indexPath.item]); } }
my_data =自定义2D数组类对象
如何以编程方式打开一个新的弹出窗口/新视图,其中包含所选单元格的内容,例如,文本字段和2个按钮 - 保存/取消?
My code right now for didSelectItemAtIndexPath is the following:
- (void)collectionView:(AFIndexedCollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{ if(collectionView.index == 0){ NSLog(@"Reordenador contenido por columna %li",indexPath.item); self.my_data = [self.my_data sortByColumn:indexPath.item skip:1 areAllNumbers:TRUE]; [self.tableView reloadData]; }else{ //show a new window with the content of the cell in a Text Field NSLog(@"Row = %li; Column = %li - content = %@",collectionView.index,indexPath.item,[self.my_data objectInRow:collectionView.index column:indexPath.item]); } }
my_data = custom 2D array class object
How would I programmatically open a new popup window / new view with the content of the selected cell inside, for example, a Text Field, and 2 buttons - Save / Cancel?
原文:https://stackoverflow.com/questions/22507274
更新时间:2023-05-05 15:05
最满意答案
请放心,GC会照顾它们。
Rest assured the GC will take care of them.
相关问答
更多-
addedfile函数不会将文件添加到dropzone.files因此必须手动添加它: // add file - OK var mockFile = { name: 'test.jpg', size: 0, status: 'success' }; docsDropzone.emit( "addedfile", mockFile ); docsDropzone.emit( "thumbnail", mockFile, 'test.jpg' ); docsDropzone.files.push( mockF ...
-
你究竟想做什么? 假设Text属性是一个字符串,那么据我所知它不能使用格式化程序,因为string不实现IFormattable 。 Binding类(支持DataBindings.Add )具有Format事件和Parse事件,可用于控制格式。 您还可以在目标绑定属性上使用TypeConverter ,我喜欢它,因为它将此逻辑移离UI。 所以:你有一个你想做的例子吗? What exactly are you trying to do? Assuming the Text property is a st ...
-
下面的代码示例演示如何将对象集合绑定到DataGridView控件,以便每个对象显示为单独的行。 如何:将对象绑定到Windows窗体DataGridView控件 在C#中使用DataGridView的ComboBox The following code example demonstrates how to bind a collection of objects to a DataGridView control so that each object displays as a separate r ...
-
将Pod集成到项目中时,CocoaPods会生成无法从Xcode轻松修改的库。 如果你有CocoaPods构建框架,那么根本就不能修改它们。 您通常必须重新运行pod install或pod update以便在将文件添加到Pod时让CocoaPods重新生成它们。 如果你想要可靠地将文件添加到Pod中,你应该在你的机器上签出一个副本,不在你项目的文件夹中,并使用类似下面的内容告诉CocoaPods那个Pod是你正在开发的那个,因此应该以不同的方式集成: pod MyPod, :path => 'path/t ...
-
请放心,GC会照顾它们。 Rest assured the GC will take care of them.
-
您可以将数据放在另一个实现INotifyPropertyChanged的类中,以便通知和更新UI: public partial class Form1 : Form { DataClass dc; public Form1() { InitializeComponent(); dc = new DataClass(); label1.DataBindings.Add("Text", dc, "X", true, DataSourceU ...
-
显然,更新数据源上的任何值都将导致更新所有绑定。 这解释了行为(设置myClass.Text1会导致textBox2使用myClass.Text2的当前值进行更新)。 不幸的是,我能够找到的几篇文章只是说,“这就是它的工作原理”。 处理此问题的一种方法是创建BindingSource ,设置BindingSource.DataSource = myClass ,然后将TextBox绑定到BindingSource 。 如果基础数据源是列表并且添加,删除项目等, 或者 DataSource属性发生更改,则Bi ...
-
尝试指定DataSourceUpdateMode : Dim idBinding As New Binding("Text", bindSource, idField.Name, _ False, DataSourceUpdateMode.Never) 从DataSourceUpdateMode枚举 : 决不: 数据源永远不会更新,并且不会解析,验证或重新格式化输入到控件中的值。 您可以直接更改此内容: idBinding.DataSourceUp ...
-
你不能。 要实现此目的,您需要以编程方式使用push()方法。 此方法将生成一个唯一键,该键可以保存在数据库中,稍后在项目中使用。 请参阅有关将数据保存到Firebase数据库的官方文档 。 希望能帮助到你。 No, you cannot. To achieve this, you need to use the push() method programmatically. This method will generate a unique key that can be saved in your d ...
-
更改手动添加的UINavigationBar的右BarButtonItem?(Change the right BarButtonItem of a manually added UINavigationBar?)[2023-05-10]
style属性无法检索UIBarButtonSystemItemTrash 。 style是UIBarButtonItemStyle类型,可以是UIBarButtonItemStylePlain , UIBarButtonItemStyleBordered 请查看此处的文档 使用此代码 @property (strong, nonatomic) IBOutlet UINavigationBar *RibbonDetailNavBar; // No need to create rightBarButtonI ...