Camera State

Camera State

Clicking ‘Camera State’ button from the main UI scene triggers the clickCameraStateButton: method of ViewController class. This method calls the class method of OSCState class to make HTTP request of /osc/state. The response message is presented as an NSDictionary object in a dialog, as shown below:

 

ios_camera_state.png

 

- (IBAction)clickCameraStateButton:(id)sender {
    NSLog(@"---------Click OSC State");
    [OSCState OSCRequestState:^{}
              block_errorHTTP:^(id errMsg) {}
               block_errorOSC:^(id errMsg) {}
                block_finally:^{} 
                block_success:^(NSData *result) {
                    NSDictionary *resultDictionary = 
                        [Utils convertJSONDataToDictionary:result];
                    _fingerPrint = 
                        [resultDictionary objectForKey:@"fingerprint"];
                    NSLog(@"result ----- ,%@", resultDictionary);
                    [Utils showDictionaryInAlertWithTarget:resultDictionary 
                        target:self];
                }];
}

Navigation