Skip to content

Commit a227bdd

Browse files
added strokeColor as DEPRECATED
1 parent aa44bd9 commit a227bdd

5 files changed

Lines changed: 53 additions & 194 deletions

File tree

WYPopoverController/WYPopoverController.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ typedef NS_OPTIONS(NSUInteger, WYPopoverArrowDirection) {
5353

5454
@property (nonatomic, strong) UIColor *tintColor UI_APPEARANCE_SELECTOR;
5555

56-
@property (nonatomic, strong) UIColor *strokeColor UI_APPEARANCE_SELECTOR;
56+
@property (nonatomic, strong) UIColor *strokeColor UI_APPEARANCE_SELECTOR DEPRECATED_MSG_ATTRIBUTE("BECAREFULL");
57+
5758
@property (nonatomic, strong) UIColor *fillTopColor UI_APPEARANCE_SELECTOR;
5859
@property (nonatomic, strong) UIColor *fillBottomColor UI_APPEARANCE_SELECTOR;
5960

WYPopoverController/WYPopoverController.m

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1269,7 +1269,9 @@ - (UIView *)rootView
12691269

12701270
if (result.subviews.count > 0)
12711271
{
1272-
result = [result.subviews objectAtIndex:0];
1272+
result = [result.subviews lastObject];
1273+
1274+
NSLog(@"rootView.frame = %@", NSStringFromCGRect(result.frame));
12731275
}
12741276

12751277
return result;
@@ -1292,12 +1294,14 @@ - (CGRect)rootViewFrame
12921294
statusBarHeight = statusBarFrame.size.width;
12931295
}
12941296

1295-
result.size.height -= statusBarHeight;
1297+
//result.size.height -= statusBarHeight;
12961298

1299+
/*
12971300
if (statusBarHeight > 0)
12981301
{
12991302
result.origin.y = statusBarHeight;
13001303
}
1304+
*/
13011305

13021306
return result;
13031307
}

demos/DemoSegue/WYPopoverDemoSegue/WYPlayersViewController.m

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,17 +127,17 @@ - (IBAction)showTest:(id)sender
127127
contentViewController.contentSizeForViewInPopover = CGSizeMake(240, 200);
128128
contentViewController.title = @"Test";
129129

130-
UINavigationController* navigationController = [[UINavigationController alloc] initWithRootViewController:contentViewController];
130+
//UINavigationController* navigationController = [[UINavigationController alloc] initWithRootViewController:contentViewController];
131131

132+
/*
132133
testPopoverController = [[WYPopoverController alloc] initWithContentViewController:navigationController];
133134
testPopoverController.delegate = self;
134135
135136
[testPopoverController presentPopoverFromBarButtonItem:sender permittedArrowDirections:WYPopoverArrowDirectionAny animated:YES];
136-
137-
/*
138-
standardPopoverController = [[UIPopoverController alloc] initWithContentViewController:navigationController];
139-
[standardPopoverController presentPopoverFromBarButtonItem:sender permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
140137
*/
138+
139+
standardPopoverController = [[UIPopoverController alloc] initWithContentViewController:contentViewController];
140+
[standardPopoverController presentPopoverFromBarButtonItem:sender permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
141141
}
142142

143143
#pragma mark - WYPlayerDetailsViewControllerDelegate
Lines changed: 31 additions & 177 deletions
Original file line numberDiff line numberDiff line change
@@ -1,177 +1,31 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
3-
<data>
4-
<int key="IBDocument.SystemTarget">1552</int>
5-
<string key="IBDocument.SystemVersion">12C2037</string>
6-
<string key="IBDocument.InterfaceBuilderVersion">3084</string>
7-
<string key="IBDocument.AppKitVersion">1187.34</string>
8-
<string key="IBDocument.HIToolboxVersion">625.00</string>
9-
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
10-
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
11-
<string key="NS.object.0">2083</string>
12-
</object>
13-
<array key="IBDocument.IntegratedClassDependencies">
14-
<string>IBProxyObject</string>
15-
<string>IBUILabel</string>
16-
<string>IBUIView</string>
17-
</array>
18-
<array key="IBDocument.PluginDependencies">
19-
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
20-
</array>
21-
<object class="NSMutableDictionary" key="IBDocument.Metadata">
22-
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
23-
<integer value="1" key="NS.object.0"/>
24-
</object>
25-
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
26-
<object class="IBProxyObject" id="372490531">
27-
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
28-
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
29-
</object>
30-
<object class="IBProxyObject" id="975951072">
31-
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
32-
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
33-
</object>
34-
<object class="IBUIView" id="191373211">
35-
<reference key="NSNextResponder"/>
36-
<int key="NSvFlags">274</int>
37-
<array class="NSMutableArray" key="NSSubviews">
38-
<object class="IBUILabel" id="891458093">
39-
<reference key="NSNextResponder" ref="191373211"/>
40-
<int key="NSvFlags">303</int>
41-
<string key="NSFrame">{{20, 256}, {280, 36}}</string>
42-
<reference key="NSSuperview" ref="191373211"/>
43-
<reference key="NSWindow"/>
44-
<string key="NSReuseIdentifierKey">_NS:9</string>
45-
<bool key="IBUIOpaque">NO</bool>
46-
<bool key="IBUIClipsSubviews">YES</bool>
47-
<int key="IBUIContentMode">7</int>
48-
<bool key="IBUIUserInteractionEnabled">NO</bool>
49-
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
50-
<string key="IBUIText">WYTestViewContoller</string>
51-
<object class="NSColor" key="IBUITextColor">
52-
<int key="NSColorSpace">1</int>
53-
<bytes key="NSRGB">MCAwIDAAA</bytes>
54-
<string key="IBUIColorCocoaTouchKeyPath">darkTextColor</string>
55-
</object>
56-
<nil key="IBUIHighlightedColor"/>
57-
<int key="IBUIBaselineAdjustment">0</int>
58-
<float key="IBUIMinimumFontSize">8</float>
59-
<int key="IBUITextAlignment">1</int>
60-
<object class="IBUIFontDescription" key="IBUIFontDescription">
61-
<int key="type">1</int>
62-
<double key="pointSize">16</double>
63-
</object>
64-
<object class="NSFont" key="IBUIFont">
65-
<string key="NSName">Helvetica</string>
66-
<double key="NSSize">16</double>
67-
<int key="NSfFlags">16</int>
68-
</object>
69-
</object>
70-
</array>
71-
<string key="NSFrame">{{0, 20}, {320, 548}}</string>
72-
<reference key="NSSuperview"/>
73-
<reference key="NSWindow"/>
74-
<reference key="NSNextKeyView" ref="891458093"/>
75-
<object class="NSColor" key="IBUIBackgroundColor">
76-
<int key="NSColorSpace">3</int>
77-
<bytes key="NSWhite">MC45MzU4MzAzOTMxAA</bytes>
78-
</object>
79-
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
80-
<object class="IBUIScreenMetrics" key="IBUISimulatedDestinationMetrics">
81-
<string key="IBUISimulatedSizeMetricsClass">IBUIScreenMetrics</string>
82-
<object class="NSMutableDictionary" key="IBUINormalizedOrientationToSizeMap">
83-
<bool key="EncodedWithXMLCoder">YES</bool>
84-
<array key="dict.sortedKeys">
85-
<integer value="1"/>
86-
<integer value="3"/>
87-
</array>
88-
<array key="dict.values">
89-
<string>{320, 568}</string>
90-
<string>{568, 320}</string>
91-
</array>
92-
</object>
93-
<string key="IBUITargetRuntime">IBCocoaTouchFramework</string>
94-
<string key="IBUIDisplayName">Retina 4 Full Screen</string>
95-
<int key="IBUIType">2</int>
96-
</object>
97-
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
98-
</object>
99-
</array>
100-
<object class="IBObjectContainer" key="IBDocument.Objects">
101-
<array class="NSMutableArray" key="connectionRecords">
102-
<object class="IBConnectionRecord">
103-
<object class="IBCocoaTouchOutletConnection" key="connection">
104-
<string key="label">view</string>
105-
<reference key="source" ref="372490531"/>
106-
<reference key="destination" ref="191373211"/>
107-
</object>
108-
<int key="connectionID">3</int>
109-
</object>
110-
</array>
111-
<object class="IBMutableOrderedSet" key="objectRecords">
112-
<array key="orderedObjects">
113-
<object class="IBObjectRecord">
114-
<int key="objectID">0</int>
115-
<array key="object" id="0"/>
116-
<reference key="children" ref="1000"/>
117-
<nil key="parent"/>
118-
</object>
119-
<object class="IBObjectRecord">
120-
<int key="objectID">1</int>
121-
<reference key="object" ref="191373211"/>
122-
<array class="NSMutableArray" key="children">
123-
<reference ref="891458093"/>
124-
</array>
125-
<reference key="parent" ref="0"/>
126-
</object>
127-
<object class="IBObjectRecord">
128-
<int key="objectID">-1</int>
129-
<reference key="object" ref="372490531"/>
130-
<reference key="parent" ref="0"/>
131-
<string key="objectName">File's Owner</string>
132-
</object>
133-
<object class="IBObjectRecord">
134-
<int key="objectID">-2</int>
135-
<reference key="object" ref="975951072"/>
136-
<reference key="parent" ref="0"/>
137-
</object>
138-
<object class="IBObjectRecord">
139-
<int key="objectID">4</int>
140-
<reference key="object" ref="891458093"/>
141-
<reference key="parent" ref="191373211"/>
142-
</object>
143-
</array>
144-
</object>
145-
<dictionary class="NSMutableDictionary" key="flattenedProperties">
146-
<string key="-1.CustomClassName">WYTestViewController</string>
147-
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
148-
<string key="-2.CustomClassName">UIResponder</string>
149-
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
150-
<string key="1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
151-
<string key="4.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
152-
</dictionary>
153-
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
154-
<nil key="activeLocalization"/>
155-
<dictionary class="NSMutableDictionary" key="localizations"/>
156-
<nil key="sourceID"/>
157-
<int key="maxID">4</int>
158-
</object>
159-
<object class="IBClassDescriber" key="IBDocument.Classes">
160-
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
161-
<object class="IBPartialClassDescription">
162-
<string key="className">WYTestViewController</string>
163-
<string key="superclassName">UIViewController</string>
164-
<object class="IBClassDescriptionSource" key="sourceIdentifier">
165-
<string key="majorKey">IBProjectSource</string>
166-
<string key="minorKey">./Classes/WYTestViewController.h</string>
167-
</object>
168-
</object>
169-
</array>
170-
</object>
171-
<int key="IBDocument.localizationMode">0</int>
172-
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
173-
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
174-
<int key="IBDocument.defaultPropertyAccessControl">3</int>
175-
<string key="IBCocoaTouchPluginVersion">2083</string>
176-
</data>
177-
</archive>
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="4510" systemVersion="12F37" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
3+
<dependencies>
4+
<deployment defaultVersion="1280" identifier="iOS"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3742"/>
6+
</dependencies>
7+
<objects>
8+
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="WYTestViewController">
9+
<connections>
10+
<outlet property="view" destination="1" id="3"/>
11+
</connections>
12+
</placeholder>
13+
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
14+
<view contentMode="scaleToFill" id="1">
15+
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
16+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
17+
<subviews>
18+
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="WYTestViewContoller" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="8" id="4">
19+
<rect key="frame" x="20" y="266" width="280" height="36"/>
20+
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
21+
<fontDescription key="fontDescription" type="system" pointSize="16"/>
22+
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
23+
<nil key="highlightedColor"/>
24+
</label>
25+
</subviews>
26+
<color key="backgroundColor" red="0.90980392160000001" green="0.58039215690000001" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
27+
<simulatedStatusBarMetrics key="simulatedStatusBarMetrics"/>
28+
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina4"/>
29+
</view>
30+
</objects>
31+
</document>

demos/DemoSegue/WYPopoverDemoSegue/en.lproj/MainStoryboard.storyboard

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
2121
<autoresizingMask key="autoresizingMask"/>
2222
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="cb1-Qg-z15" id="vHp-ea-8b7">
23-
<rect key="frame" x="0.0" y="0.0" width="300" height="43"/>
23+
<rect key="frame" x="0.0" y="0.0" width="287" height="43"/>
2424
<autoresizingMask key="autoresizingMask"/>
2525
<subviews>
2626
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="My stadium" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="PIj-mm-nfO">
27-
<rect key="frame" x="10" y="0.0" width="280" height="43"/>
27+
<rect key="frame" x="15" y="0.0" width="270" height="43"/>
2828
<autoresizingMask key="autoresizingMask"/>
2929
<fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
3030
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
@@ -82,7 +82,7 @@
8282
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
8383
<subviews>
8484
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="IkW-kR-gBw">
85-
<rect key="frame" x="20" y="20" width="84" height="44"/>
85+
<rect key="frame" x="118" y="340" width="84" height="44"/>
8686
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
8787
<state key="normal" title="popover">
8888
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
@@ -233,10 +233,10 @@
233233
<tableViewSection headerTitle="Player Name" id="3y9-e3-Snr">
234234
<cells>
235235
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="pxy-n0-INc">
236-
<rect key="frame" x="0.0" y="46" width="320" height="45"/>
236+
<rect key="frame" x="0.0" y="119" width="320" height="44"/>
237237
<autoresizingMask key="autoresizingMask"/>
238238
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="pxy-n0-INc" id="VqN-8R-BPG">
239-
<rect key="frame" x="10" y="1" width="300" height="43"/>
239+
<rect key="frame" x="0.0" y="0.0" width="320" height="43"/>
240240
<autoresizingMask key="autoresizingMask"/>
241241
<subviews>
242242
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" adjustsFontSizeToFit="NO" minimumFontSize="17" id="iKk-41-odt">
@@ -253,21 +253,21 @@
253253
<tableViewSection id="1vS-V4-Aco">
254254
<cells>
255255
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" textLabel="qj5-KN-aS5" detailTextLabel="9Ul-Fx-dRa" style="IBUITableViewCellStyleValue1" id="fOs-yB-G7h">
256-
<rect key="frame" x="0.0" y="111" width="320" height="45"/>
256+
<rect key="frame" x="0.0" y="183" width="320" height="44"/>
257257
<autoresizingMask key="autoresizingMask"/>
258258
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="fOs-yB-G7h" id="IXH-e1-fRj">
259-
<rect key="frame" x="10" y="1" width="280" height="43"/>
259+
<rect key="frame" x="0.0" y="0.0" width="287" height="43"/>
260260
<autoresizingMask key="autoresizingMask"/>
261261
<subviews>
262262
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Game" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="qj5-KN-aS5">
263-
<rect key="frame" x="10" y="11" width="48" height="21"/>
263+
<rect key="frame" x="15" y="11" width="47" height="21"/>
264264
<autoresizingMask key="autoresizingMask"/>
265265
<fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
266266
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
267267
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
268268
</label>
269269
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Detail" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="9Ul-Fx-dRa">
270-
<rect key="frame" x="226" y="11" width="44" height="21"/>
270+
<rect key="frame" x="241" y="11" width="44" height="21"/>
271271
<autoresizingMask key="autoresizingMask"/>
272272
<fontDescription key="fontDescription" type="system" pointSize="17"/>
273273
<color key="textColor" red="0.2196078431372549" green="0.32941176470588235" blue="0.52941176470588236" alpha="1" colorSpace="calibratedRGB"/>

0 commit comments

Comments
 (0)