我有一个iOS7应用程序,它基于Xcode主 - 详细信息模板,我移植到iOS8.一个变化很大的领域是UISplitViewController
.
在纵向模式下,如果用户点击详细视图控制器,则主视图控制器将被关闭:
如果用户点击一行,我还希望能够以编程方式隐藏主视图控制器.
在iOS 7中,主视图控制器显示为弹出窗口,可以隐藏如下:
[self.masterPopoverController dismissPopoverAnimated:YES];
Run Code Online (Sandbox Code Playgroud)
使用iOS 8,主服务器不再是popover,因此上述技术不起作用.
我试图解雇主视图控制器:
self.dismissViewControllerAnimated(true, completion: nil)
Run Code Online (Sandbox Code Playgroud)
或者告诉拆分视图控制器显示详细信息视图控制器:
self.splitViewController?.showDetailViewController(bookViewController!, sender: self)
Run Code Online (Sandbox Code Playgroud)
但到目前为止还没有任何工作.有任何想法吗?
在iOS 9模拟器中运行我的应用程序时,我在Xcode 7 build 6调试控制台中看到以下错误:
2015-08-27 11:31:25.464 Reps[87841:2572333] 11:31:25.463 ERROR: 177: timed out after 0.012s (589 590); mMajorChangePending=0
Run Code Online (Sandbox Code Playgroud)
有没有人见过这个?知道这是什么意思吗?
它与某些事情有关DispatchSourceTimer
,但我无法到达任何地方.
这给了我一个关于"模棱两可的参考"的错误:
DispatchSourceTimer.scheduleRepeating(deadline:.now(), interval:.milliseconds(delay), leeway:.milliseconds(1))
Run Code Online (Sandbox Code Playgroud)
问题与类型混淆有关.非常感谢matt指向正确的方向.这是我的完整结果.
private var queueNo = 0
@discardableResult func repeater(_ delay:Int, _ closure:(()->())) -> (()->()) {
let queue = DispatchQueue(label: "repeater\(queueNo)", attributes: [])
queueNo += 1
let timer = DispatchSource.makeTimerSource(flags: [], queue: queue)
timer.scheduleRepeating(deadline: .now() + .milliseconds(delay), interval: .milliseconds(delay), leeway: .milliseconds(1))
timer.setEventHandler {
DispatchQueue.main.async(execute: closure)
}
timer.resume()
return {
timer.cancel()
}
}
Run Code Online (Sandbox Code Playgroud) 在iOS 7中,我能够将共享URL缓存设置为子类,NSURLCache
并且UIWebView
我创建的任何s都会自动为每个请求使用该共享缓存.
// Set the URL cache and leave it set permanently
ExampleURLCache *cache = [[ExampleURLCache alloc] init];
[NSURLCache setSharedURLCache:cache];
Run Code Online (Sandbox Code Playgroud)
但是,现在在iOS 8中,似乎UIWebView从共享缓存中拉出并且cachedResponseForRequest
永远不会被调用.
有没有人找到这个变化的文档,或者解决方法?
我的工作区中有大约8个方案.一切都工作正常,但今天早上当我试图改变方案Xcode立即崩溃.根据我尝试运行的其他帖子,defaults delete com.apple.t.Xcode
但这没有帮助.任何想法如何解决这一问题?
当使用 EAS 构建使用 expo-document-picker 的 iOS 应用程序时,我收到以下警告:
expo-document-picker:无法配置 iOS 权利,因为未定义 appleTeamId 属性和环境变量 EXPO_APPLE_TEAM_ID
我搜索了有关此的更多信息,但一无所获。有什么想法如何解决吗?
ios8 ×2
swift ×2
xcode ×2
expo ×1
ios ×1
nsurlcache ×1
objective-c ×1
react-native ×1
reactjs ×1
swift3 ×1
uiwebview ×1
xcode7-beta6 ×1