iphone - mpmovieplayercontroller view on uitableviewcell -
i want play video on uitableviewcell. click player view restart video. want click video player view open control menu , click uitableviewcell restart video.
- (void)configurecell:(uitableviewcell *)cell atindexpath:(nsindexpath *)indexpath{ if (self.videoplayer && [self.indexpath_k isequal:indexpath]) { cell.imageview.userinteractionenabled = yes; cell.imageview.image = [cell.imageview.image resim_skala:cgsizemake(150, 100)]; uiview *vieww = [[uiview alloc] initwithframe:cgrectmake(0, 0, 150, 100)]; self.videoplayer.view.frame = cgrectmake(0, 0, 150, 100); self.videoplayer.view.userinteractionenabled = yes; [vieww addsubview:self.videoplayer.view]; [cell.contentview addsubview:vieww]; }else{ } } - (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath{ self.videoplayer = [[mpmovieplayercontroller alloc] initwithcontenturl:url]; ..... [self.videoplayer play]; [self.tableview reloaddata]; }
screenshot:
actually, not video in above screenshot mentioned. it thumbnail image of video play button. whenever click cell, video open in new view.
{ .. totally wrong: video playing in tableview cell not supported apple default. }
otherwise have create custom view functionality.
thank you
Comments
Post a Comment