Permalink
Browse files

Fixed issue #1: bug with presenting popover from scrollviews

  • Loading branch information...
1 parent f340301 commit ff0767756f764808f3a048f08af9b8418774554c X082540 committed Jan 4, 2011
View
0 Classes/WEPopoverAppDelegate.h 100644 → 100755
No changes.
View
0 Classes/WEPopoverAppDelegate.m 100644 → 100755
No changes.
View
0 Classes/WEPopoverContainerView.h 100644 → 100755
No changes.
View
0 Classes/WEPopoverContainerView.m 100644 → 100755
No changes.
View
No changes.
View
No changes.
View
0 Classes/WEPopoverController.h 100644 → 100755
No changes.
View
3 Classes/WEPopoverController.m 100644 → 100755
@@ -160,6 +160,9 @@ - (CGRect)displayAreaForView:(UIView *)theView {
CGRect displayArea = CGRectZero;
if ([theView conformsToProtocol:@protocol(WEPopoverParentView)] && [theView respondsToSelector:@selector(displayAreaForPopover)]) {
displayArea = [(id <WEPopoverParentView>)theView displayAreaForPopover];
+ } else if ([theView isKindOfClass:[UIScrollView class]]) {
+ CGPoint contentOffset = [(UIScrollView *)theView contentOffset];
+ displayArea = CGRectMake(contentOffset.x, contentOffset.y, theView.frame.size.width, theView.frame.size.height);
} else {
displayArea = CGRectMake(0, 0, theView.frame.size.width, theView.frame.size.height);
}
View
0 Classes/WEPopoverParentView.h 100644 → 100755
No changes.
View
0 Classes/WEPopoverViewController.h 100644 → 100755
No changes.
View
0 Classes/WEPopoverViewController.m 100644 → 100755
No changes.
View
41 MainWindow.xib 100644 → 100755
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
<data>
- <int key="IBDocument.SystemTarget">1024</int>
- <string key="IBDocument.SystemVersion">10F569</string>
- <string key="IBDocument.InterfaceBuilderVersion">804</string>
- <string key="IBDocument.AppKitVersion">1038.29</string>
+ <int key="IBDocument.SystemTarget">1056</int>
+ <string key="IBDocument.SystemVersion">10H574</string>
+ <string key="IBDocument.InterfaceBuilderVersion">823</string>
+ <string key="IBDocument.AppKitVersion">1038.35</string>
<string key="IBDocument.HIToolboxVersion">461.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="NS.object.0">123</string>
+ <string key="NS.object.0">132</string>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -41,7 +41,7 @@
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUIViewController" id="943309135">
- <string key="IBUINibName">WEPopoverViewController</string>
+ <bool key="IBUIAutoresizesArchivedViewToFullSize">NO</bool>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
<int key="interfaceOrientation">1</int>
@@ -148,7 +148,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<string>UIApplication</string>
<string>UIResponder</string>
- <string>WEPopoverViewController</string>
+ <string>WEPopoverTableViewController</string>
<string>{{234, 376}, {320, 480}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>{{525, 346}, {320, 480}}</string>
@@ -227,6 +227,14 @@
</object>
</object>
<object class="IBPartialClassDescription">
+ <string key="className">WEPopoverTableViewController</string>
+ <string key="superclassName">UITableViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Classes/WEPopoverTableViewController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
<string key="className">WEPopoverViewController</string>
<string key="superclassName">UIViewController</string>
<object class="NSMutableDictionary" key="actions">
@@ -385,6 +393,21 @@
</object>
</object>
<object class="IBPartialClassDescription">
+ <string key="className">UITableViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UITableViewController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIPrintFormatter.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
<string key="className">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
@@ -449,7 +472,7 @@
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
- <integer value="1024" key="NS.object.0"/>
+ <integer value="1056" key="NS.object.0"/>
</object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
@@ -458,6 +481,6 @@
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<string key="IBDocument.LastKnownRelativeProjectPath">WEPopover.xcodeproj</string>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
- <string key="IBCocoaTouchPluginVersion">123</string>
+ <string key="IBCocoaTouchPluginVersion">132</string>
</data>
</archive>
View
0 README 100644 → 100755
No changes.
View
0 WEPopover-Info.plist 100644 → 100755
No changes.
@@ -15,6 +15,7 @@
2899E5220DE3E06400AC0155 /* WEPopoverViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2899E5210DE3E06400AC0155 /* WEPopoverViewController.xib */; };
28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; };
28D7ACF80DDB3853001CB0EB /* WEPopoverViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /* WEPopoverViewController.m */; };
+ 7496C86112D363AC00F93229 /* WEPopoverTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7496C86012D363AC00F93229 /* WEPopoverTableViewController.m */; };
749FAE791286125600AB97F9 /* popoverArrowDown.png in Resources */ = {isa = PBXBuildFile; fileRef = 749FAE731286125600AB97F9 /* popoverArrowDown.png */; };
749FAE7A1286125600AB97F9 /* popoverArrowLeft.png in Resources */ = {isa = PBXBuildFile; fileRef = 749FAE741286125600AB97F9 /* popoverArrowLeft.png */; };
749FAE7B1286125600AB97F9 /* popoverArrowRight.png in Resources */ = {isa = PBXBuildFile; fileRef = 749FAE751286125600AB97F9 /* popoverArrowRight.png */; };
@@ -39,6 +40,8 @@
28D7ACF70DDB3853001CB0EB /* WEPopoverViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WEPopoverViewController.m; sourceTree = "<group>"; };
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
32CA4F630368D1EE00C91783 /* WEPopover_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WEPopover_Prefix.pch; sourceTree = "<group>"; };
+ 7496C85F12D363AC00F93229 /* WEPopoverTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WEPopoverTableViewController.h; sourceTree = "<group>"; };
+ 7496C86012D363AC00F93229 /* WEPopoverTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WEPopoverTableViewController.m; sourceTree = "<group>"; };
749FAE731286125600AB97F9 /* popoverArrowDown.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = popoverArrowDown.png; sourceTree = "<group>"; };
749FAE741286125600AB97F9 /* popoverArrowLeft.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = popoverArrowLeft.png; sourceTree = "<group>"; };
749FAE751286125600AB97F9 /* popoverArrowRight.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = popoverArrowRight.png; sourceTree = "<group>"; };
@@ -79,6 +82,8 @@
749FAE821286130000AB97F9 /* WEPopoverContentViewController.m */,
28D7ACF60DDB3853001CB0EB /* WEPopoverViewController.h */,
28D7ACF70DDB3853001CB0EB /* WEPopoverViewController.m */,
+ 7496C85F12D363AC00F93229 /* WEPopoverTableViewController.h */,
+ 7496C86012D363AC00F93229 /* WEPopoverTableViewController.m */,
);
path = Classes;
sourceTree = "<group>";
@@ -234,6 +239,7 @@
749FAE861286130000AB97F9 /* WEPopoverContainerView.m in Sources */,
749FAE871286130000AB97F9 /* WEPopoverContentViewController.m in Sources */,
749FAE881286130000AB97F9 /* WEPopoverController.m in Sources */,
+ 7496C86112D363AC00F93229 /* WEPopoverTableViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -276,7 +282,8 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
- SDKROOT = iphoneos4.1;
+ "PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
+ SDKROOT = iphoneos;
};
name = Debug;
};
@@ -290,7 +297,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
PREBINDING = NO;
- SDKROOT = iphoneos4.1;
+ SDKROOT = iphoneos;
};
name = Release;
};
View
0 WEPopoverViewController.xib 100644 → 100755
No changes.
View
0 WEPopover_Prefix.pch 100644 → 100755
No changes.
View
0 main.m 100644 → 100755
No changes.
View
0 popoverArrowDown.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0 popoverArrowLeft.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0 popoverArrowRight.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0 popoverArrowUp.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0 popoverBg.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0 popoverBgSmall.png 100644 → 100755
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 ff07677

Please sign in to comment.