热更新demo

embeddedVideo.m 1.2KB

    // // embeddedVideo.m // ThePaperBase // // Created by scar1900 on 16/1/20. // Copyright © 2016年 scar1900. All rights reserved. // #import "embeddedVideo.h" @interface embeddedVideo() @end @implementation embeddedVideo - (instancetype)init { self = [super init]; if (self) { } return self; } + (void)showEmbeddedVideoWithRect:(CGRect)rect withVideoController:(nonnull TPMovieContent*)movieContent { [movieContent showEmbeddedVideo]; [movieContent relayoutSubViewForScreen:rect fullScreen:NO]; [(TPWindow*)KEY_WINDOW enabelEmbeddedVideoGesture:YES withVideoController:movieContent embeddedRect:rect]; } + (void)removeEmbeddedVideo:(nonnull TPMovieContent*)movieContent { [movieContent dismissEmbeddedVideo]; [movieContent relayoutSubViewForScreen:movieContent.originRect fullScreen:NO]; [(TPWindow*)KEY_WINDOW enabelEmbeddedVideoGesture:NO withVideoController:nil embeddedRect:CGRectZero]; } /* // Only override drawRect: if you perform custom drawing. // An empty implementation adversely affects performance during animation. - (void)drawRect:(CGRect)rect { // Drawing code } */ @end