Skip to content

Commit

Permalink
Fixed issue werner77#1: bug with presenting popover from scrollviews
Browse files Browse the repository at this point in the history
  • Loading branch information
X082540 authored and X082540 committed Jan 4, 2011
1 parent f340301 commit ff07677
Show file tree
Hide file tree
Showing 24 changed files with 44 additions and 11 deletions.
Empty file modified Classes/WEPopoverAppDelegate.h
100644 → 100755
Empty file.
Empty file modified Classes/WEPopoverAppDelegate.m
100644 → 100755
Empty file.
Empty file modified Classes/WEPopoverContainerView.h
100644 → 100755
Empty file.
Empty file modified Classes/WEPopoverContainerView.m
100644 → 100755
Empty file.
Empty file modified Classes/WEPopoverContentViewController.h
100644 → 100755
Empty file.
Empty file modified Classes/WEPopoverContentViewController.m
100644 → 100755
Empty file.
Empty file modified Classes/WEPopoverController.h
100644 → 100755
Empty file.
3 changes: 3 additions & 0 deletions Classes/WEPopoverController.m
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Empty file modified Classes/WEPopoverParentView.h
100644 → 100755
Empty file.
Empty file modified Classes/WEPopoverViewController.h
100644 → 100755
Empty file.
Empty file modified Classes/WEPopoverViewController.m
100644 → 100755
Empty file.
41 changes: 32 additions & 9 deletions MainWindow.xib
100644 → 100755
Original file line number Diff line number Diff line change
@@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -226,6 +226,14 @@
<string key="minorKey">Classes/WEPopoverAppDelegate.h</string>
</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>
Expand Down Expand Up @@ -384,6 +392,21 @@
<string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
</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">
Expand Down Expand Up @@ -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>
Expand All @@ -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>
Empty file modified README
100644 → 100755
Empty file.
Empty file modified WEPopover-Info.plist
100644 → 100755
Empty file.
11 changes: 9 additions & 2 deletions WEPopover.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */; };
Expand All @@ -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>"; };
Expand Down Expand Up @@ -79,6 +82,8 @@
749FAE821286130000AB97F9 /* WEPopoverContentViewController.m */,
28D7ACF60DDB3853001CB0EB /* WEPopoverViewController.h */,
28D7ACF70DDB3853001CB0EB /* WEPopoverViewController.m */,
7496C85F12D363AC00F93229 /* WEPopoverTableViewController.h */,
7496C86012D363AC00F93229 /* WEPopoverTableViewController.m */,
);
path = Classes;
sourceTree = "<group>";
Expand Down Expand Up @@ -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;
};
Expand Down Expand Up @@ -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;
};
Expand All @@ -290,7 +297,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
PREBINDING = NO;
SDKROOT = iphoneos4.1;
SDKROOT = iphoneos;
};
name = Release;
};
Expand Down
Empty file modified WEPopoverViewController.xib
100644 → 100755
Empty file.
Empty file modified WEPopover_Prefix.pch
100644 → 100755
Empty file.
Empty file modified main.m
100644 → 100755
Empty file.
Empty file modified popoverArrowDown.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified popoverArrowLeft.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified popoverArrowRight.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified popoverArrowUp.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified popoverBg.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified popoverBgSmall.png
100644 → 100755
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 ff07677

Please sign in to comment.