Commit a7f285d7 authored by Felix Paul Kühne's avatar Felix Paul Kühne
Browse files

frosted glass: allow initialization from code instead of xib file

parent 5c75d452
......@@ -2,7 +2,7 @@
* VLCFrostedGlasView.m
* VLC for iOS
*****************************************************************************
* Copyright (c) 2013 VideoLAN. All rights reserved.
* Copyright (c) 2013-2014 VideoLAN. All rights reserved.
* $Id$
*
* Authors: Carola Nitz <nitz.carola # googlemail.com>
......@@ -21,11 +21,27 @@
@implementation VLCFrostedGlasView
- (id)initWithCoder:(NSCoder *)aDecoder
{
self = [super initWithCoder:aDecoder];
if (self) {
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 (SYSTEM_RUNS_IOS7_OR_LATER) {
if (![self toolbar]) {
......@@ -39,8 +55,6 @@
[self insertSubview:self.imageview atIndex:0];
}
}
}
return self;
}
- (void)layoutSubviews {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment