Skip to content

Commit 543139f

Browse files
author
Joey Lorich
committed
Merge in updates
2 parents 7441557 + 8f5bb86 commit 543139f

3 files changed

Lines changed: 127 additions & 15 deletions

File tree

EasyReader/Application/Controllers/Menu/EZRMenuViewController.m

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ @interface EZRMenuViewController ()
4040
/// The current feeds provider
4141
@property (nonatomic, strong) EZRCurrentFeedsProvider *currentFeedsProvider;
4242

43+
/// Height Menu to modify
44+
@property (nonatomic, weak) IBOutlet NSLayoutConstraint *menuHeight;
45+
4346
@end
4447

4548

@@ -94,28 +97,19 @@ - (void)feedsDidChange:(EZRCurrentFeedsProvider *)currentFeedProvider feeds:(NSA
9497
- (void)searchStateChanged:(NSNotification *)notification {
9598
EZRSearchState event = [[[notification userInfo] objectForKey:@"searchState"] intValue];
9699

97-
CGRect oldFrame = self.menuContainerViewController.leftMenuViewController.view.frame;
98-
UIViewController *newLeftController = self.menuContainerViewController.leftMenuViewController;
99-
100100
switch (event) {
101101
case kEZRSearchStateStartedSearching:
102102
{
103103
self.tableView_menu.dataSource = self.searchFeedDataSource;
104-
105-
newLeftController.view.frame = CGRectMake(oldFrame.origin.x, oldFrame.origin.y, oldFrame.size.width, 361.0);
106-
self.menuContainerViewController.leftMenuViewController = newLeftController;
107-
[self.searchBar becomeFirstResponder];
108-
104+
self.menuHeight.constant = self.menuHeight.constant*.6;
109105
break;
110106
}
111107
case kEZRSearchStateStoppedSearching:
108+
{
112109
self.tableView_menu.dataSource = self.userFeedDataSource;
113-
114-
newLeftController.view.frame = CGRectMake(oldFrame.origin.x, oldFrame.origin.y, oldFrame.size.width, 568.0);
115-
self.menuContainerViewController.leftMenuViewController = newLeftController;
116-
110+
self.menuHeight.constant = self.menuHeight.constant/.6;
117111
break;
118-
112+
}
119113
case kEZRSearchStateResultsAvailable:
120114
// Do nothing, just need to realod
121115
break;

EasyReader/Application/Views/Main_iPhone.storyboard

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="5056" systemVersion="13C64" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="Hgn-0q-Z1W">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="5053" systemVersion="13C64" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="Hgn-0q-Z1W">
33
<dependencies>
44
<deployment defaultVersion="1792" identifier="iOS"/>
55
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/>
@@ -217,6 +217,9 @@
217217
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
218218
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
219219
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
220+
<constraints>
221+
<constraint firstAttribute="height" constant="568" id="Q3P-BD-mqw"/>
222+
</constraints>
220223
<color key="sectionIndexBackgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
221224
<view key="tableHeaderView" contentMode="scaleToFill" id="Nnv-Cw-nbp">
222225
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
@@ -316,13 +319,13 @@
316319
<constraints>
317320
<constraint firstAttribute="trailing" secondItem="14d-Nx-0xr" secondAttribute="trailing" id="2ek-R2-wR0"/>
318321
<constraint firstItem="14d-Nx-0xr" firstAttribute="top" secondItem="C4i-F3-dmc" secondAttribute="bottom" id="6yU-gL-jQ1"/>
319-
<constraint firstItem="s5I-Ee-yuh" firstAttribute="top" secondItem="14d-Nx-0xr" secondAttribute="bottom" id="OvM-WD-RTl"/>
320322
<constraint firstItem="14d-Nx-0xr" firstAttribute="leading" secondItem="6fH-J0-YTO" secondAttribute="leading" id="RBu-zY-A5b"/>
321323
</constraints>
322324
</view>
323325
<nil key="simulatedStatusBarMetrics"/>
324326
<nil key="simulatedTopBarMetrics"/>
325327
<connections>
328+
<outlet property="menuHeight" destination="Q3P-BD-mqw" id="CUd-ac-fpj"/>
326329
<outlet property="searchBar" destination="6U4-aC-Dql" id="5As-xt-K3v"/>
327330
<outlet property="searchFeedDataSource" destination="Kyf-fs-6tv" id="UKM-0P-nBF"/>
328331
<outlet property="tableView_menu" destination="14d-Nx-0xr" id="V1g-Kc-z5U"/>

Pods/Pods.xcodeproj/xcuserdata/jlorich.xcuserdatad/xcschemes/xcschememanagement.plist

Lines changed: 115 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)