我很高兴看到 Apple 允许在 iOS 8 中的 iPhone 上使用弹出窗口(在某些情况下,无论如何,更大的 iPhone,仅限横向)并且我将一些代码从显示 UIPickerview 切换为 UIPopoverController,就像我在这个 iPad 应用程序中使用的那样。现在我收到有关 iOS 8.1 崩溃的报告,在我的测试中,我在下面的第二行看到了崩溃:
XfrGraphTypeVC *graphTypePopover = [[XfrGraphTypeVC alloc]
initWithNibName:@"XfrGraphTypeVC"
bundle:[NSBundle mainBundle]
type:xfrChannelMode cellHeight:cellHt];
self.popoverController = [[NSClassFromString(@"UIPopoverController") alloc] initWithContentViewController:graphTypePopover];
我已经尝试了一些方法来解决这个问题,但没有成功。在 iPad 上仍然可以正常工作。 Apple 是否破坏了什么?
编辑:还是不行。苹果在 8.1 中改变了一些东西来打破这个。可能发生了什么?
编辑:现在我认为这是从 Xcode 6.1 开始的,因为使用 Xcode 6.0 构建的应用程序不会崩溃。
崩溃日志:
Incident Identifier: CD6192B8-363D-4EAB-9392-8A366D1FD10C
CrashReporter Key: 797d45c1f30283e0885ce0a30c88ccdf6fd78036
Hardware Model: iPhone7,1
Process: AudioTools [4530]
Path: /private/var/mobile/Containers/Bundle/Application/5EDE9ACF-5372-45B8-B370-3AFFD345ED24/AudioTools.app/AudioTools
Identifier: com.studiosixdigital.audiotools
Version: 7.3.11 (7.3.11)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2014-11-11 17:10:31.927 -0800
Launch Time: 2014-11-11 17:10:26.147 -0800
OS Version: iOS 8.1 (12B411)
Report Version: 105
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x2379fc1f _exceptionPreprocess + 127
1 libobjc.A.dylib 0x30fafc8b objc_exception_throw + 38
2 CoreFoundation 0x2379fb65 +[NSException raise:format:] + 112
3 UIKit 0x26e8a41b -[UIPopoverController _initWithContentViewController:popoverControllerStyle:] + 266
4 AudioTools 0x004f4065 0x69000 + 4763749
5 UIKit 0x26c8fc2b -[UIApplication sendAction:to:from:forEvent:] + 70
6 UIKit 0x26c8fbd1 -[UIControl sendAction:to:forEvent:] + 44
7 UIKit 0x26c7a863 -[UIControl _sendActionsForEvents:withEvent:] + 582
8 UIKit 0x26c8f63d -[UIControl touchesEnded:withEvent:] + 588
9 UIKit 0x26c8f317 -[UIWindow _sendTouchesForEvent:] + 522
10 UIKit 0x26c88be1 -[UIWindow sendEvent:] + 544
11 UIKit 0x26c5f3dd -[UIApplication sendEvent:] + 196
12 UIKit 0x26ed2c29 _UIApplicationHandleEventFromQueueEvent + 13888
13 UIKit 0x26c5de39 _UIApplicationHandleEventQueue + 1296
14 CoreFoundation 0x23766377 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
15 CoreFoundation 0x23765787 __CFRunLoopDoSources0 + 218
16 CoreFoundation 0x23763ded __CFRunLoopRun + 772
17 CoreFoundation 0x236b2211 CFRunLoopRunSpecific + 476
18 CoreFoundation 0x236b2023 CFRunLoopRunInMode + 106
19 GraphicsServices 0x2aa650a9 GSEventRunModal + 136
20 UIKit 0x26cbe1d1 UIApplicationMain + 1440
21 AudioTools 0x0007c647 main + 50
22 AudioTools 0x0006d028 start + 40
最佳答案
UIPopoverController 仍然只适用于 iPad。
来自 Apple Documentation :
Popover controllers are for use exclusively on iPad devices. Attempting to create one on other devices results in an exception.
因此它不适用于 iPhone 设备。可能他们在以前的版本上破坏了一些东西,这就是它对你有用的原因。
关于ios - 为什么我的弹出窗口在 iPhone 6 Plus 上的 iOS 8.1 中崩溃? iOS 8 工作(实际上是 Xcode 6.0 到 6.1 错误),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26890609/
类classAprivatedeffooputs:fooendpublicdefbarputs:barendprivatedefzimputs:zimendprotecteddefdibputs:dibendendA的实例a=A.new测试a.foorescueputs:faila.barrescueputs:faila.zimrescueputs:faila.dibrescueputs:faila.gazrescueputs:fail测试输出failbarfailfailfail.发送测试[:foo,:bar,:zim,:dib,:gaz].each{|m|a.send(m)resc
我在从html页面生成PDF时遇到问题。我正在使用PDFkit。在安装它的过程中,我注意到我需要wkhtmltopdf。所以我也安装了它。我做了PDFkit的文档所说的一切......现在我在尝试加载PDF时遇到了这个错误。这里是错误:commandfailed:"/usr/local/bin/wkhtmltopdf""--margin-right""0.75in""--page-size""Letter""--margin-top""0.75in""--margin-bottom""0.75in""--encoding""UTF-8""--margin-left""0.75in""-
给定这段代码defcreate@upgrades=User.update_all(["role=?","upgraded"],:id=>params[:upgrade])redirect_toadmin_upgrades_path,:notice=>"Successfullyupgradeduser."end我如何在该操作中实际验证它们是否已保存或未重定向到适当的页面和消息? 最佳答案 在Rails3中,update_all不返回任何有意义的信息,除了已更新的记录数(这可能取决于您的DBMS是否返回该信息)。http://ar.ru
我有一个模型:classItem项目有一个属性“商店”基于存储的值,我希望Item对象对特定方法具有不同的行为。Rails中是否有针对此的通用设计模式?如果方法中没有大的if-else语句,这是如何干净利落地完成的? 最佳答案 通常通过Single-TableInheritance. 关于ruby-on-rails-Rails-子类化模型的设计模式是什么?,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.co
我在我的项目目录中完成了compasscreate.和compassinitrails。几个问题:我已将我的.sass文件放在public/stylesheets中。这是放置它们的正确位置吗?当我运行compasswatch时,它不会自动编译这些.sass文件。我必须手动指定文件:compasswatchpublic/stylesheets/myfile.sass等。如何让它自动运行?文件ie.css、print.css和screen.css已放在stylesheets/compiled。如何在编译后不让它们重新出现的情况下删除它们?我自己编译的.sass文件编译成compiled/t
大约一年前,我决定确保每个包含非唯一文本的Flash通知都将从模块中的方法中获取文本。我这样做的最初原因是为了避免一遍又一遍地输入相同的字符串。如果我想更改措辞,我可以在一个地方轻松完成,而且一遍又一遍地重复同一件事而出现拼写错误的可能性也会降低。我最终得到的是这样的:moduleMessagesdefformat_error_messages(errors)errors.map{|attribute,message|"Error:#{attribute.to_s.titleize}#{message}."}enddeferror_message_could_not_find(obje
我正在使用的第三方API的文档状态:"[O]urAPIonlyacceptspaddedBase64encodedstrings."什么是“填充的Base64编码字符串”以及如何在Ruby中生成它们。下面的代码是我第一次尝试创建转换为Base64的JSON格式数据。xa=Base64.encode64(a.to_json) 最佳答案 他们说的padding其实就是Base64本身的一部分。它是末尾的“=”和“==”。Base64将3个字节的数据包编码为4个编码字符。所以如果你的输入数据有长度n和n%3=1=>"=="末尾用于填充n%
我主要使用Ruby来执行此操作,但到目前为止我的攻击计划如下:使用gemsrdf、rdf-rdfa和rdf-microdata或mida来解析给定任何URI的数据。我认为最好映射到像schema.org这样的统一模式,例如使用这个yaml文件,它试图描述数据词汇表和opengraph到schema.org之间的转换:#SchemaXtoschema.orgconversion#data-vocabularyDV:name:namestreet-address:streetAddressregion:addressRegionlocality:addressLocalityphoto:i
为什么4.1%2返回0.0999999999999996?但是4.2%2==0.2。 最佳答案 参见此处:WhatEveryProgrammerShouldKnowAboutFloating-PointArithmetic实数是无限的。计算机使用的位数有限(今天是32位、64位)。因此计算机进行的浮点运算不能代表所有的实数。0.1是这些数字之一。请注意,这不是与Ruby相关的问题,而是与所有编程语言相关的问题,因为它来自计算机表示实数的方式。 关于ruby-为什么4.1%2使用Ruby返
为了将Cucumber用于命令行脚本,我按照提供的说明安装了arubagem。它在我的Gemfile中,我可以验证是否安装了正确的版本并且我已经包含了require'aruba/cucumber'在'features/env.rb'中为了确保它能正常工作,我写了以下场景:@announceScenario:Testingcucumber/arubaGivenablankslateThentheoutputfrom"ls-la"shouldcontain"drw"假设事情应该失败。它确实失败了,但失败的原因是错误的:@announceScenario:Testingcucumber/ar