Skip to content

Commit

Permalink
update DEMO with edgesForExtendedLayout
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaschengdev committed Oct 2, 2013
1 parent f01e6db commit f3d3607
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
7 changes: 6 additions & 1 deletion demos/Demo/WYPopoverDemo/WYAllDirectionsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ - (void)viewDidLoad
{
[super viewDidLoad];

if ([self respondsToSelector:@selector(setEdgesForExtendedLayout:)])
{
self.edgesForExtendedLayout = UIRectEdgeNone;
}

UIImage* normal = [[UIImage imageNamed:@"button-normal"] stretchableImageWithLeftCapWidth:16 topCapHeight:0];
UIImage* highlighted = [[UIImage imageNamed:@"button-highlighted"] stretchableImageWithLeftCapWidth:16 topCapHeight:0];

Expand Down Expand Up @@ -77,7 +82,7 @@ - (IBAction)showPopover:(id)sender
settingsPopoverController.delegate = self;
settingsPopoverController.passthroughViews = @[btn];
settingsPopoverController.popoverLayoutMargins = UIEdgeInsetsMake(10, 10, 10, 10);
settingsPopoverController.wantsDefaultContentAppearance = YES;
settingsPopoverController.wantsDefaultContentAppearance = NO;
[settingsPopoverController presentPopoverFromRect:btn.bounds inView:btn permittedArrowDirections:WYPopoverArrowDirectionAny animated:YES];
}
else
Expand Down
6 changes: 1 addition & 5 deletions demos/Demo/WYPopoverDemo/WYAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
[popoverAppearance setFillBottomColor:[UIColor colorWithWhite:0.75 alpha:1]];
[popoverAppearance setOuterStrokeColor:[UIColor colorWithWhite:0.5 alpha:1]];
[popoverAppearance setInnerStrokeColor:[UIColor colorWithWhite:0.5 alpha:1]];

/*
[popoverAppearance setOuterCornerRadius:8];
[popoverAppearance setMinOuterCornerRadius:8];

[popoverAppearance setOuterShadowBlurRadius:6];
[popoverAppearance setOuterShadowColor:[UIColor colorWithWhite:0 alpha:0.65]];
[popoverAppearance setOuterShadowOffset:CGSizeMake(0, 2)];
Expand All @@ -46,16 +45,13 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
[popoverAppearance setInnerShadowOffset:CGSizeMake(0, 1)];

[popoverAppearance setViewContentInsets:UIEdgeInsetsMake(3, 0, 0, 0)];
*/

/*
UINavigationBar* navBarAppearance = [UINavigationBar appearanceWhenContainedIn:[WYPopoverBackgroundView class], [UINavigationController class], nil];
[navBarAppearance setTitleTextAttributes:@{
UITextAttributeTextColor : [UIColor darkGrayColor],
UITextAttributeTextShadowColor: [UIColor whiteColor],
UITextAttributeTextShadowOffset: [NSValue valueWithUIOffset:UIOffsetMake(0, -1)]
}];
*/

//Appearance 2 (orange popover)
//
Expand Down
Binary file added screenshots/screenshot_compare_ios6-7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f3d3607

Please sign in to comment.