Showing preview only (328K chars total). Download the full file or copy to clipboard to get everything.
Repository: mutualmobile/MMDrawerController
Branch: master
Commit: 08b153860e26
Files: 50
Total size: 310.0 KB
Directory structure:
gitextract_76l4zacj/
├── .gitignore
├── .travis.yml
├── CHANGELOG.md
├── KitchenSink/
│ ├── ExampleFiles/
│ │ ├── LaunchScreen.xib
│ │ ├── MMAppDelegate.h
│ │ ├── MMAppDelegate.m
│ │ ├── MMCenterTableViewCell.h
│ │ ├── MMCenterTableViewCell.m
│ │ ├── MMDrawerControllerKitchenSink-Info.plist
│ │ ├── MMDrawerControllerKitchenSink-Prefix.pch
│ │ ├── MMExampleCenterTableViewController.h
│ │ ├── MMExampleCenterTableViewController.m
│ │ ├── MMExampleDrawerVisualStateManager.h
│ │ ├── MMExampleDrawerVisualStateManager.m
│ │ ├── MMExampleLeftSideDrawerViewController.h
│ │ ├── MMExampleLeftSideDrawerViewController.m
│ │ ├── MMExampleRightSideDrawerViewController.h
│ │ ├── MMExampleRightSideDrawerViewController.m
│ │ ├── MMExampleSideDrawerViewController.h
│ │ ├── MMExampleSideDrawerViewController.m
│ │ ├── MMExampleViewController.h
│ │ ├── MMExampleViewController.m
│ │ ├── MMLogoView.h
│ │ ├── MMLogoView.m
│ │ ├── MMNavigationController.h
│ │ ├── MMNavigationController.m
│ │ ├── MMSideDrawerSectionHeaderView.h
│ │ ├── MMSideDrawerSectionHeaderView.m
│ │ ├── MMSideDrawerTableViewCell.h
│ │ ├── MMSideDrawerTableViewCell.m
│ │ ├── MMTableViewCell.h
│ │ ├── MMTableViewCell.m
│ │ ├── en.lproj/
│ │ │ └── InfoPlist.strings
│ │ └── main.m
│ └── MMDrawerControllerKitchenSink.xcodeproj/
│ ├── project.pbxproj
│ ├── project.xcworkspace/
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata/
│ │ └── MMDrawerControllerKitchenSink.xccheckout
│ └── xcshareddata/
│ └── xcschemes/
│ └── MMDrawerControllerKitchenSink.xcscheme
├── LICENSE
├── MMDrawerController/
│ ├── MMDrawerBarButtonItem.h
│ ├── MMDrawerBarButtonItem.m
│ ├── MMDrawerController+Subclass.h
│ ├── MMDrawerController.h
│ ├── MMDrawerController.m
│ ├── MMDrawerVisualState.h
│ ├── MMDrawerVisualState.m
│ ├── UIViewController+MMDrawerController.h
│ └── UIViewController+MMDrawerController.m
├── MMDrawerController.podspec
└── README.md
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
# Xcode
.DS_Store
*/build/*
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
profile
*.moved-aside
DerivedData
.idea/
*.hmap
================================================
FILE: .travis.yml
================================================
language: objective-c
script: xcodebuild -project KitchenSink/MMDrawerControllerKitchenSink.xcodeproj/ -scheme MMDrawerControllerKitchenSink -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO
================================================
FILE: CHANGELOG.md
================================================
#MMDrawerController Changelog
##[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)
###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)
* **FIXED** an issue ([#246](https://github.com/mutualmobile/MMDrawerController/pull/246)) where user could interact with content while an animation completed. (jgallagher, Kevin Harwood)
* **FIXED** an issue ([#232](https://github.com/mutualmobile/MMDrawerController/pull/232)) where the drawer controller was not properly calling willMoveToParentViewController:nil when removing children from the drawer container view controller. (Josh Berlin, Kevin Harwood)
* **FIXED** an issue ([#222](https://github.com/mutualmobile/MMDrawerController/pull/222)) where a user interacting with during rotation would cause UI glitches. (Kevin Harwood, vkormushkin)
* **FIXED** an ([#220](https://github.com/mutualmobile/MMDrawerController/pull/220)) where we were setting the background color on the wrong view, which prevented setting a custom background color for the entire view. (Kevin Harwood, David Dulak, trawor)
##[0.5.5](https://github.com/mutualmobile/MMDrawerController/releases/tag/0.5.5) (Wednesday, April 30, 2014)
###Fixed
* **FIXED** an issue ([#244](https://github.com/mutualmobile/MMDrawerController/pull/244)) where a user could continue to interact with the view while a pan gesture animation was ongoing. (Kevin Harwood, Patrick Hernandez)
##[0.5.4](https://github.com/mutualmobile/MMDrawerController/releases/tag/0.5.4) (Tuesday, April 15, 2014)
###Fixed
* **FIXED** an issue ([#240](https://github.com/mutualmobile/MMDrawerController/pull/240)) where the center container view controller would be init'ed twice. (Lars Anderson)
* **FIXED** an issue ([#226](https://github.com/mutualmobile/MMDrawerController/pull/226)) where the side drawer would not be refreshed on a viewWill/DidAppear call. (kk-achu)
* **FIXED** an issue ([#224](https://github.com/mutualmobile/MMDrawerController/pull/224)) where we had some unreachable code. (tewha)
##[0.5.3](https://github.com/mutualmobile/MMDrawerController/releases/tag/0.5.3) (Tuesday, February 18, 2014)
###Fixed
* **FIXED** an issue ([#219](https://github.com/mutualmobile/MMDrawerController/pull/219)) where you would get an unbalanced appearance method call if you set the center view controller to the same center view controller.
##[0.5.2](https://github.com/mutualmobile/MMDrawerController/releases/tag/0.5.2) (Friday, January 31, 2014)
###New
* **Added Highlighting for iOS 7 Drawer Button Item** - Now supporting button highlighting. Also stream lined code path for iOS 6 menu button. ([#199](https://github.com/mutualmobile/MMDrawerController/pull/119)) (TomSwift)
###Fixed
* **FIXED** a Clang Analyzer issue ([#120](https://github.com/mutualmobile/MMDrawerController/pull/120)) found in Xcode 5. (klundberg)
* **FIXED** an issue ([#124](https://github.com/mutualmobile/MMDrawerController/pull/124)) where the navigation bar gestures would not work if a toolbar was displayed in the center view controller. (tbveralrud)
* **FIXED** an issue ([#152](https://github.com/mutualmobile/MMDrawerController/pull/152)) where two childControllerContainers view could be init'ed and added to the view hierarchy. (Kevin Harwood, JonasGessner)
* **FIXED** an issue ([#163](https://github.com/mutualmobile/MMDrawerController/pull/163)) where the navigation bar touch areas were smaller than they were supposed to be. (antonholmquist)
* **FIXED** an issue ([#177](https://github.com/mutualmobile/MMDrawerController/pull/177)) where disabling the shadow caused a performance issue in iOS 7. (Lars Anderson)
* **FIXED** an issue ([#211](https://github.com/mutualmobile/MMDrawerController/pull/211)) where the side drawer may become hidden if you try to interact with it during an animation. (Kevin Harwood, antonholmquist)
* **FIXED** an issue ([#212](https://github.com/mutualmobile/MMDrawerController/pull/212)) where the view controller appearance methods were not correctly send to the center view controller if you exchanged it while neither drawer was open. (Kevin Harwood, Club15CC)
##[0.5.1](https://github.com/mutualmobile/MMDrawerController/releases/tag/0.5.1) (Wednesday, September 18, 2013)
###Fixed
* **FIXED** an issue ([#110](https://github.com/mutualmobile/MMDrawerController/pull/110)) where you could not compile for iOS 6 using Xcode 4.6.3.
##[0.5.0](https://github.com/mutualmobile/MMDrawerController/releases/tag/0.5.0) (Tuesday, September 17, 2013)
###New
* **iOS 7 Support** - Compiled to work with iOS 7
* **iOS 7 Status Bar Support** - Now includes a feature to drawer an iOS 6 style status bar, allowing your drawer animations to not impact the status bar area. Consult the README or the documentation for further information.
* **MMDrawerBarButtonItem Design** - Now designed to fit in with the iOS 7 aesthetic.
* **MMDrawerBarButtonItem TintColor** - Now uses tintColor in iOS 7.
* Example project now runs in both iOS 6 and iOS 7 with two different visual designs.
###Known Issues
* iOS 7 animations transforms are a bit choppy. This issue requires further investigation, and is being tracked [here](https://github.com/mutualmobile/MMDrawerController/issues/101).
##[0.4.0](https://github.com/mutualmobile/MMDrawerController/issues?milestone=8&page=1&state=closed) (Monday, August 19, 2013)
###New
* **State Restoration Support** - `MMDrawerController` now supports state restoration, and will save the state of the open side as well. Consult the [documentation](https://github.com/mutualmobile/MMDrawerController#state-restoration) for more information. ([#69](https://github.com/mutualmobile/MMDrawerController/pull/69)). (Kevin Harwood, djibouti33)
* **Better Subclass Support** - `MMDrawerController` now contains an additional Subclass header file, to allow subclasses to access protected methods of the framework. Please consult the [documentation](https://github.com/mutualmobile/MMDrawerController#subclassing) for additional details on how to properly subclass `MMDrawerController`. ([#37](https://github.com/mutualmobile/MMDrawerController/pull/37)). (Lars Anderson)
* **initWithCoder: Support** - `MMDrawerController` now implements `initWithCoder:`, making it easier to integrate with a storyboard. Looks for an official extension from @TomSwift providing storyboard integration. ([#81](https://github.com/mutualmobile/MMDrawerController/pull/81)). (Tom Swift)
* **Improved parent drawer controller detection** - `mm_drawerController` will now walk up the entire view controller stack looking for the parent, making it easier to access the drawer controller from any child view controller in the hierarchy. ([#70](https://github.com/mutualmobile/MMDrawerController/pull/70)). (messi)
###Fixed
* **FIXED** an issue ([#66](https://github.com/mutualmobile/MMDrawerController/pull/66)) where you would get unbalanced begin/end appearance transitions when using a non-animated `setCenterViewController:...` method. (Kevin Harwood, jsankey)
* **FIXED** an issue ([#63](https://github.com/mutualmobile/MMDrawerController/pull/63)) where the visual state block received invalid transform values. (Kevin Harwood)
* **FIXED** an issue ([#71](https://github.com/mutualmobile/MMDrawerController/pull/71)) where the side drawer could become blank if you called the `closeDrawerAnimated:...` while the drawer was closing. (Kevin Harwood, Bryan Wang)
* **FIXED** an issue ([#80](https://github.com/mutualmobile/MMDrawerController/pull/80)) where the block parameters were not named appropriately. (Kevin Harwood, Joao Nunes)
##[0.3.0](https://github.com/mutualmobile/MMDrawerController/issues?milestone=6&page=1&state=closed) (Monday, July 22nd, 2013)
###New
* Added a block to determine if a gesture should be recognized, giving the implementer a chance to define where a gesture should be recognized within their views. Please consult the [README](https://github.com/mutualmobile/mmdrawercontroller#custom-gesture-recognizer-support) for additional details. ([#25](https://github.com/mutualmobile/MMDrawerController/pull/25)). (Kevin Harwood)
###Fixed
* **FIXED** an issue ([#56](https://github.com/mutualmobile/MMDrawerController/pull/56)) where the bezel gesture would be detected even if there was no drawer controller on that side. (Kevin Harwood)
* **FIXED** an issue ([#50](https://github.com/mutualmobile/MMDrawerController/pull/50)) where a subclass could get stuck in an infinite loop in the `init` method. (Tuan Cao)
##[0.2.1](https://github.com/mutualmobile/MMDrawerController/issues?milestone=7&state=closed) (Friday, June 21st, 2013)
###Fixed
* **FIXED** an issue([#42](https://github.com/mutualmobile/MMDrawerController/issues/42)) where the gesture completion block was not being called if the gesture action closed the drawer completely. (Kevin Harwood)
##[0.2.0](https://github.com/mutualmobile/MMDrawerController/issues?milestone=5&state=closed) (Tuesday, June 4th, 2013)
###New
* Added support for using the panning velocity to complete the animation. It now looks *much* better ([#18](https://github.com/mutualmobile/MMDrawerController/issues/18)). (Kevin Harwood)
* Added a new callback block to get notified when a gesture animation has completed ([#20](https://github.com/mutualmobile/MMDrawerController/issues/20)). (Kevin Harwood)
###Fixed
* **FIXED** an issue([#23](https://github.com/mutualmobile/MMDrawerController/issues/23)) where the drawer could bounce, even if a drawer was open. (Kevin Harwood)
* **FIXED** an issue([#38](https://github.com/mutualmobile/MMDrawerController/issues/38)) the designator initializer for `UIViewController` was not properly setting default values. (poteryaysya)
* **FIXED** an issue([#24](https://github.com/mutualmobile/MMDrawerController/issues/24)) where some documentation was incorrect. (Kevin Harwood)
##[0.1.0](https://github.com/mutualmobile/MMDrawerController/issues?milestone=3&page=1&state=closed) (Wednesday, May 15th, 2013)
###New
* `MMDrawerController` now properly supports full view controller containment. The drawer view controllers will properly receive their view appearance methods at the correct time now, including every time they are about to become visible. Please note that `mm_drawerWillApear` has now been deprecated. More notes below. (Kevin Harwood, Lars Anderson)
###Fixed
* **FIXED** an issue([#9](https://github.com/mutualmobile/MMDrawerController/issues/9)) where the drawer could bounce, even if no drawer was set. (Kevin Harwood)
* **FIXED** an issue([#14](https://github.com/mutualmobile/MMDrawerController/issues/14)) where open center interaction state could be incorrectly applied if a new view controller is pushed onto a center view controller when a drawer is open. (Kevin Harwood)
###Deprecated
* Support for the `mm_drawerWillAppear` method in the `UIViewController+MMDrawerController` category is no longer available. Please move any logic contained within this method to `viewWillAppear:` in your drawer view controllers. This method will no longer be called going forward.
##[0.0.2](https://github.com/mutualmobile/MMDrawerController/issues?milestone=2&state=closed) (Thursday, May 9th, 2013)
###New
* Improved the example to allow you to disable the left or right side drawer controller. (Kevin Harwood)
###Fixed
* **FIXED** an issue([#6](https://github.com/mutualmobile/MMDrawerController/issues/1)) where hidden side drawer controllers received touches if the center view controller was set to userInteraction NO. (Kevin Harwood)
* **FIXED** an issue([#1](https://github.com/mutualmobile/MMDrawerController/issues/1)) where `shouldStretchDrawer` caused drawer controllers with only one side drawer to stretch in the wrong direction (Lars Anderson, Kevin Harwood)
##0.0.1 (Wednesday, May 8th, 2013)
* Initial Library Release
================================================
FILE: KitchenSink/ExampleFiles/LaunchScreen.xib
================================================
<?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>
================================================
FILE: KitchenSink/ExampleFiles/MMAppDelegate.h
================================================
// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import <UIKit/UIKit.h>
@interface MMAppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
================================================
FILE: KitchenSink/ExampleFiles/MMAppDelegate.m
================================================
// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import "MMAppDelegate.h"
#import "MMDrawerController.h"
#import "MMExampleCenterTableViewController.h"
#import "MMExampleLeftSideDrawerViewController.h"
#import "MMExampleRightSideDrawerViewController.h"
#import "MMDrawerVisualState.h"
#import "MMExampleDrawerVisualStateManager.h"
#import "MMNavigationController.h"
#import <QuartzCore/QuartzCore.h>
@interface MMAppDelegate ()
@property (nonatomic,strong) MMDrawerController * drawerController;
@end
@implementation MMAppDelegate
-(BOOL)application:(UIApplication *)application willFinishLaunchingWithOptions:(NSDictionary *)launchOptions{
UIViewController * leftSideDrawerViewController = [[MMExampleLeftSideDrawerViewController alloc] init];
UIViewController * centerViewController = [[MMExampleCenterTableViewController alloc] init];
UIViewController * rightSideDrawerViewController = [[MMExampleRightSideDrawerViewController alloc] init];
UINavigationController * navigationController = [[MMNavigationController alloc] initWithRootViewController:centerViewController];
[navigationController setRestorationIdentifier:@"MMExampleCenterNavigationControllerRestorationKey"];
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];
[self.drawerController setCloseDrawerGestureModeMask:MMCloseDrawerGestureModeAll];
[self.drawerController
setDrawerVisualStateBlock:^(MMDrawerController *drawerController, MMDrawerSide drawerSide, CGFloat percentVisible) {
MMDrawerControllerDrawerVisualStateBlock block;
block = [[MMExampleDrawerVisualStateManager sharedManager]
drawerVisualStateBlockForDrawerSide:drawerSide];
if(block){
block(drawerController, drawerSide, percentVisible);
}
}];
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
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;
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
return YES;
}
- (BOOL)application:(UIApplication *)application shouldSaveApplicationState:(NSCoder *)coder{
return YES;
}
- (BOOL)application:(UIApplication *)application shouldRestoreApplicationState:(NSCoder *)coder{
return YES;
}
- (UIViewController *)application:(UIApplication *)application viewControllerWithRestorationIdentifierPath:(NSArray *)identifierComponents coder:(NSCoder *)coder
{
NSString * key = [identifierComponents lastObject];
if([key isEqualToString:@"MMDrawer"]){
return self.window.rootViewController;
}
else if ([key isEqualToString:@"MMExampleCenterNavigationControllerRestorationKey"]) {
return ((MMDrawerController *)self.window.rootViewController).centerViewController;
}
else if ([key isEqualToString:@"MMExampleRightNavigationControllerRestorationKey"]) {
return ((MMDrawerController *)self.window.rootViewController).rightDrawerViewController;
}
else if ([key isEqualToString:@"MMExampleLeftNavigationControllerRestorationKey"]) {
return ((MMDrawerController *)self.window.rootViewController).leftDrawerViewController;
}
else if ([key isEqualToString:@"MMExampleLeftSideDrawerController"]){
UIViewController * leftVC = ((MMDrawerController *)self.window.rootViewController).leftDrawerViewController;
if([leftVC isKindOfClass:[UINavigationController class]]){
return [(UINavigationController*)leftVC topViewController];
}
else {
return leftVC;
}
}
else if ([key isEqualToString:@"MMExampleRightSideDrawerController"]){
UIViewController * rightVC = ((MMDrawerController *)self.window.rootViewController).rightDrawerViewController;
if([rightVC isKindOfClass:[UINavigationController class]]){
return [(UINavigationController*)rightVC topViewController];
}
else {
return rightVC;
}
}
return nil;
}
@end
================================================
FILE: KitchenSink/ExampleFiles/MMCenterTableViewCell.h
================================================
// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import "MMTableViewCell.h"
@interface MMCenterTableViewCell : MMTableViewCell
@end
================================================
FILE: KitchenSink/ExampleFiles/MMCenterTableViewCell.m
================================================
// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import "MMCenterTableViewCell.h"
@implementation MMCenterTableViewCell
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
[self setAccessoryCheckmarkColor:[UIColor colorWithRed:13.0/255.0
green:88.0/255.0
blue:161.0/255.0
alpha:1.0]];
}
return self;
}
-(void)updateContentForNewContentSize{
if([[UIFont class] respondsToSelector:@selector(preferredFontForTextStyle:)]){
[self.textLabel setFont:[UIFont preferredFontForTextStyle:UIFontTextStyleBody]];
}
}
@end
================================================
FILE: KitchenSink/ExampleFiles/MMDrawerControllerKitchenSink-Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>MMDrawer</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFiles</key>
<array>
<string>Icon.png</string>
<string>Icon@2x.png</string>
<string>Icon-72.png</string>
<string>Icon-72@2x.png</string>
</array>
<key>CFBundleIdentifier</key>
<string>com.mutualmobile.mmsdcvc.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIPrerenderedIcon</key>
<true/>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleBlackOpaque</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusAppearance</key>
<true/>
</dict>
</plist>
================================================
FILE: KitchenSink/ExampleFiles/MMDrawerControllerKitchenSink-Prefix.pch
================================================
//
// Prefix header for all source files of the 'MMDrawerController' target in the 'MMDrawerController' project
//
#import <Availability.h>
#ifndef __IPHONE_3_0
#warning "This project uses features only available in iOS SDK 3.0 and later."
#endif
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif
================================================
FILE: KitchenSink/ExampleFiles/MMExampleCenterTableViewController.h
================================================
// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import <UIKit/UIKit.h>
#import "MMExampleViewController.h"
@interface MMExampleCenterTableViewController : MMExampleViewController <UITableViewDataSource,UITableViewDelegate>
@property (nonatomic,strong) UITableView * tableView;
@end
================================================
FILE: KitchenSink/ExampleFiles/MMExampleCenterTableViewController.m
================================================
// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import "MMExampleCenterTableViewController.h"
#import "MMExampleDrawerVisualStateManager.h"
#import "UIViewController+MMDrawerController.h"
#import "MMDrawerBarButtonItem.h"
#import "MMLogoView.h"
#import "MMCenterTableViewCell.h"
#import "MMExampleLeftSideDrawerViewController.h"
#import "MMExampleRightSideDrawerViewController.h"
#import "MMNavigationController.h"
#import <QuartzCore/QuartzCore.h>
typedef NS_ENUM(NSInteger, MMCenterViewControllerSection){
MMCenterViewControllerSectionLeftViewState,
MMCenterViewControllerSectionLeftDrawerAnimation,
MMCenterViewControllerSectionRightViewState,
MMCenterViewControllerSectionRightDrawerAnimation,
};
@interface MMExampleCenterTableViewController ()
@end
@implementation MMExampleCenterTableViewController
- (id)init
{
self = [super init];
if (self) {
[self setRestorationIdentifier:@"MMExampleCenterControllerRestorationKey"];
}
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
_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];
UITapGestureRecognizer * doubleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(doubleTap:)];
[doubleTap setNumberOfTapsRequired:2];
[self.view addGestureRecognizer:doubleTap];
UITapGestureRecognizer * twoFingerDoubleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(twoFingerDoubleTap:)];
[twoFingerDoubleTap setNumberOfTapsRequired:2];
[twoFingerDoubleTap setNumberOfTouchesRequired:2];
[self.view addGestureRecognizer:twoFingerDoubleTap];
[self setupLeftMenuButton];
[self setupRightMenuButton];
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)];
[self.navigationItem setTitleView:logo];
[self.navigationController.view.layer setCornerRadius:10.0f];
UIView *backView = [[UIView alloc] init];
[backView setBackgroundColor:[UIColor colorWithRed:208.0/255.0
green:208.0/255.0
blue:208.0/255.0
alpha:1.0]];
[self.tableView setBackgroundView:backView];
}
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
NSLog(@"Center will appear");
}
-(void)viewDidAppear:(BOOL)animated{
[super viewDidAppear:animated];
NSLog(@"Center did appear");
}
-(void)viewWillDisappear:(BOOL)animated{
[super viewWillDisappear:animated];
NSLog(@"Center will disappear");
}
-(void)viewDidDisappear:(BOOL)animated{
[super viewDidDisappear:animated];
NSLog(@"Center did disappear");
}
-(void)setupLeftMenuButton{
MMDrawerBarButtonItem * leftDrawerButton = [[MMDrawerBarButtonItem alloc] initWithTarget:self action:@selector(leftDrawerButtonPress:)];
[self.navigationItem setLeftBarButtonItem:leftDrawerButton animated:YES];
}
-(void)setupRightMenuButton{
MMDrawerBarButtonItem * rightDrawerButton = [[MMDrawerBarButtonItem alloc] initWithTarget:self action:@selector(rightDrawerButtonPress:)];
[self.navigationItem setRightBarButtonItem:rightDrawerButton animated:YES];
}
-(void)contentSizeDidChange:(NSString *)size{
[self.tableView reloadData];
}
#pragma mark - Table view data source
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 4;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
// Return the number of rows in the section.
switch (section) {
case MMCenterViewControllerSectionLeftDrawerAnimation:
case MMCenterViewControllerSectionRightDrawerAnimation:
return 5;
case MMCenterViewControllerSectionLeftViewState:
case MMCenterViewControllerSectionRightViewState:
return 1;
default:
return 0;
}
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[MMCenterTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
[cell setSelectionStyle:UITableViewCellSelectionStyleGray];
}
UIColor * selectedColor = [UIColor
colorWithRed:1.0/255.0
green:15.0/255.0
blue:25.0/255.0
alpha:1.0];
UIColor * unselectedColor = [UIColor
colorWithRed:79.0/255.0
green:93.0/255.0
blue:102.0/255.0
alpha:1.0];
switch (indexPath.section) {
case MMCenterViewControllerSectionLeftDrawerAnimation:
case MMCenterViewControllerSectionRightDrawerAnimation:{
MMDrawerAnimationType animationTypeForSection;
if(indexPath.section == MMCenterViewControllerSectionLeftDrawerAnimation){
animationTypeForSection = [[MMExampleDrawerVisualStateManager sharedManager] leftDrawerAnimationType];
}
else {
animationTypeForSection = [[MMExampleDrawerVisualStateManager sharedManager] rightDrawerAnimationType];
}
if(animationTypeForSection == indexPath.row){
[cell setAccessoryType:UITableViewCellAccessoryCheckmark];
[cell.textLabel setTextColor:selectedColor];
}
else {
[cell setAccessoryType:UITableViewCellAccessoryNone];
[cell.textLabel setTextColor:unselectedColor];
}
switch (indexPath.row) {
case MMDrawerAnimationTypeNone:
[cell.textLabel setText:@"None"];
break;
case MMDrawerAnimationTypeSlide:
[cell.textLabel setText:@"Slide"];
break;
case MMDrawerAnimationTypeSlideAndScale:
[cell.textLabel setText:@"Slide and Scale"];
break;
case MMDrawerAnimationTypeSwingingDoor:
[cell.textLabel setText:@"Swinging Door"];
break;
case MMDrawerAnimationTypeParallax:
[cell.textLabel setText:@"Parallax"];
break;
default:
break;
}
break;
}
case MMCenterViewControllerSectionLeftViewState:{
[cell.textLabel setText:@"Enabled"];
if(self.mm_drawerController.leftDrawerViewController){
[cell setAccessoryType:UITableViewCellAccessoryCheckmark];
[cell.textLabel setTextColor:selectedColor];
}
else{
[cell setAccessoryType:UITableViewCellAccessoryNone];
[cell.textLabel setTextColor:unselectedColor];
}
break;
}
case MMCenterViewControllerSectionRightViewState:{
[cell.textLabel setText:@"Enabled"];
if(self.mm_drawerController.rightDrawerViewController){
[cell setAccessoryType:UITableViewCellAccessoryCheckmark];
[cell.textLabel setTextColor:selectedColor];
}
else{
[cell setAccessoryType:UITableViewCellAccessoryNone];
[cell.textLabel setTextColor:unselectedColor];
}
break;
}
default:
break;
}
return cell;
}
-(NSString*)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section{
switch (section) {
case MMCenterViewControllerSectionLeftDrawerAnimation:
return @"Left Drawer Animation";
case MMCenterViewControllerSectionRightDrawerAnimation:
return @"Right Drawer Animation";
case MMCenterViewControllerSectionLeftViewState:
return @"Left Drawer";
case MMCenterViewControllerSectionRightViewState:
return @"Right Drawer";
default:
return nil;
}
}
#pragma mark - Table view delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
switch (indexPath.section) {
case MMCenterViewControllerSectionLeftDrawerAnimation:
case MMCenterViewControllerSectionRightDrawerAnimation:{
if(indexPath.section == MMCenterViewControllerSectionLeftDrawerAnimation){
[[MMExampleDrawerVisualStateManager sharedManager] setLeftDrawerAnimationType:indexPath.row];
}
else {
[[MMExampleDrawerVisualStateManager sharedManager] setRightDrawerAnimationType:indexPath.row];
}
[tableView reloadSections:[NSIndexSet indexSetWithIndex:indexPath.section] withRowAnimation:UITableViewRowAnimationNone];
[tableView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
[tableView deselectRowAtIndexPath:indexPath animated:YES];
break;
}
case MMCenterViewControllerSectionLeftViewState:
case MMCenterViewControllerSectionRightViewState:{
UIViewController * sideDrawerViewController;
MMDrawerSide drawerSide = MMDrawerSideNone;
if(indexPath.section == MMCenterViewControllerSectionLeftViewState){
sideDrawerViewController = self.mm_drawerController.leftDrawerViewController;
drawerSide = MMDrawerSideLeft;
}
else if(indexPath.section == MMCenterViewControllerSectionRightViewState){
sideDrawerViewController = self.mm_drawerController.rightDrawerViewController;
drawerSide = MMDrawerSideRight;
}
if(sideDrawerViewController){
[self.mm_drawerController
closeDrawerAnimated:YES
completion:^(BOOL finished) {
if(drawerSide == MMDrawerSideLeft){
[self.mm_drawerController setLeftDrawerViewController:nil];
[self.navigationItem setLeftBarButtonItems:nil animated:YES];
}
else if(drawerSide == MMDrawerSideRight){
[self.mm_drawerController setRightDrawerViewController:nil];
[self.navigationItem setRightBarButtonItem:nil animated:YES];
}
[tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone];
[tableView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}];
}
else {
if(drawerSide == MMDrawerSideLeft){
UIViewController * vc = [[MMExampleLeftSideDrawerViewController alloc] init];
UINavigationController * navC = [[MMNavigationController alloc] initWithRootViewController:vc];
[self.mm_drawerController setLeftDrawerViewController:navC];
[self setupLeftMenuButton];
}
else if(drawerSide == MMDrawerSideRight){
UIViewController * vc = [[MMExampleRightSideDrawerViewController alloc] init];
UINavigationController * navC = [[MMNavigationController alloc] initWithRootViewController:vc];
[self.mm_drawerController setRightDrawerViewController:navC];
[self setupRightMenuButton];
}
[tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone];
[tableView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}
break;
}
default:
break;
}
}
#pragma mark - Button Handlers
-(void)leftDrawerButtonPress:(id)sender{
[self.mm_drawerController toggleDrawerSide:MMDrawerSideLeft animated:YES completion:nil];
}
-(void)rightDrawerButtonPress:(id)sender{
[self.mm_drawerController toggleDrawerSide:MMDrawerSideRight animated:YES completion:nil];
}
-(void)doubleTap:(UITapGestureRecognizer*)gesture{
[self.mm_drawerController bouncePreviewForDrawerSide:MMDrawerSideLeft completion:nil];
}
-(void)twoFingerDoubleTap:(UITapGestureRecognizer*)gesture{
[self.mm_drawerController bouncePreviewForDrawerSide:MMDrawerSideRight completion:nil];
}
@end
================================================
FILE: KitchenSink/ExampleFiles/MMExampleDrawerVisualStateManager.h
================================================
// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import <Foundation/Foundation.h>
#import "MMDrawerVisualState.h"
typedef NS_ENUM(NSInteger, MMDrawerAnimationType){
MMDrawerAnimationTypeNone,
MMDrawerAnimationTypeSlide,
MMDrawerAnimationTypeSlideAndScale,
MMDrawerAnimationTypeSwingingDoor,
MMDrawerAnimationTypeParallax,
};
@interface MMExampleDrawerVisualStateManager : NSObject
@property (nonatomic,assign) MMDrawerAnimationType leftDrawerAnimationType;
@property (nonatomic,assign) MMDrawerAnimationType rightDrawerAnimationType;
+ (MMExampleDrawerVisualStateManager *)sharedManager;
-(MMDrawerControllerDrawerVisualStateBlock)drawerVisualStateBlockForDrawerSide:(MMDrawerSide)drawerSide;
@end
================================================
FILE: KitchenSink/ExampleFiles/MMExampleDrawerVisualStateManager.m
================================================
// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import "MMExampleDrawerVisualStateManager.h"
#import <QuartzCore/QuartzCore.h>
@implementation MMExampleDrawerVisualStateManager
+ (MMExampleDrawerVisualStateManager *)sharedManager {
static MMExampleDrawerVisualStateManager *_sharedManager = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
_sharedManager = [[MMExampleDrawerVisualStateManager alloc] init];
[_sharedManager setLeftDrawerAnimationType:MMDrawerAnimationTypeParallax];
[_sharedManager setRightDrawerAnimationType:MMDrawerAnimationTypeParallax];
});
return _sharedManager;
}
-(MMDrawerControllerDrawerVisualStateBlock)drawerVisualStateBlockForDrawerSide:(MMDrawerSide)drawerSide{
MMDrawerAnimationType animationType;
if(drawerSide == MMDrawerSideLeft){
animationType = self.leftDrawerAnimationType;
}
else {
animationType = self.rightDrawerAnimationType;
}
MMDrawerControllerDrawerVisualStateBlock visualStateBlock = nil;
switch (animationType) {
case MMDrawerAnimationTypeSlide:
visualStateBlock = [MMDrawerVisualState slideVisualStateBlock];
break;
case MMDrawerAnimationTypeSlideAndScale:
visualStateBlock = [MMDrawerVisualState slideAndScaleVisualStateBlock];
break;
case MMDrawerAnimationTypeParallax:
visualStateBlock = [MMDrawerVisualState parallaxVisualStateBlockWithParallaxFactor:2.0];
break;
case MMDrawerAnimationTypeSwingingDoor:
visualStateBlock = [MMDrawerVisualState swingingDoorVisualStateBlock];
break;
default:
visualStateBlock = ^(MMDrawerController * drawerController, MMDrawerSide drawerSide, CGFloat percentVisible){
UIViewController * sideDrawerViewController;
CATransform3D transform;
CGFloat maxDrawerWidth;
if(drawerSide == MMDrawerSideLeft){
sideDrawerViewController = drawerController.leftDrawerViewController;
maxDrawerWidth = drawerController.maximumLeftDrawerWidth;
}
else if(drawerSide == MMDrawerSideRight){
sideDrawerViewController = drawerController.rightDrawerViewController;
maxDrawerWidth = drawerController.maximumRightDrawerWidth;
}
if(percentVisible > 1.0){
transform = CATransform3DMakeScale(percentVisible, 1.f, 1.f);
if(drawerSide == MMDrawerSideLeft){
transform = CATransform3DTranslate(transform, maxDrawerWidth*(percentVisible-1.f)/2, 0.f, 0.f);
}else if(drawerSide == MMDrawerSideRight){
transform = CATransform3DTranslate(transform, -maxDrawerWidth*(percentVisible-1.f)/2, 0.f, 0.f);
}
}
else {
transform = CATransform3DIdentity;
}
[sideDrawerViewController.view.layer setTransform:transform];
};
break;
}
return visualStateBlock;
}
@end
================================================
FILE: KitchenSink/ExampleFiles/MMExampleLeftSideDrawerViewController.h
================================================
// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import "MMExampleSideDrawerViewController.h"
@interface MMExampleLeftSideDrawerViewController : MMExampleSideDrawerViewController
@end
================================================
FILE: KitchenSink/ExampleFiles/MMExampleLeftSideDrawerViewController.m
================================================
// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import "MMExampleLeftSideDrawerViewController.h"
#import "MMTableViewCell.h"
@interface MMExampleLeftSideDrawerViewController ()
@end
@implementation MMExampleLeftSideDrawerViewController
-(id)init{
self = [super init];
if(self){
[self setRestorationIdentifier:@"MMExampleLeftSideDrawerController"];
}
return self;
}
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
NSLog(@"Left will appear");
}
-(void)viewDidAppear:(BOOL)animated{
[super viewDidAppear:animated];
NSLog(@"Left did appear");
}
-(void)viewWillDisappear:(BOOL)animated{
[super viewWillDisappear:animated];
NSLog(@"Left will disappear");
}
-(void)viewDidDisappear:(BOOL)animated{
[super viewDidDisappear:animated];
NSLog(@"Left did disappear");
}
-(void)viewDidLoad{
[super viewDidLoad];
[self setTitle:@"Left Drawer"];
}
-(NSString*)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section{
if(section == MMDrawerSectionDrawerWidth)
return @"Left Drawer Width";
else
return [super tableView:tableView titleForHeaderInSection:section];
}
-(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
UITableViewCell * cell = [super tableView:tableView cellForRowAtIndexPath:indexPath];
if(indexPath.section == MMDrawerSectionDrawerWidth){
CGFloat width = [self.drawerWidths[indexPath.row] intValue];
CGFloat drawerWidth = self.mm_drawerController.maximumLeftDrawerWidth;
if(drawerWidth == width){
[cell setAccessoryType:UITableViewCellAccessoryCheckmark];
}
else{
[cell setAccessoryType:UITableViewCellAccessoryNone];
}
[cell.textLabel setText:[NSString stringWithFormat:@"Width %d",[self.drawerWidths[indexPath.row] intValue]]];
}
return cell;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
if(indexPath.section == MMDrawerSectionDrawerWidth){
[self.mm_drawerController
setMaximumLeftDrawerWidth:[self.drawerWidths[indexPath.row] floatValue]
animated:YES
completion:^(BOOL finished) {
[tableView reloadSections:[NSIndexSet indexSetWithIndex:indexPath.section] withRowAnimation:UITableViewRowAnimationNone];
[tableView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}];
}
else {
[super tableView:tableView didSelectRowAtIndexPath:indexPath];
}
}
@end
================================================
FILE: KitchenSink/ExampleFiles/MMExampleRightSideDrawerViewController.h
================================================
// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import "MMExampleSideDrawerViewController.h"
@interface MMExampleRightSideDrawerViewController : MMExampleSideDrawerViewController
@end
================================================
FILE: KitchenSink/ExampleFiles/MMExampleRightSideDrawerViewController.m
================================================
// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import "MMExampleRightSideDrawerViewController.h"
@interface MMExampleRightSideDrawerViewController ()
@end
@implementation MMExampleRightSideDrawerViewController
-(id)init{
self = [super init];
if(self){
[self setRestorationIdentifier:@"MMExampleRightSideDrawerController"];
}
return self;
}
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
NSLog(@"Right will appear");
}
-(void)viewDidAppear:(BOOL)animated{
[super viewDidAppear:animated];
NSLog(@"Right did appear");
}
-(void)viewWillDisappear:(BOOL)animated{
[super viewWillDisappear:animated];
NSLog(@"Right will disappear");
}
-(void)viewDidDisappear:(BOOL)animated{
[super viewDidDisappear:animated];
NSLog(@"Right did disappear");
}
-(void)viewDidLoad{
[super viewDidLoad];
[self setTitle:@"Right Drawer"];
}
-(NSString*)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section{
if(section == MMDrawerSectionDrawerWidth)
return @"Right Drawer Width";
else
return [super tableView:tableView titleForHeaderInSection:section];
}
-(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
UITableViewCell * cell = [super tableView:tableView cellForRowAtIndexPath:indexPath];
if(indexPath.section == MMDrawerSectionDrawerWidth){
CGFloat width = [self.drawerWidths[indexPath.row] intValue];
CGFloat drawerWidth = self.mm_drawerController.maximumRightDrawerWidth;
if(drawerWidth == width)
[cell setAccessoryType:UITableViewCellAccessoryCheckmark];
else
[cell setAccessoryType:UITableViewCellAccessoryNone];
[cell.textLabel setText:[NSString stringWithFormat:@"Width %d",[self.drawerWidths[indexPath.row] intValue]]];
}
return cell;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
if(indexPath.section == MMDrawerSectionDrawerWidth){
[self.mm_drawerController
setMaximumRightDrawerWidth:[self.drawerWidths[indexPath.row] floatValue]
animated:YES
completion:^(BOOL finished) {
[tableView reloadSections:[NSIndexSet indexSetWithIndex:indexPath.section] withRowAnimation:UITableViewRowAnimationNone];
[tableView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}];
}
else {
[super tableView:tableView didSelectRowAtIndexPath:indexPath];
}
}
@end
================================================
FILE: KitchenSink/ExampleFiles/MMExampleSideDrawerViewController.h
================================================
// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import <UIKit/UIKit.h>
#import "UIViewController+MMDrawerController.h"
#import "MMExampleViewController.h"
typedef NS_ENUM(NSInteger, MMDrawerSection){
MMDrawerSectionViewSelection,
MMDrawerSectionDrawerWidth,
MMDrawerSectionShadowToggle,
MMDrawerSectionOpenDrawerGestures,
MMDrawerSectionCloseDrawerGestures,
MMDrawerSectionCenterHiddenInteraction,
MMDrawerSectionStretchDrawer,
};
@interface MMExampleSideDrawerViewController : MMExampleViewController <UITableViewDataSource,UITableViewDelegate>
@property (nonatomic, strong) UITableView * tableView;
@property (nonatomic,strong) NSArray * drawerWidths;
@end
================================================
FILE: KitchenSink/ExampleFiles/MMExampleSideDrawerViewController.m
================================================
// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import "MMExampleSideDrawerViewController.h"
#import "MMExampleCenterTableViewController.h"
#import "MMSideDrawerTableViewCell.h"
#import "MMSideDrawerSectionHeaderView.h"
#import "MMLogoView.h"
#import "MMNavigationController.h"
@implementation MMExampleSideDrawerViewController
- (void)viewDidLoad
{
[super viewDidLoad];
_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;
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];
[self.view setBackgroundColor:[UIColor colorWithRed:66.0/255.0
green:69.0/255.0
blue:71.0/255.0
alpha:1.0]];
UIColor * barColor = [UIColor colorWithRed:161.0/255.0
green:164.0/255.0
blue:166.0/255.0
alpha:1.0];
if([self.navigationController.navigationBar respondsToSelector:@selector(setBarTintColor:)]){
[self.navigationController.navigationBar setBarTintColor:barColor];
}
else {
[self.navigationController.navigationBar setTintColor:barColor];
}
NSDictionary *navBarTitleDict;
UIColor * titleColor = [UIColor colorWithRed:55.0/255.0
green:70.0/255.0
blue:77.0/255.0
alpha:1.0];
navBarTitleDict = @{NSForegroundColorAttributeName:titleColor};
[self.navigationController.navigationBar setTitleTextAttributes:navBarTitleDict];
self.drawerWidths = @[@(160),@(200),@(240),@(280),@(320)];
CGSize logoSize = CGSizeMake(58, 62);
MMLogoView * logo = [[MMLogoView alloc] initWithFrame:CGRectMake(CGRectGetMidX(self.tableView.bounds)-logoSize.width/2.0,
-logoSize.height-logoSize.height/4.0,
logoSize.width,
logoSize.height)];
[logo setAutoresizingMask:UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleRightMargin];
[self.tableView addSubview:logo];
[self.view setBackgroundColor:[UIColor clearColor]];
}
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[self.tableView reloadSections:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, self.tableView.numberOfSections-1)] withRowAnimation:UITableViewRowAnimationNone];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
-(void)contentSizeDidChange:(NSString *)size{
[self.tableView reloadData];
}
#pragma mark - Table view data source
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
// Return the number of sections.
return 7;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
// Return the number of rows in the section.
switch (section) {
case MMDrawerSectionViewSelection:
return 2;
case MMDrawerSectionDrawerWidth:
return self.drawerWidths.count;
case MMDrawerSectionShadowToggle:
return 1;
case MMDrawerSectionOpenDrawerGestures:
return 3;
case MMDrawerSectionCloseDrawerGestures:
return 6;
case MMDrawerSectionCenterHiddenInteraction:
return 3;
case MMDrawerSectionStretchDrawer:
return 1;
default:
return 0;
}
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = (UITableViewCell*)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[MMSideDrawerTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
[cell setSelectionStyle:UITableViewCellSelectionStyleBlue];
}
switch (indexPath.section) {
case MMDrawerSectionViewSelection:
if(indexPath.row == 0){
[cell.textLabel setText:@"Quick View Change"];
}
else {
[cell.textLabel setText:@"Full View Change"];
}
[cell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator];
break;
case MMDrawerSectionDrawerWidth:{
//Implement in Subclass
break;
}
case MMDrawerSectionShadowToggle:{
[cell.textLabel setText:@"Show Shadow"];
if(self.mm_drawerController.showsShadow)
[cell setAccessoryType:UITableViewCellAccessoryCheckmark];
else
[cell setAccessoryType:UITableViewCellAccessoryNone];
break;
}
case MMDrawerSectionOpenDrawerGestures:{
switch (indexPath.row) {
case 0:
[cell.textLabel setText:@"Pan Nav Bar"];
if((self.mm_drawerController.openDrawerGestureModeMask&MMOpenDrawerGestureModePanningNavigationBar)>0)
[cell setAccessoryType:UITableViewCellAccessoryCheckmark];
else
[cell setAccessoryType:UITableViewCellAccessoryNone];
break;
case 1:
[cell.textLabel setText:@"Pan Center View"];
if((self.mm_drawerController.openDrawerGestureModeMask&MMOpenDrawerGestureModePanningCenterView)>0)
[cell setAccessoryType:UITableViewCellAccessoryCheckmark];
else
[cell setAccessoryType:UITableViewCellAccessoryNone];
break;
case 2:
[cell.textLabel setText:@"Bezel Pan Center View"];
if((self.mm_drawerController.openDrawerGestureModeMask&MMOpenDrawerGestureModeBezelPanningCenterView)>0)
[cell setAccessoryType:UITableViewCellAccessoryCheckmark];
else
[cell setAccessoryType:UITableViewCellAccessoryNone];
break;
default:
break;
}
break;
}
case MMDrawerSectionCloseDrawerGestures:{
switch (indexPath.row) {
case 0:
[cell.textLabel setText:@"Pan Nav Bar"];
if((self.mm_drawerController.closeDrawerGestureModeMask&MMCloseDrawerGestureModePanningNavigationBar)>0)
[cell setAccessoryType:UITableViewCellAccessoryCheckmark];
else
[cell setAccessoryType:UITableViewCellAccessoryNone];
break;
case 1:
[cell.textLabel setText:@"Pan Center View"];
if((self.mm_drawerController.closeDrawerGestureModeMask&MMCloseDrawerGestureModePanningCenterView)>0)
[cell setAccessoryType:UITableViewCellAccessoryCheckmark];
else
[cell setAccessoryType:UITableViewCellAccessoryNone];
break;
case 2:
[cell.textLabel setText:@"Bezel Pan Center View"];
if((self.mm_drawerController.closeDrawerGestureModeMask&MMCloseDrawerGestureModeBezelPanningCenterView)>0)
[cell setAccessoryType:UITableViewCellAccessoryCheckmark];
else
[cell setAccessoryType:UITableViewCellAccessoryNone];
break;
case 3:
[cell.textLabel setText:@"Tap Nav Bar"];
if((self.mm_drawerController.closeDrawerGestureModeMask&MMCloseDrawerGestureModeTapNavigationBar)>0)
[cell setAccessoryType:UITableViewCellAccessoryCheckmark];
else
[cell setAccessoryType:UITableViewCellAccessoryNone];
break;
case 4:
[cell.textLabel setText:@"Tap Center View"];
if((self.mm_drawerController.closeDrawerGestureModeMask&MMCloseDrawerGestureModeTapCenterView)>0)
[cell setAccessoryType:UITableViewCellAccessoryCheckmark];
else
[cell setAccessoryType:UITableViewCellAccessoryNone];
break;
case 5:
[cell.textLabel setText:@"Pan Drawer View"];
if((self.mm_drawerController.closeDrawerGestureModeMask&MMCloseDrawerGestureModePanningDrawerView)>0)
[cell setAccessoryType:UITableViewCellAccessoryCheckmark];
else
[cell setAccessoryType:UITableViewCellAccessoryNone];
break;
default:
break;
}
break;
}
case MMDrawerSectionCenterHiddenInteraction:{
[cell setSelectionStyle:UITableViewCellSelectionStyleBlue];
switch (indexPath.row) {
case 0:
[cell.textLabel setText:@"None"];
if(self.mm_drawerController.centerHiddenInteractionMode == MMDrawerOpenCenterInteractionModeNone)
[cell setAccessoryType:UITableViewCellAccessoryCheckmark];
else
[cell setAccessoryType:UITableViewCellAccessoryNone];
break;
case 1:
[cell.textLabel setText:@"Full"];
if(self.mm_drawerController.centerHiddenInteractionMode == MMDrawerOpenCenterInteractionModeFull)
[cell setAccessoryType:UITableViewCellAccessoryCheckmark];
else
[cell setAccessoryType:UITableViewCellAccessoryNone];
break;
case 2:
[cell.textLabel setText:@"Nav Bar Only"];
if(self.mm_drawerController.centerHiddenInteractionMode == MMDrawerOpenCenterInteractionModeNavigationBarOnly)
[cell setAccessoryType:UITableViewCellAccessoryCheckmark];
else
[cell setAccessoryType:UITableViewCellAccessoryNone];
break;
default:
break;
}
break;
}
case MMDrawerSectionStretchDrawer:{
[cell.textLabel setText:@"Stretch Drawer"];
if(self.mm_drawerController.shouldStretchDrawer)
[cell setAccessoryType:UITableViewCellAccessoryCheckmark];
else
[cell setAccessoryType:UITableViewCellAccessoryNone];
break;
}
default:
break;
}
return cell;
}
-(NSString*)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section{
switch (section) {
case MMDrawerSectionViewSelection:
return @"New Center View";
case MMDrawerSectionDrawerWidth:
return @"Drawer Width";
case MMDrawerSectionShadowToggle:
return @"Shadow";
case MMDrawerSectionOpenDrawerGestures:
return @"Drawer Open Gestures";
case MMDrawerSectionCloseDrawerGestures:
return @"Drawer Close Gestures";
case MMDrawerSectionCenterHiddenInteraction:
return @"Open Center Interaction Mode";
case MMDrawerSectionStretchDrawer:
return @"Strech Drawer";
default:
return nil;
}
}
-(UIView*)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
MMSideDrawerSectionHeaderView * headerView;
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{
return 56.0;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
return 40.0;
}
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
return 0.0;
}
#pragma mark - Table view delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
switch (indexPath.section) {
case MMDrawerSectionViewSelection:{
MMExampleCenterTableViewController * center = [[MMExampleCenterTableViewController alloc] init];
UINavigationController * nav = [[MMNavigationController alloc] initWithRootViewController:center];
if(indexPath.row%2==0){
[self.mm_drawerController
setCenterViewController:nav
withCloseAnimation:YES
completion:nil];
}
else {
[self.mm_drawerController
setCenterViewController:nav
withFullCloseAnimation:YES
completion:nil];
}
break;
}
case MMDrawerSectionDrawerWidth:{
//Implement in Subclass
break;
}
case MMDrawerSectionShadowToggle:{
[self.mm_drawerController setShowsShadow:!self.mm_drawerController.showsShadow];
[tableView reloadSections:[NSIndexSet indexSetWithIndex:indexPath.section] withRowAnimation:UITableViewRowAnimationNone];
break;
}
case MMDrawerSectionOpenDrawerGestures:{
switch (indexPath.row) {
case 0:
self.mm_drawerController.openDrawerGestureModeMask ^= MMOpenDrawerGestureModePanningNavigationBar;
break;
case 1:
self.mm_drawerController.openDrawerGestureModeMask ^= MMOpenDrawerGestureModePanningCenterView;
break;
case 2:
self.mm_drawerController.openDrawerGestureModeMask ^= MMOpenDrawerGestureModeBezelPanningCenterView;
break;
default:
break;
}
[tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone];
break;
}
case MMDrawerSectionCloseDrawerGestures:{
switch (indexPath.row) {
case 0:
self.mm_drawerController.closeDrawerGestureModeMask ^= MMCloseDrawerGestureModePanningNavigationBar;
break;
case 1:
self.mm_drawerController.closeDrawerGestureModeMask ^= MMCloseDrawerGestureModePanningCenterView;
break;
case 2:
self.mm_drawerController.closeDrawerGestureModeMask ^= MMCloseDrawerGestureModeBezelPanningCenterView;
break;
case 3:
self.mm_drawerController.closeDrawerGestureModeMask ^= MMCloseDrawerGestureModeTapNavigationBar;
break;
case 4:
self.mm_drawerController.closeDrawerGestureModeMask ^= MMCloseDrawerGestureModeTapCenterView;
break;
case 5:
self.mm_drawerController.closeDrawerGestureModeMask ^= MMCloseDrawerGestureModePanningDrawerView;
break;
default:
break;
}
[tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone];
break;
}
case MMDrawerSectionCenterHiddenInteraction:{
self.mm_drawerController.centerHiddenInteractionMode = indexPath.row;
[tableView reloadSections:[NSIndexSet indexSetWithIndex:indexPath.section] withRowAnimation:UITableViewRowAnimationNone];
break;
}
case MMDrawerSectionStretchDrawer:{
self.mm_drawerController.shouldStretchDrawer = !self.mm_drawerController.shouldStretchDrawer;
[tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone];
break;
}
default:
break;
}
[tableView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}
@end
================================================
FILE: KitchenSink/ExampleFiles/MMExampleViewController.h
================================================
// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import <UIKit/UIKit.h>
@interface MMExampleViewController : UIViewController
-(void)contentSizeDidChange:(NSString*)size;
@end
================================================
FILE: KitchenSink/ExampleFiles/MMExampleViewController.m
================================================
// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import "MMExampleViewController.h"
@interface MMExampleViewController ()
@end
@implementation MMExampleViewController
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(contentSizeDidChangeNotification:)
name:UIContentSizeCategoryDidChangeNotification
object:nil];
}
- (void)dealloc{
[[NSNotificationCenter defaultCenter]
removeObserver:self];
}
-(void)contentSizeDidChangeNotification:(NSNotification*)notification{
[self contentSizeDidChange:notification.userInfo[UIContentSizeCategoryNewValueKey]];
}
-(void)contentSizeDidChange:(NSString *)size{
//Implement in subclass
}
@end
================================================
FILE: KitchenSink/ExampleFiles/MMLogoView.h
================================================
// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import <UIKit/UIKit.h>
@interface MMLogoView : UIView
@end
================================================
FILE: KitchenSink/ExampleFiles/MMLogoView.m
================================================
// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import "MMLogoView.h"
@implementation MMLogoView
-(id)initWithFrame:(CGRect)frame{
self = [super initWithFrame:frame];
if(self) {
[self setBackgroundColor:[UIColor clearColor]];
}
return self;
}
-(void)drawRect:(CGRect)rect{
//// General Declarations
CGContextRef context = UIGraphicsGetCurrentContext();
//// Color Declarations
UIColor* mmFill = [UIColor colorWithRed: 0 green: 0 blue: 0 alpha: 0.196];
UIColor* shape1DropShadowColor = [UIColor colorWithRed: 1 green: 1 blue: 1 alpha: 0.4];
UIColor* shape1InnerShadowColor = [UIColor colorWithRed: 0 green: 0 blue: 0 alpha: 0.392];
//// Shadow Declarations
UIColor* mmDropShadow = shape1DropShadowColor;
CGSize mmDropShadowOffset = CGSizeMake(0.1, 1.1);
CGFloat mmDropShadowBlurRadius = 0;
UIColor* mmInnerShadow = shape1InnerShadowColor;
CGSize mmInnerShadowOffset = CGSizeMake(0.1, 1.1);
CGFloat mmInnerShadowBlurRadius = 0;
//// Frames
CGRect frame = self.bounds;
//// mmGroup
{
//// mmShape Drawing
UIBezierPath* mmShapePath = [UIBezierPath bezierPath];
[mmShapePath moveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.51759 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.96761 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.37558 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.91398 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.46395 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.96761 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.41351 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.94854 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.31759 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.76824 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.33346 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.87556 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.31234 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.82249 * CGRectGetHeight(frame))];
[mmShapePath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.31904 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.75325 * CGRectGetHeight(frame))];
[mmShapePath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.30262 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.75459 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.28470 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.75535 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.29666 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.75510 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.29065 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.75535 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.14274 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.70173 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.23106 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.75535 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.18067 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.73625 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.14274 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.44291 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.06451 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.63038 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.06451 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.51425 * CGRectGetHeight(frame))];
[mmShapePath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.45528 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.15799 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.48085 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.14832 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.46207 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.15176 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.47120 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.14832 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.50639 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.15799 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.49051 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.14832 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.49957 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.15176 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.50639 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.20462 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.52050 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.17087 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.52050 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.19177 * CGRectGetHeight(frame))];
[mmShapePath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.19390 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.48951 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.19386 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.65510 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.14397 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.53518 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.14397 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.60942 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.28476 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.68936 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.21821 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.67720 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.25047 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.68936 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.37557 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.65514 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.31904 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.68936 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.35128 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.67720 * CGRectGetHeight(frame))];
[mmShapePath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.68812 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.37025 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.71365 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.36056 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.69491 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.36401 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.70403 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.36056 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.73923 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.37025 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.72332 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.36056 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.73241 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.36401 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.73923 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.41681 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.75333 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.38310 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.75333 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.40399 * CGRectGetHeight(frame))];
[mmShapePath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.42673 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.70173 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.42670 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.86737 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.37681 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.74744 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.37681 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.82172 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.51759 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.90159 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.45104 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.88944 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.48328 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.90159 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.60840 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.86743 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.55183 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.90159 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.58413 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.88944 * CGRectGetHeight(frame))];
[mmShapePath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.92092 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.58246 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.94646 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.57284 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.92773 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.57623 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.93682 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.57284 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.97208 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.58246 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.95617 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.57284 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.96523 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.57623 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.97208 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.62912 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.98615 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.59535 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.98615 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.61626 * CGRectGetHeight(frame))];
[mmShapePath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.65956 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.91398 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.51759 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.96761 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.62160 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.94854 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.57117 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.96761 * CGRectGetHeight(frame))];
[mmShapePath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.51759 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.96761 * CGRectGetHeight(frame))];
[mmShapePath closePath];
[mmShapePath moveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.51965 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.81940 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.49408 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.80982 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.50999 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.81940 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.50091 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.81600 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.49408 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.76313 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.48000 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.79686 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.48000 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.77600 * CGRectGetHeight(frame))];
[mmShapePath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.80659 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.47824 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.80662 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.31264 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.85650 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.43259 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.85650 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.35831 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.71574 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.27840 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.78226 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.29053 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.75001 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.27840 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.62493 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.31260 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.68146 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.27840 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.64921 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.29053 * CGRectGetHeight(frame))];
[mmShapePath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.31239 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.59752 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.28684 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.60718 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.30556 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.60378 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.29644 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.60718 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.26125 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.59752 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.27718 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.60718 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.26808 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.60378 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.26125 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.55093 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.24715 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.58467 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.24715 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.56377 * CGRectGetHeight(frame))];
[mmShapePath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.57377 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.26601 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.57380 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.10041 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.62368 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.22029 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.62368 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.14606 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.48291 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.06617 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.54946 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.07832 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.51721 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.06617 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.39208 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.10040 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.44863 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.06617 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.41637 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.07832 * CGRectGetHeight(frame))];
[mmShapePath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.07956 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.38530 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.05400 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.39496 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.07274 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.39149 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.06365 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.39496 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.02841 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.38530 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.04434 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.39496 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.03525 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.39149 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.02841 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.33867 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.01434 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.37241 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.01434 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.35151 * CGRectGetHeight(frame))];
[mmShapePath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.34095 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.05378 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.48291 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.00013 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.37888 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.01919 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.42931 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.00013 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.62491 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.05378 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.53657 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.00013 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.58700 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.01919 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.68292 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.19950 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.66705 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.09219 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.68815 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.14529 * CGRectGetHeight(frame))];
[mmShapePath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.68143 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.21454 * CGRectGetHeight(frame))];
[mmShapePath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.69786 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.21318 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.71580 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.21244 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.70379 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.21269 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.70984 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.21244 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.85774 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.26604 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.76941 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.21244 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.81981 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.23147 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.85774 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.52485 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.93599 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.33738 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.93599 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.45349 * CGRectGetHeight(frame))];
[mmShapePath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.54521 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.80977 * CGRectGetHeight(frame))];
[mmShapePath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.51965 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.81940 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.53840 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.81600 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.52930 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.81940 * CGRectGetHeight(frame))];
[mmShapePath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.51965 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.81940 * CGRectGetHeight(frame))];
[mmShapePath closePath];
CGContextSaveGState(context);
CGContextSetShadowWithColor(context, mmDropShadowOffset, mmDropShadowBlurRadius, mmDropShadow.CGColor);
CGContextSetBlendMode(context, kCGBlendModeOverlay);
[mmFill setFill];
[mmShapePath fill];
////// mmShape Inner Shadow
CGRect mmShapeBorderRect = CGRectInset([mmShapePath bounds], -mmInnerShadowBlurRadius, -mmInnerShadowBlurRadius);
mmShapeBorderRect = CGRectOffset(mmShapeBorderRect, -mmInnerShadowOffset.width, -mmInnerShadowOffset.height);
mmShapeBorderRect = CGRectInset(CGRectUnion(mmShapeBorderRect, [mmShapePath bounds]), -1, -1);
UIBezierPath* mmShapeNegativePath = [UIBezierPath bezierPathWithRect: mmShapeBorderRect];
[mmShapeNegativePath appendPath: mmShapePath];
mmShapeNegativePath.usesEvenOddFillRule = YES;
CGContextSaveGState(context);
{
CGFloat xOffset = mmInnerShadowOffset.width + round(mmShapeBorderRect.size.width);
CGFloat yOffset = mmInnerShadowOffset.height;
CGContextSetShadowWithColor(context,
CGSizeMake(xOffset + copysign(0.1, xOffset), yOffset + copysign(0.1, yOffset)),
mmInnerShadowBlurRadius,
mmInnerShadow.CGColor);
[mmShapePath addClip];
CGAffineTransform transform = CGAffineTransformMakeTranslation(-round(mmShapeBorderRect.size.width), 0);
[mmShapeNegativePath applyTransform: transform];
[[UIColor grayColor] setFill];
[mmShapeNegativePath fill];
}
CGContextRestoreGState(context);
CGContextRestoreGState(context);
}
}
@end
================================================
FILE: KitchenSink/ExampleFiles/MMNavigationController.h
================================================
// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import <UIKit/UIKit.h>
@interface MMNavigationController : UINavigationController
@end
================================================
FILE: KitchenSink/ExampleFiles/MMNavigationController.m
================================================
// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import "MMNavigationController.h"
#import "UIViewController+MMDrawerController.h"
@interface MMNavigationController ()
@end
@implementation MMNavigationController
-(UIStatusBarStyle)preferredStatusBarStyle{
if(self.mm_drawerController.showsStatusBarBackgroundView){
return UIStatusBarStyleLightContent;
}
else {
return UIStatusBarStyleDefault;
}
}
@end
================================================
FILE: KitchenSink/ExampleFiles/MMSideDrawerSectionHeaderView.h
================================================
// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import <UIKit/UIKit.h>
@interface MMSideDrawerSectionHeaderView : UIView
@property (nonatomic, copy) NSString * title;
@end
================================================
FILE: KitchenSink/ExampleFiles/MMSideDrawerSectionHeaderView.m
================================================
// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import "MMSideDrawerSectionHeaderView.h"
#import <QuartzCore/QuartzCore.h>
@interface MMSideDrawerSectionHeaderView ()
@property (nonatomic, strong) UILabel * label;
@end
@implementation MMSideDrawerSectionHeaderView
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
// Initialization code
[self setBackgroundColor:[UIColor colorWithRed:110./255.0
green:113.0/255.0
blue:115.0/255.0
alpha:1.0]];
_label = [[UILabel alloc] initWithFrame:CGRectMake(15, CGRectGetMaxY(self.bounds)-28,CGRectGetWidth(self.bounds)-30, 22)];
if([[UIFont class] respondsToSelector:@selector(preferredFontForTextStyle:)]){
[self.label setFont:[UIFont preferredFontForTextStyle:UIFontTextStyleCaption1]];
}
else {
[self.label setFont:[UIFont boldSystemFontOfSize:12.0]];
}
[self.label setBackgroundColor:[UIColor clearColor]];
[self.label setTextColor:[UIColor colorWithRed:203.0/255.0
green:206.0/255.0
blue:209.0/255.0
alpha:1.0]];
[self.label setAutoresizingMask:UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleTopMargin];
[self addSubview:self.label];
[self setClipsToBounds:NO];
}
return self;
}
-(void)setTitle:(NSString *)title{
_title = title;
[self.label setText:[self.title uppercaseString]];
}
-(void)drawRect:(CGRect)rect{
//// General Declarations
CGContextRef context = UIGraphicsGetCurrentContext();
UIColor * lineColor = [UIColor colorWithRed:94.0/255.0
green:97.0/255.0
blue:99.0/255.0
alpha:1.0];
CGContextSetStrokeColorWithColor(context, lineColor.CGColor);
CGContextSetLineWidth(context, 1.0);
CGContextMoveToPoint(context, CGRectGetMinX(self.bounds), CGRectGetMaxY(self.bounds)-.5); //start at this point
CGContextAddLineToPoint(context, CGRectGetMaxX(self.bounds), CGRectGetMaxY(self.bounds)-.5); //draw to this point
CGContextStrokePath(context);
}
@end
================================================
FILE: KitchenSink/ExampleFiles/MMSideDrawerTableViewCell.h
================================================
// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import "MMTableViewCell.h"
@interface MMSideDrawerTableViewCell : MMTableViewCell
@end
================================================
FILE: KitchenSink/ExampleFiles/MMSideDrawerTableViewCell.m
================================================
// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import "MMSideDrawerTableViewCell.h"
@implementation MMSideDrawerTableViewCell
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
[self setAccessoryCheckmarkColor:[UIColor whiteColor]];
UIView * backgroundView = [[UIView alloc] initWithFrame:self.bounds];
[backgroundView setAutoresizingMask:UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth];
UIColor * backgroundColor;
backgroundColor = [UIColor colorWithRed:122.0/255.0
green:126.0/255.0
blue:128.0/255.0
alpha:1.0];
[backgroundView setBackgroundColor:backgroundColor];
[self setBackgroundView:backgroundView];
[self.textLabel setBackgroundColor:[UIColor clearColor]];
[self.textLabel setTextColor:[UIColor
colorWithRed:230.0/255.0
green:236.0/255.0
blue:242.0/255.0
alpha:1.0]];
}
return self;
}
-(void)updateContentForNewContentSize{
if([[UIFont class] respondsToSelector:@selector(preferredFontForTextStyle:)]){
[self.textLabel setFont:[UIFont preferredFontForTextStyle:UIFontTextStyleBody]];
}
else {
[self.textLabel setFont:[UIFont boldSystemFontOfSize:16.0]];
}
}
@end
================================================
FILE: KitchenSink/ExampleFiles/MMTableViewCell.h
================================================
// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import <UIKit/UIKit.h>
@interface MMTableViewCell : UITableViewCell
@property (nonatomic, strong) UIColor * accessoryCheckmarkColor;
@property (nonatomic, strong) UIColor * disclosureIndicatorColor;
-(void)updateContentForNewContentSize;
@end
================================================
FILE: KitchenSink/ExampleFiles/MMTableViewCell.m
================================================
// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import "MMTableViewCell.h"
@interface MMDisclosureIndicator : UIView
@property (nonatomic, strong) UIColor * color;
@end
@implementation MMDisclosureIndicator
-(id)initWithFrame:(CGRect)frame{
self = [super initWithFrame:frame];
if(self){
[self setBackgroundColor:[UIColor clearColor]];
[self setColor:[UIColor whiteColor]];
}
return self;
}
-(void)drawRect:(CGRect)rect{
//// General Declarations
CGContextRef context = UIGraphicsGetCurrentContext();
//// Color Declarations
UIColor* shadow;
shadow = [UIColor clearColor];
UIColor* chevronColor = self.color;
//// Shadow Declarations
CGSize shadowOffset = CGSizeMake(0.1, 1.1);
CGFloat shadowBlurRadius = 0;
//// Frames
CGRect frame = self.bounds;
//// chevron Drawing
UIBezierPath* chevronPath = [UIBezierPath bezierPath];
[chevronPath moveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.22000 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.01667 * CGRectGetHeight(frame))];
[chevronPath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.98000 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.48333 * CGRectGetHeight(frame))];
[chevronPath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.22000 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.98333 * CGRectGetHeight(frame))];
[chevronPath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.02000 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.81667 * CGRectGetHeight(frame))];
[chevronPath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.54000 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.48333 * CGRectGetHeight(frame))];
[chevronPath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.02000 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.15000 * CGRectGetHeight(frame))];
[chevronPath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.22000 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.01667 * CGRectGetHeight(frame))];
[chevronPath closePath];
CGContextSaveGState(context);
CGContextSetShadowWithColor(context, shadowOffset, shadowBlurRadius, shadow.CGColor);
[chevronColor setFill];
[chevronPath fill];
CGContextRestoreGState(context);
}
@end
@interface MMCustomCheckmark : UIControl
@property (nonatomic, strong) UIColor * color;
@end
@implementation MMCustomCheckmark
-(id)initWithFrame:(CGRect)frame{
self = [super initWithFrame:frame];
if(self) {
[self setBackgroundColor:[UIColor clearColor]];
[self setUserInteractionEnabled:NO];
}
return self;
}
-(void)drawRect:(CGRect)rect{
//// Color Declarations
UIColor* checkMarkColor = self.color;
//// Frames
CGRect frame = self.bounds;
//// checkMark Drawing
UIBezierPath* checkMarkPath = [UIBezierPath bezierPath];
[checkMarkPath moveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.07087 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.48855 * CGRectGetHeight(frame))];
[checkMarkPath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.12500 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.45284 * CGRectGetHeight(frame))];
[checkMarkPath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.21038 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.47898 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.15489 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.43312 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.19312 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.44482 * CGRectGetHeight(frame))];
[checkMarkPath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.51450 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.79528 * CGRectGetHeight(frame))];
[checkMarkPath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.49163 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.89286 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.53176 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.82945 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.52152 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.87313 * CGRectGetHeight(frame))];
[checkMarkPath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.38337 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.96429 * CGRectGetHeight(frame))];
[checkMarkPath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.29800 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.93814 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.35348 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.98401 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.31526 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.97230 * CGRectGetHeight(frame))];
[checkMarkPath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.04800 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.58613 * CGRectGetHeight(frame))];
[checkMarkPath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.07087 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.48855 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.03074 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.55196 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.04098 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.50828 * CGRectGetHeight(frame))];
[checkMarkPath closePath];
[checkMarkPath moveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.92048 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.00641 * CGRectGetHeight(frame))];
[checkMarkPath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.93750 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.02427 * CGRectGetHeight(frame))];
[checkMarkPath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.96038 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.12184 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.96739 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.04399 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.97764 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.08768 * CGRectGetHeight(frame))];
[checkMarkPath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.51450 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.93814 * CGRectGetHeight(frame))];
[checkMarkPath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.42913 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.96429 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.49724 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.97230 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.45902 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.98401 * CGRectGetHeight(frame))];
[checkMarkPath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.32087 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.89286 * CGRectGetHeight(frame))];
[checkMarkPath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.29800 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.79528 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.29098 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.87313 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.28074 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.82945 * CGRectGetHeight(frame))];
[checkMarkPath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.83511 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.03255 * CGRectGetHeight(frame))];
[checkMarkPath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.92048 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.00641 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.85237 * CGRectGetWidth(frame), CGRectGetMinY(frame) + -0.00161 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.89059 * CGRectGetWidth(frame), CGRectGetMinY(frame) + -0.01331 * CGRectGetHeight(frame))];
[checkMarkPath closePath];
[checkMarkPath moveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.37500 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.78572 * CGRectGetHeight(frame))];
[checkMarkPath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.43750 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.78572 * CGRectGetHeight(frame))];
[checkMarkPath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.50000 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.85714 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.47202 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.78572 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.50000 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.81769 * CGRectGetHeight(frame))];
[checkMarkPath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.50000 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.92857 * CGRectGetHeight(frame))];
[checkMarkPath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.43750 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 1.00000 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.50000 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.96802 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.47202 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 1.00000 * CGRectGetHeight(frame))];
[checkMarkPath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.37500 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 1.00000 * CGRectGetHeight(frame))];
[checkMarkPath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.31250 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.92857 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.34048 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 1.00000 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.31250 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.96802 * CGRectGetHeight(frame))];
[checkMarkPath addLineToPoint: CGPointMake(CGRectGetMinX(frame) + 0.31250 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.85714 * CGRectGetHeight(frame))];
[checkMarkPath addCurveToPoint: CGPointMake(CGRectGetMinX(frame) + 0.37500 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.78572 * CGRectGetHeight(frame)) controlPoint1: CGPointMake(CGRectGetMinX(frame) + 0.31250 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.81769 * CGRectGetHeight(frame)) controlPoint2: CGPointMake(CGRectGetMinX(frame) + 0.34048 * CGRectGetWidth(frame), CGRectGetMinY(frame) + 0.78572 * CGRectGetHeight(frame))];
[checkMarkPath closePath];
[checkMarkColor setFill];
[checkMarkPath fill];
}
-(void)setSelected:(BOOL)selected{
[super setSelected:selected];
[self setNeedsDisplay];
}
@end
@implementation MMTableViewCell
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
[self setAccessoryCheckmarkColor:[UIColor whiteColor]];
[self setDisclosureIndicatorColor:[UIColor whiteColor]];
[self updateContentForNewContentSize];
}
return self;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
- (void)setAccessoryType:(UITableViewCellAccessoryType)accessoryType{
[super setAccessoryType:accessoryType];
if(accessoryType == UITableViewCellAccessoryCheckmark){
MMCustomCheckmark * customCheckmark = [[MMCustomCheckmark alloc] initWithFrame:CGRectMake(0, 0, 15, 15)];
[customCheckmark setColor:self.accessoryCheckmarkColor];
[self setAccessoryView:customCheckmark];
}
else if(accessoryType == UITableViewCellAccessoryDisclosureIndicator){
MMDisclosureIndicator * di = [[MMDisclosureIndicator alloc] initWithFrame:CGRectMake(0, 0, 10, 14)];
[di setColor:self.disclosureIndicatorColor];
[self setAccessoryView:di];
}
else {
[self setAccessoryView:nil];
}
}
-(void)prepareForReuse{
[super prepareForReuse];
[self updateContentForNewContentSize];
}
-(void)updateContentForNewContentSize{
}
@end
================================================
FILE: KitchenSink/ExampleFiles/en.lproj/InfoPlist.strings
================================================
/* Localized versions of Info.plist keys */
================================================
FILE: KitchenSink/ExampleFiles/main.m
================================================
// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import <UIKit/UIKit.h>
#import "MMAppDelegate.h"
int main(int argc, char *argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([MMAppDelegate class]));
}
}
================================================
FILE: KitchenSink/MMDrawerControllerKitchenSink.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
294A1D1117199537005BF6B1 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 294A1D1017199537005BF6B1 /* UIKit.framework */; };
294A1D1317199537005BF6B1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 294A1D1217199537005BF6B1 /* Foundation.framework */; };
294A1D1517199537005BF6B1 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 294A1D1417199537005BF6B1 /* CoreGraphics.framework */; };
294A1D1B17199537005BF6B1 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 294A1D1917199537005BF6B1 /* InfoPlist.strings */; };
294A1D1D17199537005BF6B1 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 294A1D1C17199537005BF6B1 /* main.m */; };
294A1D2117199537005BF6B1 /* MMAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 294A1D2017199537005BF6B1 /* MMAppDelegate.m */; };
294A1D301719982B005BF6B1 /* MMDrawerController.m in Sources */ = {isa = PBXBuildFile; fileRef = 294A1D2F1719982B005BF6B1 /* MMDrawerController.m */; };
294A1D3317199844005BF6B1 /* UIViewController+MMDrawerController.m in Sources */ = {isa = PBXBuildFile; fileRef = 294A1D3217199844005BF6B1 /* UIViewController+MMDrawerController.m */; };
2961190717383AFC00CD4063 /* MMLogoView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2961190617383AFC00CD4063 /* MMLogoView.m */; };
2961190A1738416400CD4063 /* MMCenterTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 296119091738416400CD4063 /* MMCenterTableViewCell.m */; };
2969636C1738141500281B9A /* MMSideDrawerTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 2969636B1738141500281B9A /* MMSideDrawerTableViewCell.m */; };
297EA0051738112A00472DF4 /* MMTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 297EA0041738112A00472DF4 /* MMTableViewCell.m */; };
29848B5F173015D3006D8502 /* MMExampleLeftSideDrawerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29848B5E173015D3006D8502 /* MMExampleLeftSideDrawerViewController.m */; };
29848B6517301793006D8502 /* MMExampleRightSideDrawerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29848B6417301793006D8502 /* MMExampleRightSideDrawerViewController.m */; };
29971C901AB09A9F00D84C7B /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 29971C8F1AB09A9F00D84C7B /* LaunchScreen.xib */; };
299E0ADD1738173B009FAA3C /* MMSideDrawerSectionHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 299E0ADC1738173B009FAA3C /* MMSideDrawerSectionHeaderView.m */; };
29C28481172AD77D0089E872 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 29C28480172AD77D0089E872 /* QuartzCore.framework */; };
29C28487172B07C10089E872 /* MMExampleCenterTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29C28486172B07C10089E872 /* MMExampleCenterTableViewController.m */; };
29C2848D172EB1710089E872 /* MMExampleSideDrawerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29C2848C172EB1710089E872 /* MMExampleSideDrawerViewController.m */; };
29CFD5EC173192D100E1FABB /* MMDrawerVisualState.m in Sources */ = {isa = PBXBuildFile; fileRef = 29CFD5EB173192D100E1FABB /* MMDrawerVisualState.m */; };
29CFD5EF1731C7DB00E1FABB /* MMExampleDrawerVisualStateManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 29CFD5EE1731C7DB00E1FABB /* MMExampleDrawerVisualStateManager.m */; };
29E2C6181738A10F00606309 /* Icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 29E2C6141738A10F00606309 /* Icon-72.png */; };
29E2C6191738A10F00606309 /* Icon-72@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 29E2C6151738A10F00606309 /* Icon-72@2x.png */; };
29E2C61A1738A10F00606309 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 29E2C6161738A10F00606309 /* Icon.png */; };
29E2C61B1738A10F00606309 /* Icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 29E2C6171738A10F00606309 /* Icon@2x.png */; };
29EEA51B17998320006D68B7 /* MMNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29EEA51A17998320006D68B7 /* MMNavigationController.m */; };
29EEA51E1799923E006D68B7 /* MMExampleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29EEA51D1799923E006D68B7 /* MMExampleViewController.m */; };
29F6163B172AC22A00B31282 /* MMDrawerBarButtonItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F6163A172AC22A00B31282 /* MMDrawerBarButtonItem.m */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
294A1D0D17199537005BF6B1 /* MMDrawerControllerKitchenSink.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MMDrawerControllerKitchenSink.app; sourceTree = BUILT_PRODUCTS_DIR; };
294A1D1017199537005BF6B1 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
294A1D1217199537005BF6B1 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
294A1D1417199537005BF6B1 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
294A1D1817199537005BF6B1 /* MMDrawerControllerKitchenSink-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "MMDrawerControllerKitchenSink-Info.plist"; sourceTree = "<group>"; };
294A1D1A17199537005BF6B1 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
294A1D1C17199537005BF6B1 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
294A1D1E17199537005BF6B1 /* MMDrawerControllerKitchenSink-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MMDrawerControllerKitchenSink-Prefix.pch"; sourceTree = "<group>"; };
294A1D1F17199537005BF6B1 /* MMAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MMAppDelegate.h; sourceTree = "<group>"; };
294A1D2017199537005BF6B1 /* MMAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MMAppDelegate.m; sourceTree = "<group>"; };
294A1D2E1719982B005BF6B1 /* MMDrawerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MMDrawerController.h; sourceTree = "<group>"; };
294A1D2F1719982B005BF6B1 /* MMDrawerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MMDrawerController.m; sourceTree = "<group>"; };
294A1D3117199844005BF6B1 /* UIViewController+MMDrawerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIViewController+MMDrawerController.h"; sourceTree = "<group>"; };
294A1D3217199844005BF6B1 /* UIViewController+MMDrawerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+MMDrawerController.m"; sourceTree = "<group>"; };
2961190517383AFC00CD4063 /* MMLogoView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MMLogoView.h; sourceTree = "<group>"; };
2961190617383AFC00CD4063 /* MMLogoView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MMLogoView.m; sourceTree = "<group>"; };
296119081738416400CD4063 /* MMCenterTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MMCenterTableViewCell.h; sourceTree = "<group>"; };
296119091738416400CD4063 /* MMCenterTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MMCenterTableViewCell.m; sourceTree = "<group>"; };
2969636A1738141500281B9A /* MMSideDrawerTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MMSideDrawerTableViewCell.h; sourceTree = "<group>"; };
2969636B1738141500281B9A /* MMSideDrawerTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MMSideDrawerTableViewCell.m; sourceTree = "<group>"; };
297EA0031738112A00472DF4 /* MMTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MMTableViewCell.h; sourceTree = "<group>"; };
297EA0041738112A00472DF4 /* MMTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MMTableViewCell.m; sourceTree = "<group>"; };
29848B5D173015D3006D8502 /* MMExampleLeftSideDrawerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MMExampleLeftSideDrawerViewController.h; sourceTree = "<group>"; };
29848B5E173015D3006D8502 /* MMExampleLeftSideDrawerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MMExampleLeftSideDrawerViewController.m; sourceTree = "<group>"; };
29848B6317301793006D8502 /* MMExampleRightSideDrawerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MMExampleRightSideDrawerViewController.h; sourceTree = "<group>"; };
29848B6417301793006D8502 /* MMExampleRightSideDrawerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MMExampleRightSideDrawerViewController.m; sourceTree = "<group>"; };
29971C8F1AB09A9F00D84C7B /* LaunchScreen.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LaunchScreen.xib; sourceTree = "<group>"; };
299E0ADB1738173B009FAA3C /* MMSideDrawerSectionHeaderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MMSideDrawerSectionHeaderView.h; sourceTree = "<group>"; };
299E0ADC1738173B009FAA3C /* MMSideDrawerSectionHeaderView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MMSideDrawerSectionHeaderView.m; sourceTree = "<group>"; };
29C28480172AD77D0089E872 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
29C28485172B07C10089E872 /* MMExampleCenterTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MMExampleCenterTableViewController.h; sourceTree = "<group>"; };
29C28486172B07C10089E872 /* MMExampleCenterTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MMExampleCenterTableViewController.m; sourceTree = "<group>"; };
29C2848B172EB1710089E872 /* MMExampleSideDrawerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MMExampleSideDrawerViewController.h; sourceTree = "<group>"; };
29C2848C172EB1710089E872 /* MMExampleSideDrawerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MMExampleSideDrawerViewController.m; sourceTree = "<group>"; };
29CFD5EA173192D100E1FABB /* MMDrawerVisualState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MMDrawerVisualState.h; sourceTree = "<group>"; };
29CFD5EB173192D100E1FABB /* MMDrawerVisualState.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MMDrawerVisualState.m; sourceTree = "<group>"; };
29CFD5ED1731C7DB00E1FABB /* MMExampleDrawerVisualStateManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MMExampleDrawerVisualStateManager.h; sourceTree = "<group>"; };
29CFD5EE1731C7DB00E1FABB /* MMExampleDrawerVisualStateManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MMExampleDrawerVisualStateManager.m; sourceTree = "<group>"; };
29E2C6141738A10F00606309 /* Icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72.png"; sourceTree = "<group>"; };
29E2C6151738A10F00606309 /* Icon-72@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72@2x.png"; sourceTree = "<group>"; };
29E2C6161738A10F00606309 /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = "<group>"; };
29E2C6171738A10F00606309 /* Icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon@2x.png"; sourceTree = "<group>"; };
29EEA51917998320006D68B7 /* MMNavigationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MMNavigationController.h; sourceTree = "<group>"; };
29EEA51A17998320006D68B7 /* MMNavigationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MMNavigationController.m; sourceTree = "<group>"; };
29EEA51C1799923E006D68B7 /* MMExampleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MMExampleViewController.h; sourceTree = "<group>"; };
29EEA51D1799923E006D68B7 /* MMExampleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MMExampleViewController.m; sourceTree = "<group>"; };
29F61639172AC22A00B31282 /* MMDrawerBarButtonItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MMDrawerBarButtonItem.h; sourceTree = "<group>"; };
29F6163A172AC22A00B31282 /* MMDrawerBarButtonItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MMDrawerBarButtonItem.m; sourceTree = "<group>"; };
462C592D1757C16B006C1D6F /* MMDrawerController+Subclass.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MMDrawerController+Subclass.h"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
294A1D0A17199537005BF6B1 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
29C28481172AD77D0089E872 /* QuartzCore.framework in Frameworks */,
294A1D1117199537005BF6B1 /* UIKit.framework in Frameworks */,
294A1D1317199537005BF6B1 /* Foundation.framework in Frameworks */,
294A1D1517199537005BF6B1 /* CoreGraphics.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
294A1D0417199537005BF6B1 = {
isa = PBXGroup;
children = (
294A1D2D17199819005BF6B1 /* MMDrawerController */,
294A1D1617199537005BF6B1 /* ExampleFiles */,
294A1D0F17199537005BF6B1 /* Frameworks */,
294A1D0E17199537005BF6B1 /* Products */,
);
sourceTree = "<group>";
};
294A1D0E17199537005BF6B1 /* Products */ = {
isa = PBXGroup;
children = (
294A1D0D17199537005BF6B1 /* MMDrawerControllerKitchenSink.app */,
);
name = Products;
sourceTree = "<group>";
};
294A1D0F17199537005BF6B1 /* Frameworks */ = {
isa = PBXGroup;
children = (
29C28480172AD77D0089E872 /* QuartzCore.framework */,
294A1D1017199537005BF6B1 /* UIKit.framework */,
294A1D1217199537005BF6B1 /* Foundation.framework */,
294A1D1417199537005BF6B1 /* CoreGraphics.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
294A1D1617199537005BF6B1 /* ExampleFiles */ = {
isa = PBXGroup;
children = (
294A1D1F17199537005BF6B1 /* MMAppDelegate.h */,
294A1D2017199537005BF6B1 /* MMAppDelegate.m */,
2961190E173845FD00CD4063 /* VisualStateManager */,
2961190D173845EF00CD4063 /* CustomViews */,
2961190C173845E000CD4063 /* ViewControllers */,
2961190B173845D100CD4063 /* TableViewHelpers */,
294A1D1717199537005BF6B1 /* Supporting Files */,
);
path = ExampleFiles;
sourceTree = "<group>";
};
294A1D1717199537005BF6B1 /* Supporting Files */ = {
isa = PBXGroup;
children = (
29E2C6131738A10F00606309 /* Icons */,
294A1D1817199537005BF6B1 /* MMDrawerControllerKitchenSink-Info.plist */,
294A1D1917199537005BF6B1 /* InfoPlist.strings */,
294A1D1C17199537005BF6B1 /* main.m */,
294A1D1E17199537005BF6B1 /* MMDrawerControllerKitchenSink-Prefix.pch */,
29971C8F1AB09A9F00D84C7B /* LaunchScreen.xib */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
294A1D2D17199819005BF6B1 /* MMDrawerController */ = {
isa = PBXGroup;
children = (
294A1D2E1719982B005BF6B1 /* MMDrawerController.h */,
294A1D2F1719982B005BF6B1 /* MMDrawerController.m */,
462C592D1757C16B006C1D6F /* MMDrawerController+Subclass.h */,
294A1D3117199844005BF6B1 /* UIViewController+MMDrawerController.h */,
294A1D3217199844005BF6B1 /* UIViewController+MMDrawerController.m */,
29F61639172AC22A00B31282 /* MMDrawerBarButtonItem.h */,
29F6163A172AC22A00B31282 /* MMDrawerBarButtonItem.m */,
29CFD5EA173192D100E1FABB /* MMDrawerVisualState.h */,
29CFD5EB173192D100E1FABB /* MMDrawerVisualState.m */,
);
name = MMDrawerController;
path = ../MMDrawerController;
sourceTree = "<group>";
};
2961190B173845D100CD4063 /* TableViewHelpers */ = {
isa = PBXGroup;
children = (
297EA0031738112A00472DF4 /* MMTableViewCell.h */,
297EA0041738112A00472DF4 /* MMTableViewCell.m */,
2969636A1738141500281B9A /* MMSideDrawerTableViewCell.h */,
2969636B1738141500281B9A /* MMSideDrawerTableViewCell.m */,
296119081738416400CD4063 /* MMCenterTableViewCell.h */,
296119091738416400CD4063 /* MMCenterTableViewCell.m */,
299E0ADB1738173B009FAA3C /* MMSideDrawerSectionHeaderView.h */,
299E0ADC1738173B009FAA3C /* MMSideDrawerSectionHeaderView.m */,
);
name = TableViewHelpers;
sourceTree = "<group>";
};
2961190C173845E000CD4063 /* ViewControllers */ = {
isa = PBXGroup;
children = (
29C28485172B07C10089E872 /* MMExampleCenterTableViewController.h */,
29C28486172B07C10089E872 /* MMExampleCenterTableViewController.m */,
29C2848B172EB1710089E872 /* MMExampleSideDrawerViewController.h */,
29C2848C172EB1710089E872 /* MMExampleSideDrawerViewController.m */,
29848B5D173015D3006D8502 /* MMExampleLeftSideDrawerViewController.h */,
29848B5E173015D3006D8502 /* MMExampleLeftSideDrawerViewController.m */,
29848B6317301793006D8502 /* MMExampleRightSideDrawerViewController.h */,
29848B6417301793006D8502 /* MMExampleRightSideDrawerViewController.m */,
29EEA51C1799923E006D68B7 /* MMExampleViewController.h */,
29EEA51D1799923E006D68B7 /* MMExampleViewController.m */,
29EEA51917998320006D68B7 /* MMNavigationController.h */,
29EEA51A17998320006D68B7 /* MMNavigationController.m */,
);
name = ViewControllers;
sourceTree = "<group>";
};
2961190D173845EF00CD4063 /* CustomViews */ = {
isa = PBXGroup;
children = (
2961190517383AFC00CD4063 /* MMLogoView.h */,
2961190617383AFC00CD4063 /* MMLogoView.m */,
);
name = CustomViews;
sourceTree = "<group>";
};
2961190E173845FD00CD4063 /* VisualStateManager */ = {
isa = PBXGroup;
children = (
29CFD5ED1731C7DB00E1FABB /* MMExampleDrawerVisualStateManager.h */,
29CFD5EE1731C7DB00E1FABB /* MMExampleDrawerVisualStateManager.m */,
);
name = VisualStateManager;
sourceTree = "<group>";
};
29E2C6131738A10F00606309 /* Icons */ = {
isa = PBXGroup;
children = (
29E2C6141738A10F00606309 /* Icon-72.png */,
29E2C6151738A10F00606309 /* Icon-72@2x.png */,
29E2C6161738A10F00606309 /* Icon.png */,
29E2C6171738A10F00606309 /* Icon@2x.png */,
);
path = Icons;
sourceTree = SOURCE_ROOT;
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
294A1D0C17199537005BF6B1 /* MMDrawerControllerKitchenSink */ = {
isa = PBXNativeTarget;
buildConfigurationList = 294A1D2A17199537005BF6B1 /* Build configuration list for PBXNativeTarget "MMDrawerControllerKitchenSink" */;
buildPhases = (
294A1D0917199537005BF6B1 /* Sources */,
294A1D0A17199537005BF6B1 /* Frameworks */,
294A1D0B17199537005BF6B1 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = MMDrawerControllerKitchenSink;
productName = MMSideDrawerContainerViewController;
productReference = 294A1D0D17199537005BF6B1 /* MMDrawerControllerKitchenSink.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
294A1D0517199537005BF6B1 /* Project object */ = {
isa = PBXProject;
attributes = {
CLASSPREFIX = MM;
LastUpgradeCheck = 0460;
ORGANIZATIONNAME = "Mutual Mobile";
};
buildConfigurationList = 294A1D0817199537005BF6B1 /* Build configuration list for PBXProject "MMDrawerControllerKitchenSink" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = 294A1D0417199537005BF6B1;
productRefGroup = 294A1D0E17199537005BF6B1 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
294A1D0C17199537005BF6B1 /* MMDrawerControllerKitchenSink */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
294A1D0B17199537005BF6B1 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
294A1D1B17199537005BF6B1 /* InfoPlist.strings in Resources */,
29E2C6181738A10F00606309 /* Icon-72.png in Resources */,
29E2C6191738A10F00606309 /* Icon-72@2x.png in Resources */,
29E2C61A1738A10F00606309 /* Icon.png in Resources */,
29971C901AB09A9F00D84C7B /* LaunchScreen.xib in Resources */,
29E2C61B1738A10F00606309 /* Icon@2x.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
294A1D0917199537005BF6B1 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
294A1D1D17199537005BF6B1 /* main.m in Sources */,
294A1D2117199537005BF6B1 /* MMAppDelegate.m in Sources */,
294A1D301719982B005BF6B1 /* MMDrawerController.m in Sources */,
294A1D3317199844005BF6B1 /* UIViewController+MMDrawerController.m in Sources */,
29F6163B172AC22A00B31282 /* MMDrawerBarButtonItem.m in Sources */,
29C28487172B07C10089E872 /* MMExampleCenterTableViewController.m in Sources */,
29C2848D172EB1710089E872 /* MMExampleSideDrawerViewController.m in Sources */,
29848B5F173015D3006D8502 /* MMExampleLeftSideDrawerViewController.m in Sources */,
29EEA51E1799923E006D68B7 /* MMExampleViewController.m in Sources */,
29848B6517301793006D8502 /* MMExampleRightSideDrawerViewController.m in Sources */,
29CFD5EC173192D100E1FABB /* MMDrawerVisualState.m in Sources */,
29EEA51B17998320006D68B7 /* MMNavigationController.m in Sources */,
29CFD5EF1731C7DB00E1FABB /* MMExampleDrawerVisualStateManager.m in Sources */,
297EA0051738112A00472DF4 /* MMTableViewCell.m in Sources */,
2969636C1738141500281B9A /* MMSideDrawerTableViewCell.m in Sources */,
299E0ADD1738173B009FAA3C /* MMSideDrawerSectionHeaderView.m in Sources */,
2961190717383AFC00CD4063 /* MMLogoView.m in Sources */,
2961190A1738416400CD4063 /* MMCenterTableViewCell.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
294A1D1917199537005BF6B1 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
294A1D1A17199537005BF6B1 /* en */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
294A1D2817199537005BF6B1 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 6.1;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
294A1D2917199537005BF6B1 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 6.1;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
294A1D2B17199537005BF6B1 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "ExampleFiles/MMDrawerControllerKitchenSink-Prefix.pch";
INFOPLIST_FILE = "ExampleFiles/MMDrawerControllerKitchenSink-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
PRODUCT_NAME = MMDrawerControllerKitchenSink;
WARNING_CFLAGS = "-Wdocumentation";
WRAPPER_EXTENSION = app;
};
name = Debug;
};
294A1D2C17199537005BF6B1 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "ExampleFiles/MMDrawerControllerKitchenSink-Prefix.pch";
INFOPLIST_FILE = "ExampleFiles/MMDrawerControllerKitchenSink-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
PRODUCT_NAME = MMDrawerControllerKitchenSink;
WARNING_CFLAGS = "-Wdocumentation";
WRAPPER_EXTENSION = app;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
294A1D0817199537005BF6B1 /* Build configuration list for PBXProject "MMDrawerControllerKitchenSink" */ = {
isa = XCConfigurationList;
buildConfigurations = (
294A1D2817199537005BF6B1 /* Debug */,
294A1D2917199537005BF6B1 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
294A1D2A17199537005BF6B1 /* Build configuration list for PBXNativeTarget "MMDrawerControllerKitchenSink" */ = {
isa = XCConfigurationList;
buildConfigurations = (
294A1D2B17199537005BF6B1 /* Debug */,
294A1D2C17199537005BF6B1 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 294A1D0517199537005BF6B1 /* Project object */;
}
================================================
FILE: KitchenSink/MMDrawerControllerKitchenSink.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:MMDrawerControllerKitchenSink.xcodeproj">
</FileRef>
</Workspace>
================================================
FILE: KitchenSink/MMDrawerControllerKitchenSink.xcodeproj/project.xcworkspace/xcshareddata/MMDrawerControllerKitchenSink.xccheckout
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
<false/>
<key>IDESourceControlProjectIdentifier</key>
<string>88813EDE-C4BC-4EAD-BA3F-F5FC71109468</string>
<key>IDESourceControlProjectName</key>
<string>MMDrawerControllerKitchenSink</string>
<key>IDESourceControlProjectOriginsDictionary</key>
<dict>
<key>BF2FE30DD30E807A424B26D63A15FEB4A29593EB</key>
<string>https://github.com/mutualmobile/MMDrawerController.git</string>
</dict>
<key>IDESourceControlProjectPath</key>
<string>KitchenSink/MMDrawerControllerKitchenSink.xcodeproj</string>
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
<dict>
<key>BF2FE30DD30E807A424B26D63A15FEB4A29593EB</key>
<string>../../..</string>
</dict>
<key>IDESourceControlProjectURL</key>
<string>https://github.com/mutualmobile/MMDrawerController.git</string>
<key>IDESourceControlProjectVersion</key>
<integer>111</integer>
<key>IDESourceControlProjectWCCIdentifier</key>
<string>BF2FE30DD30E807A424B26D63A15FEB4A29593EB</string>
<key>IDESourceControlProjectWCConfigurations</key>
<array>
<dict>
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
<string>public.vcs.git</string>
<key>IDESourceControlWCCIdentifierKey</key>
<string>BF2FE30DD30E807A424B26D63A15FEB4A29593EB</string>
<key>IDESourceControlWCCName</key>
<string>MMDrawerController-GitHub</string>
</dict>
</array>
</dict>
</plist>
================================================
FILE: KitchenSink/MMDrawerControllerKitchenSink.xcodeproj/xcshareddata/xcschemes/MMDrawerControllerKitchenSink.xcscheme
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0460"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "294A1D0C17199537005BF6B1"
BuildableName = "MMDrawerControllerKitchenSink.app"
BlueprintName = "MMDrawerControllerKitchenSink"
ReferencedContainer = "container:MMDrawerControllerKitchenSink.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "294A1D0C17199537005BF6B1"
BuildableName = "MMDrawerControllerKitchenSink.app"
BlueprintName = "MMDrawerControllerKitchenSink"
ReferencedContainer = "container:MMDrawerControllerKitchenSink.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "294A1D0C17199537005BF6B1"
BuildableName = "MMDrawerControllerKitchenSink.app"
BlueprintName = "MMDrawerControllerKitchenSink"
ReferencedContainer = "container:MMDrawerControllerKitchenSink.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "294A1D0C17199537005BF6B1"
BuildableName = "MMDrawerControllerKitchenSink.app"
BlueprintName = "MMDrawerControllerKitchenSink"
ReferencedContainer = "container:MMDrawerControllerKitchenSink.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
================================================
FILE: LICENSE
================================================
Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
================================================
FILE: MMDrawerController/MMDrawerBarButtonItem.h
================================================
// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import <UIKit/UIKit.h>
/**
`MMDrawerBarButtonItem` provides convenience methods to create `UIBarButtonItems` with a default hamburger-menu asset.
*/
@interface MMDrawerBarButtonItem : UIBarButtonItem
///---------------------------------------
/// @name Initializing a `MMDrawerBarButtonItem`
///---------------------------------------
/**
Creates and initializes an `MMDrawerBarButtonItem` without a border.
@param target The target to forward the `action` to when the button is pressed.
@param action The action to call when the button is pressed.
@return The newly-initialized bar button item.
*/
-(instancetype)initWithTarget:(id)target action:(SEL)action;
/**
Returns the current color of the menu button for the state requested. This property is deprecated in iOS 7.0. Use `tintColor` instead.
@param state The UIControl state that the color is being requested for.
@return The menu button color for the requested state.
*/
-(UIColor *)menuButtonColorForState:(UIControlState)state __attribute__((deprecated("Use tintColor instead")));
/**
Sets the color of the menu button for the specified state. For this control, only set colors for `UIControlStateNormal` and `UIControlStateHighlighted`. This property is deprecated in iOS 7.0. Use `tintColor` instead.
@param color The color to set.
@param state The state to set the color for.
*/
-(void)setMenuButtonColor:(UIColor *)color forState:(UIControlState)state __attribute__((deprecated("Use tintColor instead")));
/**
Returns the current color of the shadow for the state requested. This property is deprecated in iOS 7.0. The menu button no longer supports a shadow.
@param state The UIControl state that the color is being requested for.
@return The menu button color for the requested state.
*/
-(UIColor *)shadowColorForState:(UIControlState)state __attribute__((deprecated("Shadow is no longer supported")));
/**
Sets the color of the shadow for the specified state. For this control, only set colors for `UIControlStateNormal` and `UIControlStateHighlighted`. This property is deprecated in iOS 7.0. The menu button no longer supports a shadow.
@param color The color to set.
@param state The state to set the color for.
*/
-(void)setShadowColor:(UIColor *)color forState:(UIControlState)state __attribute__((deprecated("Shadow is no longer supported")));
@end
================================================
FILE: MMDrawerController/MMDrawerBarButtonItem.m
================================================
// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import "MMDrawerBarButtonItem.h"
@interface MMDrawerMenuButtonView : UIButton
@property (nonatomic,strong) UIColor * menuButtonNormalColor;
@property (nonatomic,strong) UIColor * menuButtonHighlightedColor;
@property (nonatomic,strong) UIColor * shadowNormalColor;
@property (nonatomic,strong) UIColor * shadowHighlightedColor;
-(UIColor *)menuButtonColorForState:(UIControlState)state;
-(void)setMenuButtonColor:(UIColor *)color forState:(UIControlState)state;
-(UIColor *)shadowColorForState:(UIControlState)state;
-(void)setShadowColor:(UIColor *)color forState:(UIControlState)state;
@end
@implementation MMDrawerMenuButtonView
-(instancetype)initWithFrame:(CGRect)frame{
self = [super initWithFrame:frame];
if(self){
[self setMenuButtonNormalColor:[[UIColor whiteColor] colorWithAlphaComponent:0.9f]];
[self setMenuButtonHighlightedColor:[UIColor colorWithRed:139.0/255.0
green:135.0/255.0
blue:136.0/255.0
alpha:0.9f]];
[self setShadowNormalColor:[[UIColor blackColor] colorWithAlphaComponent:0.5f]];
[self setShadowHighlightedColor:[[UIColor blackColor] colorWithAlphaComponent:0.2f]];
}
return self;
}
-(UIColor *)menuButtonColorForState:(UIControlState)state{
UIColor * color;
switch (state) {
case UIControlStateNormal:
color = self.menuButtonNormalColor;
break;
case UIControlStateHighlighted:
color = self.menuButtonHighlightedColor;
break;
default:
break;
}
return color;
}
-(void)setMenuButtonColor:(UIColor *)color forState:(UIControlState)state{
switch (state) {
case UIControlStateNormal:
[self setMenuButtonNormalColor:color];
break;
case UIControlStateHighlighted:
[self setMenuButtonHighlightedColor:color];
break;
default:
break;
}
[self setNeedsDisplay];
}
-(UIColor *)shadowColorForState:(UIControlState)state{
UIColor * color;
switch (state) {
case UIControlStateNormal:
color = self.shadowNormalColor;
break;
case UIControlStateHighlighted:
color = self.shadowHighlightedColor;
break;
default:
break;
}
return color;
}
-(void)setShadowColor:(UIColor *)color forState:(UIControlState)state{
switch (state) {
case UIControlStateNormal:
[self setShadowNormalColor:color];
break;
case UIControlStateHighlighted:
[self setShadowHighlightedColor:color];
break;
default:
break;
}
[self setNeedsDisplay];
}
-(void)drawRect:(CGRect)rect{
//// General Declarations
CGContextRef context = UIGraphicsGetCurrentContext();
//Sizes
CGFloat buttonWidth = CGRectGetWidth(self.bounds)*.80;
CGFloat buttonHeight = CGRectGetHeight(self.bounds)*.16;
CGFloat xOffset = CGRectGetWidth(self.bounds)*.10;
CGFloat yOffset = CGRectGetHeight(self.bounds)*.12;
CGFloat cornerRadius = 1.0;
//// Color Declarations
UIColor* buttonColor = [self menuButtonColorForState:self.state];
UIColor* shadowColor = [self shadowColorForState:self.state];
//// Shadow Declarations
UIColor* shadow = shadowColor;
CGSize shadowOffset = CGSizeMake(0.0, 1.0);
CGFloat shadowBlurRadius = 0;
//// Top Bun Drawing
UIBezierPath* topBunPath = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(xOffset, yOffset, buttonWidth, buttonHeight) cornerRadius:cornerRadius];
CGContextSaveGState(context);
CGContextSetShadowWithColor(context, shadowOffset, shadowBlurRadius, shadow.CGColor);
[buttonColor setFill];
[topBunPath fill];
CGContextRestoreGState(context);
//// Meat Drawing
UIBezierPath* meatPath = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(xOffset, yOffset*2 + buttonHeight, buttonWidth, buttonHeight) cornerRadius:cornerRadius];
CGContextSaveGState(context);
CGContextSetShadowWithColor(context, shadowOffset, shadowBlurRadius, shadow.CGColor);
[buttonColor setFill];
[meatPath fill];
CGContextRestoreGState(context);
//// Bottom Bun Drawing
UIBezierPath* bottomBunPath = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(xOffset, yOffset*3 + buttonHeight*2, buttonWidth, buttonHeight) cornerRadius:cornerRadius];
CGContextSaveGState(context);
CGContextSetShadowWithColor(context, shadowOffset, shadowBlurRadius, shadow.CGColor);
[buttonColor setFill];
[bottomBunPath fill];
CGContextRestoreGState(context);
}
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
[super touchesBegan:touches withEvent:event];
[self setNeedsDisplay];
}
-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{
[super touchesEnded:touches withEvent:event];
[self setNeedsDisplay];
}
-(void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event{
[super touchesCancelled:touches withEvent:event];
[self setNeedsDisplay];
}
-(void)setSelected:(BOOL)selected{
[super setSelected:selected];
[self setNeedsDisplay];
}
-(void)setHighlighted:(BOOL)highlighted{
[super setHighlighted:highlighted];
[self setNeedsDisplay];
}
-(void)setTintColor:(UIColor *)tintColor{
if([super respondsToSelector:@selector(setTintColor:)]){
[super setTintColor:tintColor];
}
}
-(void)tintColorDidChange{
[self setNeedsDisplay];
}
@end
@interface MMDrawerBarButtonItem ()
@property (nonatomic,strong) MMDrawerMenuButtonView * buttonView;
@end
@implementation MMDrawerBarButtonItem
+(UIImage*)drawerButtonItemImage{
static UIImage *drawerButtonImage = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
UIGraphicsBeginImageContextWithOptions( CGSizeMake(26, 26), NO, 0 );
//// Color Declarations
UIColor* fillColor = [UIColor whiteColor];
//// Frames
CGRect frame = CGRectMake(0, 0, 26, 26);
//// Bottom Bar Drawing
UIBezierPath* bottomBarPath = [UIBezierPath bezierPathWithRect: CGRectMake(CGRectGetMinX(frame) + floor((CGRectGetWidth(frame) - 16) * 0.50000 + 0.5), CGRectGetMinY(frame) + floor((CGRectGetHeight(frame) - 1) * 0.72000 + 0.5), 16, 1)];
[fillColor setFill];
[bottomBarPath fill];
//// Middle Bar Drawing
UIBezierPath* middleBarPath = [UIBezierPath bezierPathWithRect: CGRectMake(CGRectGetMinX(frame) + floor((CGRectGetWidth(frame) - 16) * 0.50000 + 0.5), CGRectGetMinY(frame) + floor((CGRectGetHeight(frame) - 1) * 0.48000 + 0.5), 16, 1)];
[fillColor setFill];
[middleBarPath fill];
//// Top Bar Drawing
UIBezierPath* topBarPath = [UIBezierPath bezierPathWithRect: CGRectMake(CGRectGetMinX(frame) + floor((CGRectGetWidth(frame) - 16) * 0.50000 + 0.5), CGRectGetMinY(frame) + floor((CGRectGetHeight(frame) - 1) * 0.24000 + 0.5), 16, 1)];
[fillColor setFill];
[topBarPath fill];
drawerButtonImage = UIGraphicsGetImageFromCurrentImageContext();
});
return drawerButtonImage;
}
-(instancetype)initWithTarget:(id)target action:(SEL)action{
if((floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_6_1)){
return [self initWithImage:[self.class drawerButtonItemImage]
style:UIBarButtonItemStylePlain
target:target
action:action];
}
else {
MMDrawerMenuButtonView * buttonView = [[MMDrawerMenuButtonView alloc] initWithFrame:CGRectMake(0, 0, 26, 26)];
[buttonView addTarget:self action:@selector(touchUpInside:) forControlEvents:UIControlEventTouchUpInside];
self = [self initWithCustomView:buttonView];
if(self){
[self setButtonView:buttonView];
}
self.action = action;
self.target = target;
return self;
}
}
-(instancetype)initWithCoder:(NSCoder *)aDecoder{
// non-ideal way to get the target/action, but it works
UIBarButtonItem* barButtonItem = [[UIBarButtonItem alloc] initWithCoder: aDecoder];
return [self initWithTarget:barButtonItem.target action:barButtonItem.action];
}
-(void)touchUpInside:(id)sender{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
[self.target performSelector:self.action withObject:sender];
#pragma clang diagnostic pop;
}
-(UIColor *)menuButtonColorForState:(UIControlState)state{
return [self.buttonView menuButtonColorForState:state];
}
-(void)setMenuButtonColor:(UIColor *)color forState:(UIControlState)state{
[self.buttonView setMenuButtonColor:color forState:state];
}
-(UIColor *)shadowColorForState:(UIControlState)state{
return [self.buttonView shadowColorForState:state];
}
-(void)setShadowColor:(UIColor *)color forState:(UIControlState)state{
[self.buttonView setShadowColor:color forState:state];
}
-(void)setTintColor:(UIColor *)tintColor{
if([super respondsToSelector:@selector(setTintColor:)]){
[super setTintColor:tintColor];
}
if([self.buttonView respondsToSelector:@selector(setTintColor:)]){
[self.buttonView setTintColor:tintColor];
}
}
@end
================================================
FILE: MMDrawerController/MMDrawerController+Subclass.h
================================================
// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import "MMDrawerController.h"
/**
This class extension is designed for use by subclasses of `MMDrawerController` to customize the functionality to support a specific use-case by a developer. When importing this
gitextract_76l4zacj/ ├── .gitignore ├── .travis.yml ├── CHANGELOG.md ├── KitchenSink/ │ ├── ExampleFiles/ │ │ ├── LaunchScreen.xib │ │ ├── MMAppDelegate.h │ │ ├── MMAppDelegate.m │ │ ├── MMCenterTableViewCell.h │ │ ├── MMCenterTableViewCell.m │ │ ├── MMDrawerControllerKitchenSink-Info.plist │ │ ├── MMDrawerControllerKitchenSink-Prefix.pch │ │ ├── MMExampleCenterTableViewController.h │ │ ├── MMExampleCenterTableViewController.m │ │ ├── MMExampleDrawerVisualStateManager.h │ │ ├── MMExampleDrawerVisualStateManager.m │ │ ├── MMExampleLeftSideDrawerViewController.h │ │ ├── MMExampleLeftSideDrawerViewController.m │ │ ├── MMExampleRightSideDrawerViewController.h │ │ ├── MMExampleRightSideDrawerViewController.m │ │ ├── MMExampleSideDrawerViewController.h │ │ ├── MMExampleSideDrawerViewController.m │ │ ├── MMExampleViewController.h │ │ ├── MMExampleViewController.m │ │ ├── MMLogoView.h │ │ ├── MMLogoView.m │ │ ├── MMNavigationController.h │ │ ├── MMNavigationController.m │ │ ├── MMSideDrawerSectionHeaderView.h │ │ ├── MMSideDrawerSectionHeaderView.m │ │ ├── MMSideDrawerTableViewCell.h │ │ ├── MMSideDrawerTableViewCell.m │ │ ├── MMTableViewCell.h │ │ ├── MMTableViewCell.m │ │ ├── en.lproj/ │ │ │ └── InfoPlist.strings │ │ └── main.m │ └── MMDrawerControllerKitchenSink.xcodeproj/ │ ├── project.pbxproj │ ├── project.xcworkspace/ │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata/ │ │ └── MMDrawerControllerKitchenSink.xccheckout │ └── xcshareddata/ │ └── xcschemes/ │ └── MMDrawerControllerKitchenSink.xcscheme ├── LICENSE ├── MMDrawerController/ │ ├── MMDrawerBarButtonItem.h │ ├── MMDrawerBarButtonItem.m │ ├── MMDrawerController+Subclass.h │ ├── MMDrawerController.h │ ├── MMDrawerController.m │ ├── MMDrawerVisualState.h │ ├── MMDrawerVisualState.m │ ├── UIViewController+MMDrawerController.h │ └── UIViewController+MMDrawerController.m ├── MMDrawerController.podspec └── README.md
SYMBOL INDEX (3 symbols across 3 files)
FILE: KitchenSink/ExampleFiles/MMExampleDrawerVisualStateManager.h
type MMDrawerAnimationTypeNone (line 25) | typedef NS_ENUM(NSInteger, MMDrawerAnimationType){
FILE: KitchenSink/ExampleFiles/MMExampleSideDrawerViewController.h
type MMDrawerSectionViewSelection (line 26) | typedef NS_ENUM(NSInteger, MMDrawerSection){
FILE: MMDrawerController/MMDrawerController.h
type MMDrawerOpenCenterInteractionModeNone (line 89) | typedef NS_ENUM(NSInteger, MMDrawerOpenCenterInteractionMode) {
Condensed preview — 50 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (330K chars).
[
{
"path": ".gitignore",
"chars": 207,
"preview": "# Xcode\n.DS_Store\n*/build/*\n*.pbxuser\n!default.pbxuser\n*.mode1v3\n!default.mode1v3\n*.mode2v3\n!default.mode2v3\n*.perspecti"
},
{
"path": ".travis.yml",
"chars": 181,
"preview": "language: objective-c\nscript: xcodebuild -project KitchenSink/MMDrawerControllerKitchenSink.xcodeproj/ -scheme MMDrawerC"
},
{
"path": "CHANGELOG.md",
"chars": 14470,
"preview": "#MMDrawerController Changelog\n##[0.6.0](https://github.com/mutualmobile/MMDrawerController/issues?q=milestone%3A0.6.0+is"
},
{
"path": "KitchenSink/ExampleFiles/LaunchScreen.xib",
"chars": 3949,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" versi"
},
{
"path": "KitchenSink/ExampleFiles/MMAppDelegate.h",
"chars": 1283,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "KitchenSink/ExampleFiles/MMAppDelegate.m",
"chars": 6507,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "KitchenSink/ExampleFiles/MMCenterTableViewCell.h",
"chars": 1226,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "KitchenSink/ExampleFiles/MMCenterTableViewCell.m",
"chars": 1939,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "KitchenSink/ExampleFiles/MMDrawerControllerKitchenSink-Info.plist",
"chars": 1880,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "KitchenSink/ExampleFiles/MMDrawerControllerKitchenSink-Prefix.pch",
"chars": 338,
"preview": "//\n// Prefix header for all source files of the 'MMDrawerController' target in the 'MMDrawerController' project\n//\n\n#imp"
},
{
"path": "KitchenSink/ExampleFiles/MMExampleCenterTableViewController.h",
"chars": 1377,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "KitchenSink/ExampleFiles/MMExampleCenterTableViewController.m",
"chars": 14684,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "KitchenSink/ExampleFiles/MMExampleDrawerVisualStateManager.h",
"chars": 1816,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "KitchenSink/ExampleFiles/MMExampleDrawerVisualStateManager.m",
"chars": 4387,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "KitchenSink/ExampleFiles/MMExampleLeftSideDrawerViewController.h",
"chars": 1278,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "KitchenSink/ExampleFiles/MMExampleLeftSideDrawerViewController.m",
"chars": 3799,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "KitchenSink/ExampleFiles/MMExampleRightSideDrawerViewController.h",
"chars": 1278,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "KitchenSink/ExampleFiles/MMExampleRightSideDrawerViewController.m",
"chars": 3763,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "KitchenSink/ExampleFiles/MMExampleSideDrawerViewController.h",
"chars": 1783,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "KitchenSink/ExampleFiles/MMExampleSideDrawerViewController.m",
"chars": 18780,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "KitchenSink/ExampleFiles/MMExampleViewController.h",
"chars": 1270,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "KitchenSink/ExampleFiles/MMExampleViewController.m",
"chars": 2069,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "KitchenSink/ExampleFiles/MMLogoView.h",
"chars": 1202,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "KitchenSink/ExampleFiles/MMLogoView.m",
"chars": 26127,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "KitchenSink/ExampleFiles/MMNavigationController.h",
"chars": 1229,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "KitchenSink/ExampleFiles/MMNavigationController.m",
"chars": 1529,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "KitchenSink/ExampleFiles/MMSideDrawerSectionHeaderView.h",
"chars": 1268,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "KitchenSink/ExampleFiles/MMSideDrawerSectionHeaderView.m",
"chars": 3583,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "KitchenSink/ExampleFiles/MMSideDrawerTableViewCell.h",
"chars": 1230,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "KitchenSink/ExampleFiles/MMSideDrawerTableViewCell.m",
"chars": 2721,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "KitchenSink/ExampleFiles/MMTableViewCell.h",
"chars": 1388,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "KitchenSink/ExampleFiles/MMTableViewCell.m",
"chars": 13462,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "KitchenSink/ExampleFiles/en.lproj/InfoPlist.strings",
"chars": 45,
"preview": "/* Localized versions of Info.plist keys */\n\n"
},
{
"path": "KitchenSink/ExampleFiles/main.m",
"chars": 1351,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "KitchenSink/MMDrawerControllerKitchenSink.xcodeproj/project.pbxproj",
"chars": 28116,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "KitchenSink/MMDrawerControllerKitchenSink.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
"chars": 174,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"self:MMDrawerControl"
},
{
"path": "KitchenSink/MMDrawerControllerKitchenSink.xcodeproj/project.xcworkspace/xcshareddata/MMDrawerControllerKitchenSink.xccheckout",
"chars": 1583,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "KitchenSink/MMDrawerControllerKitchenSink.xcodeproj/xcshareddata/xcschemes/MMDrawerControllerKitchenSink.xcscheme",
"chars": 3399,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n LastUpgradeVersion = \"0460\"\n version = \"1.3\">\n <BuildAction\n "
},
{
"path": "LICENSE",
"chars": 1084,
"preview": "Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n\nPermission is hereby granted, free of charge, to any person"
},
{
"path": "MMDrawerController/MMDrawerBarButtonItem.h",
"chars": 3512,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "MMDrawerController/MMDrawerBarButtonItem.m",
"chars": 10695,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "MMDrawerController/MMDrawerController+Subclass.h",
"chars": 6053,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "MMDrawerController/MMDrawerController.h",
"chars": 24773,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "MMDrawerController/MMDrawerController.m",
"chars": 62536,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "MMDrawerController/MMDrawerVisualState.h",
"chars": 3139,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "MMDrawerController/MMDrawerVisualState.m",
"chars": 7408,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "MMDrawerController/UIViewController+MMDrawerController.h",
"chars": 2428,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "MMDrawerController/UIViewController+MMDrawerController.m",
"chars": 2752,
"preview": "// Copyright (c) 2013 Mutual Mobile (http://mutualmobile.com/)\n//\n// Permission is hereby granted, free of charge, to an"
},
{
"path": "MMDrawerController.podspec",
"chars": 1448,
"preview": "Pod::Spec.new do |s|\n s.name = \"MMDrawerController\"\n s.version = \"0.6.0\"\n s.summary = \"A lightweigh"
},
{
"path": "README.md",
"chars": 14894,
"preview": "#Mutual Mobile Drawer Controller\n`MMDrawerController` is a side drawer navigation container view controller designed to "
}
]
About this extraction
This page contains the full source code of the mutualmobile/MMDrawerController GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 50 files (310.0 KB), approximately 75.6k tokens, and a symbol index with 3 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.