userAB
userAB

Reputation: 21

AVPlayer - UILabel not visible when video starts playing in ios

I have a UILabel over my video player.

On load of the video controller the label is showing, as soon as the video starts its hiding.

I have already tried these below steps to overcome this issue but no luck:-

1) self.captionLbl.layer.zPosition = 1; 2) [self.view bringSubviewToFront:self.captionLbl];

Any help is highly appreciated!

Upvotes: 2

Views: 293

Answers (1)

Samraan Khaan
Samraan Khaan

Reputation: 480

It depends on which view your label is added.

Suppose your view is videoLayerView and it is added as subView to your View.

then, videoLayerView.layer.zPosition = 1;

Upvotes: 0

Related Questions