Skip to content

Commit

Permalink
Merge pull request #43 from Yalantis/bugfix/issue-41
Browse files Browse the repository at this point in the history
Bugfix/issue 41
  • Loading branch information
Sergey D authored Apr 4, 2018
2 parents ca98481 + 0ddf31d commit 3549c68
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
30 changes: 17 additions & 13 deletions Example/ContextMenu/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6250" systemVersion="14B25" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="buo-es-Y5h">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="buo-es-Y5h">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6244"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Samantha-->
Expand All @@ -14,17 +18,17 @@
<viewControllerLayoutGuide type="bottom" id="2fi-mo-0CV"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Photo" translatesAutoresizingMaskIntoConstraints="NO" id="ONV-Ho-D5n">
<imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" image="Photo" translatesAutoresizingMaskIntoConstraints="NO" id="ONV-Ho-D5n">
<rect key="frame" x="0.0" y="44" width="600" height="200"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="200" id="t6Z-2S-j8x"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="My Description" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3gN-r7-AnJ">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="My Description" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3gN-r7-AnJ">
<rect key="frame" x="10" y="269" width="600" height="31.5"/>
<constraints>
<constraint firstAttribute="height" constant="32" id="Q7w-eh-tzF"/>
Expand All @@ -33,16 +37,16 @@
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nZH-yZ-0mA">
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" misplaced="YES" editable="NO" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nZH-yZ-0mA">
<rect key="frame" x="10" y="312.5" width="580" height="277.5"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<string key="text">Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda.</string>
<color key="textColor" red="0.13333333333333333" green="0.13333333333333333" blue="0.13333333333333333" alpha="1" colorSpace="calibratedRGB"/>
<color key="textColor" red="0.13333333333333333" green="0.13333333333333333" blue="0.13333333333333333" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView>
</subviews>
<color key="backgroundColor" red="0.94901960784313721" green="0.94901960784313721" blue="0.94901960784313721" alpha="1" colorSpace="calibratedRGB"/>
<color key="backgroundColor" red="0.94901960784313721" green="0.94901960784313721" blue="0.94901960784313721" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="3gN-r7-AnJ" firstAttribute="top" secondItem="ONV-Ho-D5n" secondAttribute="bottom" constant="25" id="3sH-36-aHQ"/>
<constraint firstItem="ONV-Ho-D5n" firstAttribute="leading" secondItem="kh9-bI-dsS" secondAttribute="leading" id="727-Pi-1p1"/>
Expand Down Expand Up @@ -75,8 +79,8 @@
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="buo-es-Y5h" sceneMemberID="viewController">
<toolbarItems/>
<nil key="simulatedStatusBarMetrics"/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="lrR-Le-siU">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="lrR-Le-siU" customClass="YALNavigationBar">
<rect key="frame" x="0.0" y="20" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<nil name="viewControllers"/>
Expand Down
9 changes: 3 additions & 6 deletions Example/ContextMenu/ViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,11 @@ @implementation ViewController

- (void)viewDidLoad {
[super viewDidLoad];
[self initiateMenuOptions];

// set custom navigationBar with a bigger height
[self.navigationController setValue:[[YALNavigationBar alloc]init] forKeyPath:@"navigationBar"];
[self initiateMenuOptions];
}

- (BOOL)prefersStatusBarHidden
{
- (BOOL)prefersStatusBarHidden {
return YES;
}

Expand Down Expand Up @@ -143,4 +140,4 @@ - (UITableViewCell *)tableView:(YALContextMenuTableView *)tableView cellForRowAt
return cell;
}

@end
@end
1 change: 1 addition & 0 deletions YALContextMenu/YALContextMenuTableView.m
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ - (void)showInView:(UIView *)superview withEdgeInsets:(UIEdgeInsets)edgeInsets a
}

self.dismissalIndexpath = nil;
self.frame = superview.bounds;

[superview addSubViewiew:self withSidesConstrainsInsets:edgeInsets];

Expand Down

0 comments on commit 3549c68

Please sign in to comment.