Control ( UIButton, UILable) Hides when the Video plays Again on iPhone!

Posted by Taimur Hamza on Stack Overflow See other posts from Stack Overflow or by Taimur Hamza
Published on 2010-06-08T11:27:12Z Indexed on 2010/06/08 11:32 UTC
Read the original article Hit count: 172

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

© Stack Overflow or respective owner

Related posts about iphone

Related posts about interface-builder