Skip to content

Commit f3d3607

Browse files
update DEMO with edgesForExtendedLayout
1 parent f01e6db commit f3d3607

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

demos/Demo/WYPopoverDemo/WYAllDirectionsViewController.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ - (void)viewDidLoad
3737
{
3838
[super viewDidLoad];
3939

40+
if ([self respondsToSelector:@selector(setEdgesForExtendedLayout:)])
41+
{
42+
self.edgesForExtendedLayout = UIRectEdgeNone;
43+
}
44+
4045
UIImage* normal = [[UIImage imageNamed:@"button-normal"] stretchableImageWithLeftCapWidth:16 topCapHeight:0];
4146
UIImage* highlighted = [[UIImage imageNamed:@"button-highlighted"] stretchableImageWithLeftCapWidth:16 topCapHeight:0];
4247

@@ -77,7 +82,7 @@ - (IBAction)showPopover:(id)sender
7782
settingsPopoverController.delegate = self;
7883
settingsPopoverController.passthroughViews = @[btn];
7984
settingsPopoverController.popoverLayoutMargins = UIEdgeInsetsMake(10, 10, 10, 10);
80-
settingsPopoverController.wantsDefaultContentAppearance = YES;
85+
settingsPopoverController.wantsDefaultContentAppearance = NO;
8186
[settingsPopoverController presentPopoverFromRect:btn.bounds inView:btn permittedArrowDirections:WYPopoverArrowDirectionAny animated:YES];
8287
}
8388
else

demos/Demo/WYPopoverDemo/WYAppDelegate.m

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,9 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
2525
[popoverAppearance setFillBottomColor:[UIColor colorWithWhite:0.75 alpha:1]];
2626
[popoverAppearance setOuterStrokeColor:[UIColor colorWithWhite:0.5 alpha:1]];
2727
[popoverAppearance setInnerStrokeColor:[UIColor colorWithWhite:0.5 alpha:1]];
28-
29-
/*
3028
[popoverAppearance setOuterCornerRadius:8];
3129
[popoverAppearance setMinOuterCornerRadius:8];
30+
3231
[popoverAppearance setOuterShadowBlurRadius:6];
3332
[popoverAppearance setOuterShadowColor:[UIColor colorWithWhite:0 alpha:0.65]];
3433
[popoverAppearance setOuterShadowOffset:CGSizeMake(0, 2)];
@@ -46,16 +45,13 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
4645
[popoverAppearance setInnerShadowOffset:CGSizeMake(0, 1)];
4746

4847
[popoverAppearance setViewContentInsets:UIEdgeInsetsMake(3, 0, 0, 0)];
49-
*/
5048

51-
/*
5249
UINavigationBar* navBarAppearance = [UINavigationBar appearanceWhenContainedIn:[WYPopoverBackgroundView class], [UINavigationController class], nil];
5350
[navBarAppearance setTitleTextAttributes:@{
5451
UITextAttributeTextColor : [UIColor darkGrayColor],
5552
UITextAttributeTextShadowColor: [UIColor whiteColor],
5653
UITextAttributeTextShadowOffset: [NSValue valueWithUIOffset:UIOffsetMake(0, -1)]
5754
}];
58-
*/
5955

6056
//Appearance 2 (orange popover)
6157
//
58.3 KB
Loading

0 commit comments

Comments
 (0)