Control ( UIButton, UILable) Hides when the Video plays Again on iPhone!
Hi,
I have displayed UIButton on top of Playing Movie using this code.
NSArray *windows = [UIApplication sharedApplication] windows;
if (windows count > 1)
{
// Locate the movie player window
UIWindow *moviePlayerWindow = [UIApplication sharedApplication] keyWindow;
// Add our overlay view to the movie player's subviews so it is // displayed above it.
moviePlayerWindow addSubview:self.myABC; }
There are 2 buttons ( 'A' and 'B') on top of my movie layer. They play different videos.Now the strange part is the video plays fine with buttons showing on top of it.
When i press the button 'B' to play the other movie plays, but the buttons doesnt show. Seems the view reloads and flushes all the Subviews. But i have checked it in the debug mode and it enters into the 'if' condition and this code executes.
moviePlayerWindow addSubview:self.myABC;
But the buttons are not dislpayed. To confirm i pressed Button 'A' , while the movie associated with 'A' was playing, the movie starts playing but the buttons doesn't show.
Any ideas wats going wrong ?
Thanks,
Taimur
|