views:

51

answers:

1

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 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 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 line runs

[moviePlayerWindow addSubview:self.myABC];

But the buttons are not dislpayed. Any ideas wats going wrong ?

Thanks, Taimur

A: 

are you using MPMoviePlayerController?

Zaki
Yeah of course !
T. A.