Skip to content
Browse files

Added label on demo fullscreen view

  • Loading branch information...
1 parent 1fabe8e commit 072c006706cc3c895a53b39264b58c4571d4a220 @gmoledina committed
Showing with 22 additions and 1 deletion.
  1. +22 −1 GMGridView/ViewController.m
View
23 GMGridView/ViewController.m
@@ -201,7 +201,28 @@ - (UIView *)GMGridView:(GMGridView *)gridView fullSizeViewForView:(UIView *)view
fullView.backgroundColor = [UIColor yellowColor];
fullView.layer.masksToBounds = NO;
fullView.layer.cornerRadius = 8;
-
+
+ CGSize size = [self GMGridView:gridView fullSizeForView:view];
+ fullView.bounds = CGRectMake(0, 0, size.width, size.height);
+
+ UILabel *label = [[UILabel alloc] initWithFrame:fullView.bounds];
+ label.text = @"Fullscreen View";
+ label.textAlignment = UITextAlignmentCenter;
+ label.backgroundColor = [UIColor clearColor];
+ label.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
+
+ if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone)
+ {
+ label.font = [UIFont boldSystemFontOfSize:15];
+ }
+ else
+ {
+ label.font = [UIFont boldSystemFontOfSize:20];
+ }
+
+ [fullView addSubview:label];
+
+
return fullView;
}

0 comments on commit 072c006

Please sign in to comment.
Something went wrong with that request. Please try again.