0

我正在尝试通过此方法发送引导访问会话的请求:UIAccessibilityRequestGuidedAccessSession(YES, ^(BOOL didSucceed)。为此,我在配置文件中添加了 singleAppMode 的键。但每次我只在这种方法中得到其他条件时,

UIAccessibilityRequestGuidedAccessSession(YES, ^(BOOL didSucceed){

    NSLog(@"did succeed =%d",didSucceed);
    if (didSucceed) {
        NSLog(@"entered guided access");
        //  self.inGuidedSessionMode = YES;
        [[[UIAlertView alloc] initWithTitle:@"entered single access mode" message:nil delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show];
    }
    else {
        NSLog(@"failed to enter guided access");
        [[[UIAlertView alloc] initWithTitle:@"Unable to enter single access mode" message:nil delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show];
    }

});

请给我进入成功模式的步骤吗?

4

1 回答 1

0

您需要先通过设置 - 常规 - 辅助功能 - 引导访问从您的设备启用引导访问

于 2015-07-24T05:26:02.850 回答