故事板从表格单元中延伸出来并显示其详细信息披露按钮(storyboard segue from a tablecell an its Detail Disclosure Button)

如果在单元格中单击或单击“细节披露按钮”单元格,我想从表格单元中继续浏览两个不同的视图控制器。

如果我按住ctrl-拖动第二个赛格,第一个被删除。 我究竟做错了什么?

Tnx云母


I want to segue from a tablecell to two different viewcontrollers if clicked in the cell or clicked on the cells Detail Disclosure Button.

If I ctrl-drag the second segue, the first is deleted. What am I doing wrong?

Tnx Mica

2023-03-28 17:03

满意答案

我不认为你可以链接一个特定的细节披露按钮瓦特/赛格。 我的故事板是非常程序化的B / C我使用了很多定制CGRect等。

所以我倾向于使用这样的东西:

-(void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath
{
    [self performSegueWithIdentifier:@"ViewControllerIdentifer" sender:self];
}

作为参考,这是一个非常好的故事板和桌面视图示例项目。 还有一个链接到底部的项目。

http://www.raywenderlich.com/5191/beginning-storyboards-in-ios-5-part-2


I don't think you can link a specific detail disclosure button w/ a segue. My storyboards are extremely programatic b/c I use alot of custom CGRect etc..

so I tend to use something like this:

-(void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath
{
    [self performSegueWithIdentifier:@"ViewControllerIdentifer" sender:self];
}

for reference this is an extremely good example project on storyboards and tableviews. there's a link to the project at the bottom also.

http://www.raywenderlich.com/5191/beginning-storyboards-in-ios-5-part-2

相关问答

更多

故事板从表格单元中延伸出来并显示其详细信息披露按钮(storyboard segue from a tablecell an its Detail Disclosure Button)

我不认为你可以链接一个特定的细节披露按钮瓦特/赛格。 我的故事板是非常程序化的B / C我使用了很多定制CGRect等。 所以我倾向于使用这样的东西: -(void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath { [self performSegueWithIdentifier:@"ViewControllerIdentifer" s...

IOS StoryBoard来自TableCell的多个Segue(IOS StoryBoard multiple Segue's from a TableCell)

在这种情况下,请勿尝试将Segues连接到tableviewcell。 将它们挂接到View Controller本身。 Don't try to hook up the Segues to a tableviewcell in this case. Hook them up to the View Controller itself.

如何根据按下的按钮取消隐藏标记的详细信息公开按钮(How to Unhide tagged detail disclosure button depending on which button was pressed)

在viewDidLoad中使用以下代码解决: //hide info buttons for (int i = 0; i < self.infoButtons.count; i++) { UIButton* button = [self.infoButtons objectAtIndexedSubscript:i]; button.hidden = YES; } 当按下按钮时: //info button reappears when sound button is pr...

必须按两次详细公开按钮才能使用prepareForSegue方法传递数据(Have to press detail disclosure button twice for data to be passed using prepareForSegue method)

检查首先触发哪种方法。 也许您在执行segue后设置属性。 关于你何时(何时)执行segue没有任何信息。 您可以将此行添加到accessoryButton方法: [self performSegueWithIdentifier:yourIdentifierFromStoryboard sender:self]; Check which method fires first. Maybe you set properties after segue is performed. There's n...

配置UITableView自定义详细信息披露按钮的操作(Configuring action for UITableView custom detail disclosure button)

更换 // add a target action customDetailDisclosureButton.addTarget(self, action: #selector(tableView(_:accessoryButtonTappedForRowWith:)), for: .touchUpInside) 同 customDetailDisclosureButton.addTarget(self, action: #selector(ViewController.accessoryBut...

触摸详细信息披露指示时,Mapview注释崩溃(Mapview annotation crashing when detail disclosure indicator touched)

prepareForSegue:和prepareForSegue:sender:方法不一样。 您的prepareForSegue:sender:方法中的placeName和friends也是未知的(或者是ivars)。 我会从根本上改变prepareForSegue:sender:方法并将其更改为 - (void)showMoreInfo:(id)sender{ // Get reference to the destination view controller ...

MapKit注释如何添加详细信息披露信息按钮?(MapKit annotation how to add detail disclosure info button?)

创建一个MKAnnotationView并添加一个按钮。 所以: func mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation) -> MKAnnotationView? { if annotation is MKUserLocation { return nil } if let annotationView = mapView.dequeueReusableAnnotationV...

如何在此自定义披露按钮中执行s segue?(How to perform s segue in this custom disclosure button?)

好的,因为你还没有指定- (void)didTapDisclosureButton是什么,你去了。 在您链接的页面上,我找到了这个例子 JPSThumbnail *thumbnail = [[JPSThumbnail alloc] init]; thumbnail.image = [UIImage imageNamed:@"empire.jpg"]; thumbnail.title = @"Empire State Building"; thumbnail.subtitle = @"NYC L...

从详细信息披露按钮传递对象segue(Passing an object from a detail disclosure button segue)

我通过彻底抛弃segue想法的子类来解决这个问题。 我删除了自定义segue并将push segue( 从tableviewcontrollre )发送到我的详细视图控制器。 然后我创建了一个实例变量NSIndexPath* _ipath; 我的代码如下: - (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath{ _ipth = ...

相关文章

更多

按钮样式

网页上有很多功能是通过链接方式传递参数,这种功能链接普通样式就是一个超链接退出,如果将超链接的样式变成 ...

微信公众号接口添加菜单时错误(errcode":40017 invalid button type)

POST提交时总是报错: {&quot;errcode&quot;:40017,&quot;errms ...

Becoming a data scientist

Data Week: Becoming a data scientist Data Pointed, ...

[转]So You Want To Be A Producer

pro-du-cer n. 1. Someone from a game publisher who ...

ServletOutputStream cannot be resolved to a type

在使用jsp生成web图片时遇到这个问题,这是源代码中的一条语句,源代码可以执行,可是一将源码放入ec ...

A Great List of Windows Tools

Windowsis an extremely effective and a an efficient ...

Drupal Forums instead of phpBB or vBulletin: A casestudy

5th Jan, 10 Drupal drupal advanced forum drupa ...

每日英语:Man Without a Country

'I'm like a proud son of China,' Taiwan-born direct ...

HTML 超链接(a标签、锚)

a标签: anchor锚 1.超链接 -&gt; 点击之后跳转页面 格式: 协 ...

Supra Skytop Shoes All White Gunny are a top performance

The Skytop “Crimson” is an all white leather affair ...

最新问答

更多

绝地求生、荒野行动、香肠派对 哪个更好玩???(都是吃鸡类游戏)

PC上的绝地求生,是最早也是最火的大逃杀游戏。 荒野行动是网易抄袭蓝洞绝地求生制作的手游。相似度90%,还有他一起出的终结折2,这2款正在被蓝洞告,打官司呢。 手游上的绝地求生有2部都是蓝洞授权(收钱)给腾讯开发的正版ID手游。所以跟PC上做的一模一样,蓝洞也没话说。 加上吃鸡国服也是腾讯独家代理,所以根本没有什么可说的。只要这个类型的 过于相似的,腾讯都可以借蓝洞之手起诉。打压同行是国内BAT最爱干的事嘛! 香肠派对画风虽然不一样,但核心玩法还是跟人家正版的一样的,同样也是没有被授权的。 98

如何在jQuery集合中选择第n个jQuery对象?(How to select the nth jQuery object in a jQuery collection?)

你可以使用eq : var rootElement = $('.grid').find('.box').eq(0); rootElement.find('.a'); /* Use chaining to do more work */ You can use eq: var rootElement = $('.grid').find('.box').eq(0); rootElement.find('.a'); /* Use chaining to do more work */

ASP NET使用jQuery和AJAX上传图像(ASP NET upload image with jQuery and AJAX)

您可以自己手动设置FormData键和值。 Upload 创建FormData并设置新的键/值 $("#btnUpload").on("click", function(e) { e.preventDefault(); var file = $("#imguploader").get(0).file

SQL Server XML查询中包含名称空间的位置(SQL Server XML query with namespaces in the where exist)

您可能希望使用#temp.identXml.query而不是#temp.identXml.query 。 您可以在这里阅读更多相关信息SQL Server XML exists() 我相信你也可以像这样使用它 Select #temp.identXml.value('(/*:PersonIdentity/*:MasterIndexes/*:PersonIndex/*:SourceIndex)[1]','varchar(100)') as Ident ,#temp.identXml.value(

宁夏银川永宁县望远镇哪里有修mp5的?

胜利街有家电维修,电脑城,银川商场多得很…

我想用更新的日期标记所有更新的行(I would like to mark all updated rows with the date that they have been updated)

您可以使用更新后触发的触发器来执行此操作。 给出如下表: create table your_table (id int primary key, val int, last_update datetime) 每当您更新表中的内容时,此触发器将设置last_update值。 CREATE TRIGGER trigger_name ON your_table AFTER UPDATE AS BEGIN UPDATE your_table SET your_ta

郑州会计培训班

招生的,至于时间吗,就看你自己的时间段了,你可以致电0371-63300220.他们会帮你选择一下的。离你最近,最专业的培训班。

如何定位数组中的负数,并得到所有正数的总和?(How to target e negative number from an array, and get the sum of all positive numbers?)

只需创建一个条件来检查它是正数还是负数,然后定义一个空的数组negatives ,如果数字是负数,则将其推到负数组中,如果是正数,则将其添加到sum变量中,请查看下面的工作示例。 function SummPositive( numbers ) { var negatives = []; var sum = 0; for(var i = 0; i < numbers.length; i++) { if(numbers[i] < 0) { negati

在响应图像上叠加网格(Overlay grid on responsive image)

使用两个linear-gradient s,我们可以创建两个简单的线条,然后每隔n%重复一次background-size 。 它看起来像这样: background: linear-gradient(to bottom, #000 2px, transparent 2px), linear-gradient(to right, #000 2px, transparent 2px); background-size: 10%; 两个渐变创建两条相交的线,长度为百分比,如下所示: 使用默认的b

无法让POST在Azure网站上运行(Could not get POST to work on Azure Website)

最后我找到了答案......我不得不删除尾随的斜线! 我使用了“ https://example.com/api/messages/ ”,这将自动产生GET,无论我使用PostAsync还是PostAsJsonAsync。 使用“ https://example.com/api/messages”,GET和POST似乎都运行良好! Finally I've found the answer.... I had to remove the trailing slash! I've used "ht