Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions MaryPopin/UIViewController+MaryPopin.m
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ - (void)presentPopinController:(UIViewController *)popinController fromRect:(CGR
[self addPopinToHierarchy:popinController];
CGRect popinFrame = [self computePopinFrame:popinController inRect:rect];
[popinController.view setFrame:popinFrame];
[popinController didMoveToParentViewController:self];
[self forwardAppearanceEndingIfNeeded:popinController];

if ([popinController popinTransitionUsesDynamics] ) {
[self snapInAnimationForPopinController:popinController toPosition:popinFrame withDirection:popinController.popinTransitionDirection completion:completion];
Expand All @@ -181,8 +183,6 @@ - (void)presentPopinController:(UIViewController *)popinController fromRect:(CGR
options:UIViewAnimationOptionCurveEaseInOut
animations:[self inAnimationForPopinController:popinController toPosition:popinFrame]
completion:^(BOOL finished) {
[popinController didMoveToParentViewController:self];
[self forwardAppearanceEndingIfNeeded:popinController];
if (completion) {
completion();
}
Expand All @@ -193,8 +193,6 @@ - (void)presentPopinController:(UIViewController *)popinController fromRect:(CGR
[UIView animateWithDuration:[UIViewController animationDurationForTransitionStyle:popinController.popinTransitionStyle]
animations:[self inAnimationForPopinController:popinController toPosition:popinFrame]
completion:^(BOOL finished) {
[popinController didMoveToParentViewController:self];
[self forwardAppearanceEndingIfNeeded:popinController];
if (completion) {
completion();
}
Expand Down
2 changes: 2 additions & 0 deletions MaryPopinDemo/MaryPopinDemo/MaryPopinDemo-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>Main_iPhone</string>
<key>UIMainStoryboardFile</key>
<string>Main_iPhone</string>
<key>UIMainStoryboardFile~ipad</key>
Expand Down
10 changes: 5 additions & 5 deletions MaryPopinDemo/MaryPopinDemo/en.lproj/Main_iPhone.storyboard
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="5053" systemVersion="13C64" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="oFh-gd-Fba">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6245" systemVersion="13E28" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="oFh-gd-Fba">
<dependencies>
<deployment defaultVersion="1280" identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6238"/>
</dependencies>
<scenes>
<!--View Controller - MaryPopin Demo-->
<!--MaryPopin Demo-->
<scene sceneID="SPa-bY-xbg">
<objects>
<tableViewController title="MaryPopin Demo" id="0rz-QM-WR2" customClass="BKTViewController" sceneMemberID="viewController">
Expand Down Expand Up @@ -176,7 +176,7 @@
<subviews>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" id="hn0-lO-HcK">
<rect key="frame" x="251" y="6" width="51" height="31"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
<inset key="insetFor6xAndEarlier" minX="30" minY="0.0" maxX="-30" maxY="0.0"/>
<connections>
<action selector="isDismissableValueChanged:" destination="L8y-BV-3Wo" eventType="valueChanged" id="w4M-PI-xcb"/>
Expand Down Expand Up @@ -204,7 +204,7 @@
<subviews>
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" id="eIz-OZ-iav">
<rect key="frame" x="20" y="38" width="280" height="29"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<segments>
<segment title="Center"/>
<segment title="Up"/>
Expand Down