1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- /*****************************************************************************
- * VLCFrostedGlasView.m
- * VLC for iOS
- *****************************************************************************
- * Copyright (c) 2013-2014 VideoLAN. All rights reserved.
- * $Id$
- *
- * Authors: Carola Nitz <nitz.carola # googlemail.com>
- *
- * Refer to the COPYING file of the official project for license.
- *****************************************************************************/
- #import "VLCFrostedGlasView.h"
- @interface VLCFrostedGlasView ()
- @property (nonatomic) UIToolbar *toolbar;
- @property (nonatomic) UIImageView *imageview;
- @end
- @implementation VLCFrostedGlasView
- - (id)initWithCoder:(NSCoder *)aDecoder
- {
- self = [super initWithCoder:aDecoder];
- if (self)
- [self setupView];
- return self;
- }
- - (instancetype)initWithFrame:(CGRect)frame
- {
- self = [super initWithFrame:frame];
- if (self)
- [self setupView];
- return self;
- }
- - (void)setupView
- {
- [self setClipsToBounds:YES];
- if (![self toolbar]) {
- [self setToolbar:[[UIToolbar alloc] initWithFrame:[self bounds]]];
- [self.layer insertSublayer:[self.toolbar layer] atIndex:0];
- [self.toolbar setBarStyle:UIBarStyleBlack];
- }
- }
- - (void)layoutSubviews {
- [super layoutSubviews];
- [self.toolbar setFrame:[self bounds]];
- }
- @end
|