Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
* upstream/master: (21 commits)
  Fixes mutualmobile#367
  Added notes for reference
  Add missing appearance transition forwarding
  Fixed changelog
  Updated changelog
  Updated changelog
  updated changelog
  Fix infinite, recursive init call for subclass
  Replaced iOS 6 deprecated `-shouldAutorotateToInterfaceOrientation:` method with new one
  Cleaned up PR mutualmobile#288
  Prevent several rotation methods from getting called twice in iOS8, where they are automatically called from [UIViewController viewWillTransitionToSizeWithTransitionCoordinator:]
  Update MMDrawerController.m
  Updated documentation
  Removed pre iOS 7 support
  Switched id to instancetype
  Fix for mutualmobile#287
  Added iPhone 6/6+ support
  Cleaned up setter methods Added shadow color property from mutualmobile#294
  Updated UI properties from mutualmobile#338
  Call removeFromParentViewController after removeFromSuperview in setCenterViewController to avoid EXC_BAD_ACCESS due to nil view value
  ...

Conflicts:
	MMDrawerController/MMDrawerController.h
	MMDrawerController/MMDrawerController.m
  • Loading branch information
boherna committed Sep 4, 2015
2 parents 2b5d55d + 08b1538 commit 624a645
Show file tree
Hide file tree
Showing 22 changed files with 282 additions and 282 deletions.
17 changes: 15 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
#MMDrawerController Changelog
##[0.5.7](https://github.com/mutualmobile/MMDrawerController/issues?q=milestone%3A0.5.7+is%3Aclosed)(Monday, August 25th, 2014)
##[0.6.0](https://github.com/mutualmobile/MMDrawerController/issues?q=milestone%3A0.6.0+is%3Aclosed) (Thursday, April 2, 2015)
###New
* **Removed iOS 6 support** ([#350](https://github.com/mutualmobile/MMDrawerController/pull/350))([#356](https://github.com/mutualmobile/MMDrawerController/pull/356)) (Kevin Harwood, podkovyrin)
* **Migrated from id to instancetype** ([#349](https://github.com/mutualmobile/MMDrawerController/pull/349)) (Kevin Harwood)
* **Added iPhone 6/6+ support to example project** ([#347](https://github.com/mutualmobile/MMDrawerController/pull/347)) (Kevin Harwood)
* **Added new properties for Shadow Radius, Shadow Opacity, Shadow Offset, Bezel Gesture Size, and Pan Velocity thresholds** Please consult the documentation for additional information. ([#294](https://github.com/mutualmobile/MMDrawerController/pull/294))([#338](https://github.com/mutualmobile/MMDrawerController/pull/338))([#270](https://github.com/mutualmobile/MMDrawerController/pull/270))([#194](https://github.com/mutualmobile/MMDrawerController/pull/194)) (SanggeonPark, lbasile, boherna, MartinMoizard)

###Fixed
* **FIXED** an issue ([#288](https://github.com/mutualmobile/MMDrawerController/pull/288)) rotation methods were called twice on iOS 8. (arielitovsky)
* **FIXED** an issue ([#348](https://github.com/mutualmobile/MMDrawerController/pull/348)) where the drawer height was incorrectly set when using a dummy status bar.
* **FIXED** an issue ([#324](https://github.com/mutualmobile/MMDrawerController/pull/324)) where we called removeFromParentViewController out of order. (long)
* **FIXED** an issue ([#306](https://github.com/mutualmobile/MMDrawerController/pull/306)) where the podspec incorrectly caused a duplicate reference warning. (klundberg)

##[0.5.7](https://github.com/mutualmobile/MMDrawerController/issues?q=milestone%3A0.5.7+is%3Aclosed) (Monday, August 25th, 2014)
###Fixed
* **FIXED** an issue ([#271](https://github.com/mutualmobile/MMDrawerController/pull/271)) where state restoration would cause multiple calls to viewDidAppear. (pronebird)
* **FIXED** an issue ([#269](https://github.com/mutualmobile/MMDrawerController/pull/269)) where an internal method name was misnamed. (shoecart)

##[0.5.6](https://github.com/mutualmobile/MMDrawerController/issues?milestone=14&page=1&state=closed)(Monday, June 9th, 2014)
##[0.5.6](https://github.com/mutualmobile/MMDrawerController/issues?milestone=14&page=1&state=closed) (Monday, June 9th, 2014)
###Fixed
* **FIXED** an issue ([#259](https://github.com/mutualmobile/MMDrawerController/pull/259)) where the side would rarely show up hidden when opening. (Eric Miller, Lars Anderson, Kevin Harwood)
* **FIXED** an issue ([#251](https://github.com/mutualmobile/MMDrawerController/pull/251)) where the completion block would not be called if you set the new center view controller with a full close animation while the drawer was closed. (ThuggishNuggets)
Expand Down
Binary file removed KitchenSink/ExampleFiles/[email protected]
Binary file not shown.
Binary file removed KitchenSink/ExampleFiles/Default.png
Binary file not shown.
Binary file removed KitchenSink/ExampleFiles/[email protected]
Binary file not shown.
45 changes: 45 additions & 0 deletions KitchenSink/ExampleFiles/LaunchScreen.xib
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6254" systemVersion="14C109" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6247"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2015 Mutual Mobile. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
<rect key="frame" x="20" y="439" width="441" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
<variation key="widthClass=compact">
<fontDescription key="fontDescription" type="system" pointSize="11"/>
</variation>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="MMDrawerControllerKitchenSink" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
<rect key="frame" x="20" y="140" width="441" height="43"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="Kid-kn-2rF"/>
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="404" y="445"/>
</view>
</objects>
</document>
39 changes: 15 additions & 24 deletions KitchenSink/ExampleFiles/MMAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,15 @@ -(BOOL)application:(UIApplication *)application willFinishLaunchingWithOptions:(

UINavigationController * navigationController = [[MMNavigationController alloc] initWithRootViewController:centerViewController];
[navigationController setRestorationIdentifier:@"MMExampleCenterNavigationControllerRestorationKey"];
if(OSVersionIsAtLeastiOS7()){
UINavigationController * rightSideNavController = [[MMNavigationController alloc] initWithRootViewController:rightSideDrawerViewController];
[rightSideNavController setRestorationIdentifier:@"MMExampleRightNavigationControllerRestorationKey"];
UINavigationController * leftSideNavController = [[MMNavigationController alloc] initWithRootViewController:leftSideDrawerViewController];
[leftSideNavController setRestorationIdentifier:@"MMExampleLeftNavigationControllerRestorationKey"];
self.drawerController = [[MMDrawerController alloc]
initWithCenterViewController:navigationController
leftDrawerViewController:leftSideNavController
rightDrawerViewController:rightSideNavController];
[self.drawerController setShowsShadow:NO];
}
else{
self.drawerController = [[MMDrawerController alloc]
initWithCenterViewController:navigationController
leftDrawerViewController:leftSideDrawerViewController
rightDrawerViewController:rightSideDrawerViewController];
}
UINavigationController * rightSideNavController = [[MMNavigationController alloc] initWithRootViewController:rightSideDrawerViewController];
[rightSideNavController setRestorationIdentifier:@"MMExampleRightNavigationControllerRestorationKey"];
UINavigationController * leftSideNavController = [[MMNavigationController alloc] initWithRootViewController:leftSideDrawerViewController];
[leftSideNavController setRestorationIdentifier:@"MMExampleLeftNavigationControllerRestorationKey"];
self.drawerController = [[MMDrawerController alloc]
initWithCenterViewController:navigationController
leftDrawerViewController:leftSideNavController
rightDrawerViewController:rightSideNavController];
[self.drawerController setShowsShadow:NO];
[self.drawerController setRestorationIdentifier:@"MMDrawer"];
[self.drawerController setMaximumRightDrawerWidth:200.0];
[self.drawerController setOpenDrawerGestureModeMask:MMOpenDrawerGestureModeAll];
Expand All @@ -78,13 +70,12 @@ -(BOOL)application:(UIApplication *)application willFinishLaunchingWithOptions:(
}
}];
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
if(OSVersionIsAtLeastiOS7()){
UIColor * tintColor = [UIColor colorWithRed:29.0/255.0
green:173.0/255.0
blue:234.0/255.0
alpha:1.0];
[self.window setTintColor:tintColor];
}

UIColor * tintColor = [UIColor colorWithRed:29.0/255.0
green:173.0/255.0
blue:234.0/255.0
alpha:1.0];
[self.window setTintColor:tintColor];
[self.window setRootViewController:self.drawerController];

return YES;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,16 @@
<string>1.0.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIPrerenderedIcon</key>
<true/>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleBlackOpaque</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleBlackOpaque</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,4 @@
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif


static BOOL OSVersionIsAtLeastiOS7() {
return (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_6_1);
}
#endif
22 changes: 6 additions & 16 deletions KitchenSink/ExampleFiles/MMExampleCenterTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -76,22 +76,12 @@ - (void)viewDidLoad
[self setupLeftMenuButton];
[self setupRightMenuButton];

if(OSVersionIsAtLeastiOS7()){
UIColor * barColor = [UIColor
colorWithRed:247.0/255.0
green:249.0/255.0
blue:250.0/255.0
alpha:1.0];
[self.navigationController.navigationBar setBarTintColor:barColor];
}
else {
UIColor * barColor = [UIColor
colorWithRed:78.0/255.0
green:156.0/255.0
blue:206.0/255.0
alpha:1.0];
[self.navigationController.navigationBar setTintColor:barColor];
}
UIColor * barColor = [UIColor
colorWithRed:247.0/255.0
green:249.0/255.0
blue:250.0/255.0
alpha:1.0];
[self.navigationController.navigationBar setBarTintColor:barColor];


MMLogoView * logo = [[MMLogoView alloc] initWithFrame:CGRectMake(0, 0, 29, 31)];
Expand Down
37 changes: 7 additions & 30 deletions KitchenSink/ExampleFiles/MMExampleSideDrawerViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,31 +32,18 @@ - (void)viewDidLoad
{
[super viewDidLoad];

if(OSVersionIsAtLeastiOS7()){
_tableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStyleGrouped];
}
else {
_tableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
}
_tableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStyleGrouped];

[self.tableView setDelegate:self];
[self.tableView setDataSource:self];
[self.view addSubview:self.tableView];
[self.tableView setAutoresizingMask:UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight];

UIColor * tableViewBackgroundColor;
if(OSVersionIsAtLeastiOS7()){
tableViewBackgroundColor = [UIColor colorWithRed:110.0/255.0
green:113.0/255.0
blue:115.0/255.0
alpha:1.0];
}
else {
tableViewBackgroundColor = [UIColor colorWithRed:77.0/255.0
green:79.0/255.0
blue:80.0/255.0
alpha:1.0];
}
tableViewBackgroundColor = [UIColor colorWithRed:110.0/255.0
green:113.0/255.0
blue:115.0/255.0
alpha:1.0];
[self.tableView setBackgroundColor:tableViewBackgroundColor];

[self.tableView setSeparatorStyle:UITableViewCellSeparatorStyleNone];
Expand Down Expand Up @@ -322,24 +309,14 @@ -(NSString*)tableView:(UITableView *)tableView titleForHeaderInSection:(NSIntege

-(UIView*)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
MMSideDrawerSectionHeaderView * headerView;
if(OSVersionIsAtLeastiOS7()){
headerView = [[MMSideDrawerSectionHeaderView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(tableView.bounds), 56.0)];
}
else {
headerView = [[MMSideDrawerSectionHeaderView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(tableView.bounds), 23.0)];
}
headerView = [[MMSideDrawerSectionHeaderView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(tableView.bounds), 56.0)];
[headerView setAutoresizingMask:UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth];
[headerView setTitle:[tableView.dataSource tableView:tableView titleForHeaderInSection:section]];
return headerView;
}

-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
if(OSVersionIsAtLeastiOS7()){
return 56.0;
}
else {
return 23.0;
}
return 56.0;
}

-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
Expand Down
12 changes: 5 additions & 7 deletions KitchenSink/ExampleFiles/MMExampleViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,11 @@ - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
- (void)viewDidLoad
{
[super viewDidLoad];
if(OSVersionIsAtLeastiOS7()){
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(contentSizeDidChangeNotification:)
name:UIContentSizeCategoryDidChangeNotification
object:nil];
}
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(contentSizeDidChangeNotification:)
name:UIContentSizeCategoryDidChangeNotification
object:nil];
}

- (void)dealloc{
Expand Down
Loading

0 comments on commit 624a645

Please sign in to comment.