I want to add some custom controls over UIWebView
's Video Player.
I am able to add any control over it by below code :
First I am adding below notification,
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(addOverLayView:) name:UIWindowDidBecomeVisibleNotification object:nil];
Then on receiving of it,
-(void)addOverLayView:(NSNotification*)aNotification{
UIWindow *window = (UIWindow *)aNotification.object;
if (window != self.view.window) {
[window addSubview:anyCustomview];
}
}
But this view will statically on top of UIWebView
's Video view. But I wants to achieve like when controls of Video player will hide then I want to hide my custom View.
In other words I want to achieve custom OverLayView
on UIWebView
's Video Player view.