Преглед на файлове

Introduce and deploy mini playback view interface protocol

Felix Paul Kühne преди 9 години
родител
ревизия
efecbf17cb
променени са 3 файла, в които са добавени 12 реда и са изтрити 5 реда
  1. 3 3
      Sources/VLCMiniPlaybackView.h
  2. 2 2
      Sources/VLCMiniPlaybackView.m
  3. 7 0
      Sources/VLCPlayerDisplayController.h

+ 3 - 3
Sources/VLCMiniPlaybackView.h

@@ -10,12 +10,12 @@
  * Refer to the COPYING file of the official project for license.
  *****************************************************************************/
 
+#import "VLCPlaybackController.h"
+#import "VLCPlayerDisplayController.h"
 #import "VLCFrostedGlasView.h"
 
 @class VLCPlaybackController;
-@interface VLCMiniPlaybackView : VLCFrostedGlasView
+@interface VLCMiniPlaybackView : VLCFrostedGlasView <VLCPlaybackControllerDelegate, VLCMiniPlaybackViewInterface>
 // just a state keeper for animation, has no other implementation
 @property (nonatomic) BOOL visible;
-
-- (void)setupForWork:(VLCPlaybackController *)playbackController;
 @end

+ 2 - 2
Sources/VLCMiniPlaybackView.m

@@ -17,7 +17,7 @@
 #import "VLCPlayerDisplayController.h"
 #import "VLCKeychainCoordinator.h"
 
-@interface VLCMiniPlaybackView () <VLCPlaybackControllerDelegate, UIGestureRecognizerDelegate>
+@interface VLCMiniPlaybackView () <UIGestureRecognizerDelegate>
 {
     UIImageView *_artworkView;
     UIView *_videoView;
@@ -188,7 +188,7 @@
     [_playPauseButton setImage:playPauseImage forState:UIControlStateNormal];
 }
 
-- (void)setupForWork:(VLCPlaybackController *)playbackController
+- (void)prepareForMediaPlayback:(VLCPlaybackController *)controller
 {
     self.playbackController = playbackController;
     [self updatePlayPauseButton];

+ 7 - 0
Sources/VLCPlayerDisplayController.h

@@ -17,6 +17,13 @@ typedef NS_ENUM(NSUInteger, VLCPlayerDisplayControllerDisplayMode) {
     VLCPlayerDisplayControllerDisplayModeMiniplayer,
 };
 
+@protocol VLCMiniPlaybackViewInterface <NSObject>
+
+@required;
+@property (nonatomic) BOOL visible;
+
+@end
+
 @interface VLCPlayerDisplayController : UIViewController
 @property (nonatomic, strong) UIViewController *childViewController;