- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
经过进一步调查,我认为最好重新发布问题并提供有关特定问题的更多信息。
这个问题似乎只发生在 iOS7 上。我已经在 iOS6 上测试过,这没有问题。
-- 设置设置是你有一个 UIViewController
(例如第一个 VC),它包含一个 tableView 并且是数据源/委托(delegate)。当 tableView 中的单元格被选择/点击时,您将执行到第二个 View Controller 的 segue(现在可以为空)。
问题是 segue 不会立即发生。不出所料,一秒之内。 segue 中没有传递数据,第二个 View Controller 中没有加载任何数据,因此您希望它是即时的。
有时,这会正常工作而不会出现任何问题。其他时候,您单击单元格却什么也不会发生。
--注意趋势我注意到的是,当“问题”发生时。模拟器/设备将等到下一分钟开始,然后强制通过模态视图 Controller 的负载。要么出现问题时,您可以再次单击/点击设备屏幕上的任意位置以“强制”加载。
这个问题可以在一个新项目中重现,只要有基础知识。我有 uploaded a sample project zip that includes this .
我有一个自定义单元格设置。选择单元格后,我执行以下操作:
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSLog(@"%s",__PRETTY_FUNCTION__);
if (indexPath.section == 0) {
[self performSegueWithIdentifier:@"selectGameTurnDiff" sender:self];
}
}
然后我在 prepareForSegue 中有以下内容:
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
NSLog(@"%s",__PRETTY_FUNCTION__);
[super prepareForSegue:segue sender:sender];
}
以下是一些示例日志来说明这一点:运行 1
2013-10-09 23:54:09.855 App[14954:a0b]-[FirstViewController tableView:didSelectRowAtIndexPath:]
2013-10-09 23:54:09.857 App[14954:a0b]-[FirstViewController prepareForSegue:sender:]
2013-10-09 23:55:00.004 App[14954:a0b]-[SecondViewController viewDidLoad]
2013-10-09 23:55:00.004 App[14954:a0b] -[SecondViewController viewWillAppear:]
2013-10-09 23:55:00.511 App[14954:a0b] -[SecondViewController viewDidAppear:]
运行 2
2013-10-09 23:56:21.900 App[14954:a0b]-[FirstViewController tableView:didSelectRowAtIndexPath:]
2013-10-09 23:56:21.901 App[14954:a0b] -[FirstViewController prepareForSegue:sender:]
2013-10-09 23:57:00.003 App[14954:a0b]-[SecondViewController viewDidLoad]
2013-10-09 23:57:00.003 App[14954:a0b]-[SecondViewController viewWillAppear:]
2013-10-09 23:57:00.508 App[14954:a0b] -[SecondViewController viewDidAppear:]
运行 3
2013-10-09 23:57:43.387 App[14954:a0b]-[FirstViewController tableView:didSelectRowAtIndexPath:]
2013-10-09 23:57:43.388 App[14954:a0b]-[FirstViewController prepareForSegue:sender:]
2013-10-09 23:58:00.004 App[14954:a0b]-[SecondViewController viewDidLoad]
2013-10-09 23:58:00.004 App[14954:a0b] -[SecondViewController viewWillAppear:]
2013-10-09 23:58:00.510 App[14954:a0b] -[SecondViewController viewDidAppear:]
最佳答案
在填充 Radar Apple 后回应添加:
dispatch_async(dispatch_get_main_queue(), ^{});
到下面方法的结尾,它起到了作用:
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
In the method that presents the controller, you can schedule a no-op block which will force the runloop to spin and there will be no delay.
Radar Ref:15196237,请随时提交另一个文件并引用此信息。
关于iOS7 问题与自定义单元格选择模态视图 Controller segue,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19283097/
阅读目录 1、视图介绍 2、创建视图 3、查询视图 4、修改视图 5、删除视图 6、检查选项
基于函数的视图你已经get了,基于类的视图get了吗?CBV本质不知道?点进来看源码分析~ Django 视图之FBV 与 CBV FBV(function base views) 基于函数的视图,就
SQLite 视图(View) 视图(View)只不过是通过相关的名称存储在数据库中的一个 SQLite 语句。视图(View)实际上是一个以预定义的 SQLite 查询形式存在的表的组合。 视图
视图 什么是视图?视图的作用是什么? 视图(view)是一种虚拟存在的表,是一个逻辑表,它本身是不包含数据的。作为一个select语句保存在数据字典中的。 通过视图,可以展现基表(用来创建视图
代码如下: CREATE OR REPLACE VIEW BLOG_V_ADMIN (ID,NICKNAME,SEX,EMAIL,
创建视图 视图包含应用的 HTML 代码,并将应用的控制器逻辑和表现逻辑进行分离。视图文件存放在 resources/views 目录中。下面是一个简单的视图示例:
加密测试的存储过程 ? 1
简介数据库快照 数据库快照,正如其名称所示那样,是数据库在某一时间点的视图。是SQL Server在2005之后的版本引入的特性。快照
一 ,mysql事务 MYSQL中只有INNODB类型的数据表才能支持事务处理。 启动事务有两种方法 (1) 用begin,rollback,commit来实现 复制代码代码如
前言 在日常开发中,存储数据的最常用的方式便是数据库了,其中最为著名的便是MySQL数据库,因它简便易于上手而且可扩展性强大,跨平台使得它广为使用。上一篇文章,我们讲到了它的安装,今天我们就来
1、视图 视图:VIEW,虚表,保存有实表的查询结果,实际数据不保存在磁盘 物化视图:实际数据在磁盘中有保存,加快访问,MySQL不支持物化视图 基表:视图依赖的表 视图中的数据事实上
事项开启和使用 ? 1
代码如下: create PROCEDURE sp_decrypt(@objectName varchar(50)) AS begin begin tran&
前言 在之前 《Oracle打怪升级之路一》中我们主要介绍了Oracle的基础和Oracle常用查询及函数,这篇文章作为补充,主要介绍Oracle的对象,视图、序列、同义词、索引等,以及PL/SQL编
我是一名优秀的程序员,十分优秀!