小编fis*_*sch的帖子

什么是“APMAnalyticsMeasurementBackgroundTask”?

我正在模拟器中测试我的应用程序,突然控制台上出现此错误。我不知道它与什么相关 - 无论是 Firebase、本地通知还是其他东西。我在网上也找不到任何有关它的信息。有谁知道这个错误是什么意思?

[BackgroundTask] Background Task 17 ("APMAnalyticsMeasurementBackgroundTask"), was created over 30 seconds ago. In applications running in the background, this creates a risk of termination. Remember to call UIApplication.endBackgroundTask(_:) for your task in a timely manner to avoid this.
Run Code Online (Sandbox Code Playgroud)

xcode ios swift

5
推荐指数
0
解决办法
707
查看次数

使用 UIPickerView 时出现约束错误

每当我单击我创建的选择器视图之一时,控制台都会记录以下错误:

[LayoutConstraints] Unable to simultaneously satisfy constraints.
    Probably at least one of the constraints in the following list is one you don't want. 
    Try this: 
        (1) look at each constraint and try to figure out which you don't expect; 
        (2) find the code that added the unwanted constraint or constraints and fix it. 
    (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
Run Code Online (Sandbox Code Playgroud)

我知道当存在冲突的约束时通常会发生此错误,但我不知道在这种情况下冲突的约束是什么。pickerview 仍然可以正常工作,但我仍然想摆脱这个错误。

代码:

@IBAction func showDatePicker(_ sender: PickerField){
        let …
Run Code Online (Sandbox Code Playgroud)

datepicker uipickerview swift

3
推荐指数
1
解决办法
909
查看次数

标签 统计

swift ×2

datepicker ×1

ios ×1

uipickerview ×1

xcode ×1