Apple will reject app if UIStatusBarForegroundView is used as string

In my application, I need to trigger the display of a specific custom view when the status bar is displayed. I figured out a way to get the event by subclassing UIApplication.

If I use the following code, will Apple block my application from using the private API?

- (void)sendEvent:(UIEvent *)event{
    [[event allTouches] enumerateObjectsUsingBlock:^(UITouch * touch,BOOL * stop){
        if (touch.tapCount==1 && touch.phase==UITouchPhaseEnded) {
            NSString * touchedViewClassName = NSStringFromClass([touch.view class]);
            if ([touchedViewClassName isEqualToString:@"UIStatusBarForegroundView"]) {
                [[NSNotificationCenter defaultCenter] postNotificationName:@"StatusBarTapped" object:nil];
    [super sendEvent:event];


I ask for advice ...


source to share

1 answer

it is against interface and human manuals



All Articles