- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我有一个 UIPageViewController
三嵌入式UINavigationController
秒。该应用程序在我的设备上运行完美,但在其他一些测试设备上,我遇到了崩溃:function signature specialization <Arg[0] = Owned To Guaranteed>
在 Crashlytics 中。
这是我在 Crashlytics 中获得的报告。
这是我用来设置我的 UIPageViewController
的代码.
import Foundation
import UIKit
import Parse
class PageViewController: UIPageViewController, UIPageViewControllerDataSource, UIPageViewControllerDelegate {
private var pages: [UINavigationController]!
private var currentPageIndex: Int!
override func viewDidAppear(animated: Bool) {
if (FBSDKAccessToken.currentAccessToken() != nil) {
} else {
self.performSegueWithIdentifier("toSignup", sender: self)
}
}
override func viewDidLoad() {
super.viewDidLoad()
// Page view controller is initial VC, but if FB Access Token is nil, redirect to signup flow
if (FBSDKAccessToken.currentAccessToken() != nil) {
self.dataSource = self
self.delegate = self
self.pages = [
self.storyboard!.instantiateViewControllerWithIdentifier("DiscoverNav") as! UINavigationController,
self.storyboard!.instantiateViewControllerWithIdentifier("LiveFeedNav") as! UINavigationController,
self.storyboard!.instantiateViewControllerWithIdentifier("ProfileNav") as! UINavigationController
]
(self.pages[0].topViewController as! DiscoverViewController).parentPageViewController = self
(self.pages[1].topViewController as! LiveFeedViewController).parentPageViewController = self
(self.pages[2].topViewController as! ProfileViewController).parentPageViewController = self
self.currentPageIndex = 1
let startingViewController = self.pages[1] as UINavigationController
self.setViewControllers([startingViewController], direction: .Forward, animated: false, completion: nil)
} else {
self.performSegueWithIdentifier("toSignup", sender: self)
}
}
func pageViewController(pageViewController: UIPageViewController, viewControllerAfterViewController viewController: UIViewController) -> UIViewController? {
let index = (self.pages as NSArray).indexOfObject(viewController)
self.currentPageIndex = index
// if currently displaying last view controller, return nil to indicate that there is no next view controller
return (self.currentPageIndex == self.pages.count - 1 ? nil : self.pages[self.currentPageIndex + 1])
}
func pageViewController(pageViewController: UIPageViewController, viewControllerBeforeViewController viewController: UIViewController) -> UIViewController? {
let index = (self.pages as NSArray).indexOfObject(viewController)
self.currentPageIndex = index
// if currently displaying first view controller, return nil to indicate that there is no previous view controller
return (index == 0 ? nil : self.pages[index - 1])
}
func displayPageForIndex(index: Int, animated: Bool = true) {
assert(index >= 0 && index < self.pages.count, "Error: Attempting to display a page for an out of bounds index")
// nop if index == self.currentPageIndex
if self.currentPageIndex == index { return }
if index < self.currentPageIndex {
self.setViewControllers([self.pages[index]], direction: .Reverse, animated: true, completion: nil)
} else if index > self.currentPageIndex {
self.setViewControllers([self.pages[index]], direction: .Forward, animated: true, completion: nil)
}
self.currentPageIndex = index
}
}
现在看来崩溃似乎来自 ProfileViewController.swift
,但是当 UIPageView
时,该页面不会调用任何内容。负载。在 Crashlytics 报告的第 16 和 17 行,它指向 PageViewController。那里似乎没有太多关于此错误的信息,但从我读到的内容来看,它似乎与某处的 nil 值有关。谁能就此提供建议?
PageViewController 的第 47 行指向 self.storyboard!.instantiateViewControllerWithIdentifier("ProfileNav") as! UINavigationController
最佳答案
事实证明,一些测试用户正试图从他们的 Gmail 应用程序打开 TestFlight 邀请,显然你不应该这样做。我告诉他们从 Safari 或 Apple Mail 打开,它起作用了。感谢额外的头痛 TestFlight。
关于ios - 函数签名特化 <Arg[0] = Owned To Guaranteed>,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32030531/
哪个更好: class Owner { public: void SomeMethodA() { _ownee.SomeMethodA(); } int
这是如何Cow定义: pub enum Cow where B: 'a + ToOwned + ?Sized, { Borrowed(&'a B), Owned(::Owned
我遇到过很多这样的崩溃 function signature specialization of App.CACountryDetectionViewController.receivedWhere
我有一个服务、一个存储库和一个 DbContext。存储库拥有 DbContext,服务拥有存储库。 我的存储库应该实现 IDisposable 吗?如果是这样,我的服务是否也应该实现 IDispos
我在 CentOS 7 上全新安装了未修改的 Apache。我注意到,当我查看/var/www/html 的文件夹权限时,它及其内容归 apache 所有。但是,当创建文件时,其所有者和组是 Apac
这个问题在这里已经有了答案: What is ownership of resources or pointers? (1 个回答) 2个月前关闭。 cppreference用它来描述 std::st
我正在尝试弄清楚如何构造这个数据库: 我有表 Users、表 Galleries 和表 Images。 一旦用户登录,我将他的 ID 存储为 $_SESSION[user_id] 表 Gallerie
在 Windows 上可以通过 Qt API 实现吗?我需要这样的功能/行为因为我想将我的 Qt 代码作为插件集成到第 3 方应用程序中,并且我希望尽可能无缝地进行。例如,我不想在任务栏上有另一个项目
按照目前的情况,这个问题不适合我们的问答形式。我们希望答案得到事实、引用或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
我可以运行以下行: ALTER SEQUENCE seqName OWNED BY table.id; 如何获取序列的 OWNED BY 设置的“所有者”(在本例中为:table.id)? 最佳答案
是否有办法获取在另一个类中调用的类的实例?例如,如果 Foo 类具有 Bar 类和 Clazz 类的实例,有没有办法使用反射通过 Clazz 类获取 Bar 类的实例? public class Fo
很难说出这里问的是什么。这个问题是模棱两可的、含糊的、不完整的、过于宽泛或修辞的,不能以其目前的形式得到合理的回答。如需帮助澄清此问题以便可以重新打开,visit the help center .
尝试在 cPanel 中创建附加域或停放域时出现以下错误: [domain name] is owned by another user. 该域未被列为附加域或托管域。 知道是什么导致了这个错误吗?
我正在尝试在对话实体和短信实体之间建立一个 OneToMany 关联。 我希望外键在对话表上。 Table_Conversation- id BIGINT- sms_id BIGINT FK REFE
我有一个多线程Delphi程序,创建一些类的多个实例,我希望每个类实例都有自己的TMultiReadExclusiveWriteSynchronizer实例,以便在特定属性的get和set方法中使用。
我想知道为什么 nodetools 不知道我的节点处理的环的百分比...... 我创建了这个键空间 CREATE KEYSPACE mykeyspace WITH replication = {'cl
如果我的网站发生错误,我会执行以下操作: Server.Transfer("/error.aspx"); 该页面有代码: protected void Page_Load(object
我有这个数据结构: 我希望有一项 Firebase 规则,允许拥有代码段的用户能够进行编辑,但其他人则不允许。所以在某种程度上,它的工作原理如下: 在添加数据之前,每个人都可以添加特定语言 添加时和添
::UPDATE::链接不再存在! 确实很奇怪,这绝对是个bug!我用另一个应用程序的 app_id 进行了测试,它工作正常。自己看: https://apps.megalopes.com/megab
我试图了解 SQL Server 的安全性,我不确定 OwnedSchema 的确切用途是什么.有人可以在这方面帮助我吗,它在哪些方面发挥着重要作用? 最佳答案 如果当前数据库主体是这些模式的所有者,
我是一名优秀的程序员,十分优秀!