Skip to content

Commit f5d0910

Browse files
update README
1 parent 2ba60fc commit f5d0910

7 files changed

Lines changed: 36 additions & 8 deletions

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ WYPopoverController is for the presentation of content in popover on iPhone / iP
77

88
---
99

10-
![](https://raw.github.com/nicolaschengdev/WYPopoverController/master/screenshots/wypopover_screenshots.png)
10+
![](https://raw.github.com/nicolaschengdev/WYPopoverController/master/screenshots/wypopover_portrait_2_screenshot.png)
1111

1212
### Features
1313

@@ -30,6 +30,7 @@ WYPopoverController is for the presentation of content in popover on iPhone / iP
3030
| arrowHeight | `CGFloat` | 18 |
3131
| borderWidth | `CGFloat` | 6 |
3232
| outerCornerRadius | `CGFloat` | 8 |
33+
| minOuterCornerRadius ![](https://raw.github.com/nicolaschengdev/WYPopoverController/master/screenshots/wypopover_new_ico.png) | `CGFloat` | 0 |
3334
| innerCornerRadius | `CGFloat` | 6 |
3435
| viewContentInsets | `UIEdgeInsets` | { 3, 0, 0, 0 } |
3536
| strokeColor | `UIColor` | #262c31ff ![](https://raw.github.com/nicolaschengdev/WYPopoverController/master/screenshots/wypopover_default_strokecolor.png) |

demos/Demo/WYPopoverDemo/WYAllDirectionsViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ - (IBAction)tapOnButton:(id)sender
5656

5757
WYSettingsViewController* settingsViewController = [[WYSettingsViewController alloc] init];
5858
settingsViewController.contentSizeForViewInPopover = CGSizeMake(280, 200);
59-
settingsViewController.title = @"PDF Settings";
59+
settingsViewController.title = @"Settings";
6060
[settingsViewController.navigationItem setRightBarButtonItem:[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(done:)]];
6161

6262
UINavigationController* contentViewController = [[UINavigationController alloc] initWithRootViewController:settingsViewController];

demos/Demo/WYPopoverDemo/WYAppDelegate.m

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,25 @@ @implementation WYAppDelegate
1616
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
1717
{
1818
//UIPopoverController
19-
19+
20+
WYPopoverBackgroundView* popoverAppearance = [WYPopoverBackgroundView appearance];
21+
[popoverAppearance setMinOuterCornerRadius:8];
22+
23+
UIBarButtonItem* itemAppearance = [UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], [WYPopoverBackgroundView class], nil];
24+
25+
[itemAppearance setTintColor:[UIColor colorWithRed:56.f/255.f green:64.f/255.f blue:84.f/255.f alpha:1.f]];
26+
27+
/*
28+
[navBarAppearance setTitleTextAttributes:@{
29+
UITextAttributeTextColor : [UIColor darkGrayColor],
30+
UITextAttributeTextShadowColor: [UIColor whiteColor],
31+
UITextAttributeTextShadowOffset: [NSValue valueWithUIOffset:UIOffsetMake(0, -1)]
32+
}];
33+
*/
34+
2035
//Appearance 1 (white popover)
2136
//
37+
/*
2238
WYPopoverBackgroundView* popoverAppearance = [WYPopoverBackgroundView appearance];
2339
[popoverAppearance setTintColor:[UIColor whiteColor]];
2440
@@ -45,6 +61,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
4561
UITextAttributeTextShadowColor: [UIColor whiteColor],
4662
UITextAttributeTextShadowOffset: [NSValue valueWithUIOffset:UIOffsetMake(0, -1)]
4763
}];
64+
*/
4865

4966
//Appearance 2 (orange popover)
5067
//

demos/Demo/WYPopoverDemo/WYSettingsViewController.m

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ - (void)viewDidLoad
2424
{
2525
[super viewDidLoad];
2626
//[self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"WYSettingsTableViewCell"];
27+
28+
[self.navigationItem.rightBarButtonItem setTintColor:[UIColor colorWithRed:195./255. green:4./255. blue:94./255. alpha:1.]];
2729
}
2830

2931
- (void)viewWillAppear:(BOOL)animated
@@ -55,7 +57,14 @@ - (void)didReceiveMemoryWarning
5557
#pragma mark - UITableViewDataSource
5658

5759
- (NSString *)tableView:(UITableView *)aTableView titleForHeaderInSection:(NSInteger)section {
58-
return @"Size of pictures";
60+
NSString* sectionTitle = @"";
61+
62+
if (section == 0)
63+
{
64+
sectionTitle = @"Size of pictures";
65+
}
66+
67+
return sectionTitle;
5968
}
6069

6170
- (NSInteger)numberOfSectionsInTableView:(UITableView *)aTableView {
@@ -148,7 +157,7 @@ - (void)updateCell:(UITableViewCell*)cell atIndexPath:(NSIndexPath*)indexPath
148157
}
149158
else
150159
{
151-
cell.textLabel.text = @"Push another view";
160+
cell.textLabel.text = @"Compression";
152161
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
153162
}
154163
}

demos/Demo/WYPopoverDemo/WYStoryboard.storyboard

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="2083"/>
55
</dependencies>
66
<scenes>
7-
<!--All Directions View Controller - All directions-->
7+
<!--All Directions View Controller - POPOVER-->
88
<scene sceneID="vQZ-Ib-4hA">
99
<objects>
1010
<viewController id="SH8-yS-R5W" customClass="WYAllDirectionsViewController" sceneMemberID="viewController">
@@ -148,9 +148,9 @@
148148
</connections>
149149
</button>
150150
</subviews>
151-
<color key="backgroundColor" white="0.93583039314516125" alpha="1" colorSpace="calibratedWhite"/>
151+
<color key="backgroundColor" red="0.94117647058823528" green="0.94117647058823528" blue="0.94117647058823528" alpha="1" colorSpace="calibratedRGB"/>
152152
</view>
153-
<navigationItem key="navigationItem" title="All directions" id="byn-bD-FGA"/>
153+
<navigationItem key="navigationItem" title="POPOVER" id="byn-bD-FGA"/>
154154
<connections>
155155
<outlet property="bottomButton" destination="7kv-r3-yie" id="VHk-eY-IW1"/>
156156
<outlet property="bottomLeftButton" destination="wkW-SC-eQF" id="6OT-Fp-o67"/>
@@ -175,6 +175,7 @@
175175
<navigationBar key="navigationBar" contentMode="scaleToFill" id="JsB-uJ-03V">
176176
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
177177
<autoresizingMask key="autoresizingMask"/>
178+
<color key="tintColor" red="0.160242959856987" green="0.18130968511104584" blue="0.24362963438034058" alpha="1" colorSpace="calibratedRGB"/>
178179
</navigationBar>
179180
<nil name="viewControllers"/>
180181
<connections>

screenshots/wypopover_new_ico.png

2.12 KB
Loading
57.9 KB
Loading

0 commit comments

Comments
 (0)