小编Dap*_*rio的帖子

如何隐藏 SwiftUI 列表分隔符

我试图隐藏列表中单元格之间的分隔线,但根据 Apple 的文档,似乎没有办法做到这一点。

知道怎么做吗?

ios13 swiftui

8
推荐指数
1
解决办法
5058
查看次数

在角度测试中注入位置

我在角度组件中使用了位置注入功能,以将用户重定向到另一条路线。它按预期工作,但是当我运行测试时,我收到此消息

错误:StaticInjectorError(DynamicTestModule)[CreateGroupComponent->位置]:StaticInjectorError(平台:核心)[CreateGroupComponent->位置]:NullInjectorError:没有位置提供者!

这是我的测试课

import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { CreateGroupComponent } from './create-group.component';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms';
import { GroupService } from '../core/groupService/group.service';
import { AuthService } from '../core/authService/auth.service';
import { RouterTestingModule } from '@angular/router/testing';

describe('CreateGroupComponent', () => {
  let component: CreateGroupComponent;
  let fixture: ComponentFixture<CreateGroupComponent>;

  beforeEach(async(() => {

    const mockGroupService: any = {

    };

    const mockAuthService: any = {

    };

    TestBed.configureTestingModule({
      imports: [ReactiveFormsModule],
      declarations: [CreateGroupComponent],
      schemas: [CUSTOM_ELEMENTS_SCHEMA],
      providers: …
Run Code Online (Sandbox Code Playgroud)

testing karma-runner angular

2
推荐指数
1
解决办法
1076
查看次数

使用不同的颜色设置导航栏和状态栏

我正在使用Swift创建一个应用程序,我希望状态栏和导航栏有不同的颜色,如谷歌翻译应用程序或iOS上的谷歌音乐应用程序.

我已经知道状态栏和导航栏的颜色不能单独设置,但有什么类型的技巧可以做到吗?

ios swift

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

标签 统计

angular ×1

ios ×1

ios13 ×1

karma-runner ×1

swift ×1

swiftui ×1

testing ×1