Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

这个方法没有 return #5528

Open
huangqiaobo opened this issue May 10, 2023 · 3 comments
Open

这个方法没有 return #5528

huangqiaobo opened this issue May 10, 2023 · 3 comments

Comments

@huangqiaobo
Copy link

- (BOOL)setActive:(BOOL)active

@bbcallen

Non-void function does not return a value

@jiangxiaobin1011
Copy link

直接改成void

@jiangxiaobin1011
Copy link

我搜了一下 并没有进行赋值的地方

@lilingyu0620
Copy link

  • (BOOL)setActive:(BOOL)active
    {
    if (active != NO) {
    return [[AVAudioSession sharedInstance] setActive:YES error:nil];
    } else {
    @Try {
    return [[AVAudioSession sharedInstance] setActive:NO error:nil];
    } @catch (NSException *exception) {
    NSLog(@"failed to inactive AVAudioSession\n");
    }
    }
    }
    本地改一下就行了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants