Skip to content

你的示例程序的控制器中写错了一个地方 #30

@SPStore

Description

@SPStore

`
for (int i = 0; i < activityTypes.count; i++) {

    DGActivityIndicatorView *activityIndicatorView = [[DGActivityIndicatorView alloc] initWithType:(DGActivityIndicatorAnimationType)[activityTypes[i] integerValue] tintColor:[UIColor whiteColor]];
    CGFloat width = self.view.bounds.size.width / 5.0f;
    CGFloat height = self.view.bounds.size.height / 7.0f;
    activityIndicatorView.frame = CGRectMake(width * (i % 7), height * (int)(i / 7), width, height);
    [self.view addSubview:activityIndicatorView];
    [activityIndicatorView startAnimating];

}`

宽度应该是除以7,不是除以5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions