├── MGFashionMenu
├── en.lproj
│ └── InfoPlist.strings
├── MGViewController.h
├── MGAppDelegate.h
├── MGFashionMenu-Prefix.pch
├── main.m
├── Images.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── LaunchImage.launchimage
│ │ └── Contents.json
├── MGFashionMenu-Info.plist
├── MGAppDelegate.m
├── MGViewController.m
└── Base.lproj
│ └── Main.storyboard
├── MGFashionMenuTests
├── en.lproj
│ └── InfoPlist.strings
├── MGFashionMenuTests-Info.plist
└── MGFashionMenuTests.m
├── MGFashionMenu.xcodeproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcuserdata
│ │ └── matteogobbi.xcuserdatad
│ │ │ ├── UserInterfaceState.xcuserstate
│ │ │ └── WorkspaceSettings.xcsettings
│ └── xcshareddata
│ │ └── MGFashionMenu.xccheckout
├── xcuserdata
│ └── matteogobbi.xcuserdatad
│ │ ├── xcschemes
│ │ ├── xcschememanagement.plist
│ │ └── MGFashionMenu.xcscheme
│ │ └── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
└── project.pbxproj
├── MGFashionMenuView.podspec
├── MGFashionMenuView
├── MGFashionMenuView.h
├── LICENSE
└── MGFashionMenuView.m
├── LICENSE
└── README.md
/MGFashionMenu/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/MGFashionMenuTests/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/MGFashionMenu.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/MGFashionMenu.xcodeproj/project.xcworkspace/xcuserdata/matteogobbi.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matteogobbi/MGFashionMenuView/HEAD/MGFashionMenu.xcodeproj/project.xcworkspace/xcuserdata/matteogobbi.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/MGFashionMenu/MGViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // MGViewController.h
3 | // MGFashionMenu
4 | //
5 | // Created by Matteo Gobbi on 05/07/2014.
6 | // Copyright (c) 2014 Matteo Gobbi. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MGViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/MGFashionMenu/MGAppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // MGAppDelegate.h
3 | // MGFashionMenu
4 | //
5 | // Created by Matteo Gobbi on 05/07/2014.
6 | // Copyright (c) 2014 Matteo Gobbi. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MGAppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/MGFashionMenu/MGFashionMenu-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header
3 | //
4 | // The contents of this file are implicitly included at the beginning of every source file.
5 | //
6 |
7 | #import
8 |
9 | #ifndef __IPHONE_5_0
10 | #warning "This project uses features only available in iOS SDK 5.0 and later."
11 | #endif
12 |
13 | #ifdef __OBJC__
14 | #import
15 | #import
16 | #endif
17 |
--------------------------------------------------------------------------------
/MGFashionMenu/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // MGFashionMenu
4 | //
5 | // Created by Matteo Gobbi on 05/07/2014.
6 | // Copyright (c) 2014 Matteo Gobbi. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "MGAppDelegate.h"
12 |
13 | int main(int argc, char * argv[])
14 | {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([MGAppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/MGFashionMenu.xcodeproj/project.xcworkspace/xcuserdata/matteogobbi.xcuserdatad/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges
6 |
7 | SnapshotAutomaticallyBeforeSignificantChanges
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/MGFashionMenu/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "40x40",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "60x60",
16 | "scale" : "2x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/MGFashionMenu/Images.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "orientation" : "portrait",
5 | "idiom" : "iphone",
6 | "extent" : "full-screen",
7 | "minimum-system-version" : "7.0",
8 | "scale" : "2x"
9 | },
10 | {
11 | "orientation" : "portrait",
12 | "idiom" : "iphone",
13 | "subtype" : "retina4",
14 | "extent" : "full-screen",
15 | "minimum-system-version" : "7.0",
16 | "scale" : "2x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/MGFashionMenuView.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 | s.name = 'MGFashionMenuView'
3 | s.version = '0.0.1'
4 | s.summary = 'MGFashionMenuView is a view with an awesome animation when it is shown/hidden.'
5 | s.homepage = 'https://github.com/matteogobbi/MGFashionMenuView'
6 | s.license = { :type => 'MIT',
7 | :file => 'LICENSE' }
8 | s.author = { 'Matteo Gobbi' => 'job@matteogobbi.com' }
9 | s.source = { :git => 'https://github.com/matteogobbi/MGFashionMenuView.git',
10 | :tag => '0.0.1' }
11 | s.platform = :ios, '6.0'
12 | s.source_files = 'MGFashionMenuView/MGFashionMenuView.{h,m}'
13 | s.frameworks = 'CoreGraphics', 'UIKit'
14 | s.requires_arc = true
15 | end
16 |
--------------------------------------------------------------------------------
/MGFashionMenu.xcodeproj/xcuserdata/matteogobbi.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | MGFashionMenu.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 65FDA3FF1968AE5A001DF616
16 |
17 | primary
18 |
19 |
20 | 65FDA4201968AE5A001DF616
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/MGFashionMenuTests/MGFashionMenuTests-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | com.matteogobbi.${PRODUCT_NAME:rfc1034identifier}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | BNDL
15 | CFBundleShortVersionString
16 | 1.0
17 | CFBundleSignature
18 | ????
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/MGFashionMenuTests/MGFashionMenuTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // MGFashionMenuTests.m
3 | // MGFashionMenuTests
4 | //
5 | // Created by Matteo Gobbi on 05/07/2014.
6 | // Copyright (c) 2014 Matteo Gobbi. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MGFashionMenuTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation MGFashionMenuTests
16 |
17 | - (void)setUp
18 | {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown
24 | {
25 | // Put teardown code here. This method is called after the invocation of each test method in the class.
26 | [super tearDown];
27 | }
28 |
29 | - (void)testExample
30 | {
31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__);
32 | }
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/MGFashionMenuView/MGFashionMenuView.h:
--------------------------------------------------------------------------------
1 | //
2 | // MGFashionMenuView.h
3 | // MGFashionMenu
4 | //
5 | // Created by Matteo Gobbi on 05/07/2014.
6 | // Copyright (c) 2014 Matteo Gobbi. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef NS_ENUM(NSUInteger, MGAnimationType) {
12 | MGAnimationTypeBounce,
13 | MGAnimationTypeSoftBounce,
14 | MGAnimationTypeHardBounce,
15 | MGAnimationTypeWave
16 | };
17 |
18 | @interface MGFashionMenuView : UIView
19 |
20 | @property (atomic, assign, readonly) BOOL isShown;
21 | @property (atomic, assign, readonly) BOOL isAnimating;
22 |
23 | - (instancetype)initWithMenuView:(UIView *)menuView;
24 | - (instancetype)initWithMenuView:(UIView *)menuView animationType:(MGAnimationType)animationType;
25 |
26 | - (void)show;
27 | - (void)showWithCompletition:(void (^)(void))completion;
28 | - (void)hide;
29 | - (void)hideWithCompletition:(void (^)(void))completion;
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Matteo Gobbi
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/MGFashionMenuView/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Matteo Gobbi
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/MGFashionMenu/MGFashionMenu-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIdentifier
12 | com.matteogobbi.${PRODUCT_NAME:rfc1034identifier}
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1.0
25 | LSRequiresIPhoneOS
26 |
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | MGFashionMenuView
2 | ===============
3 |
4 | MGFashionMenuView is a view with an awesome animation when it is shown/hidden. It is useful to present a menu, a notification or an action button.
5 |
6 |
7 |
8 | ## Info
9 |
10 | This code must be used under ARC.
11 | If your code doesn't use ARC you can [mark this source with the compiler flag](http://www.codeography.com/2011/10/10/making-arc-and-non-arc-play-nice.html) `-fobjc-arc`
12 |
13 | ## Example Usage
14 |
15 | In the package is included the project to test the object.
16 | This is an easy example to init and use the control:
17 |
18 | ``` objective-c
19 | //Init the control
20 | MGFashionMenuView *menuView = [[MGFashionMenuView alloc] initWithMenuView:myViewToPresent andAnimationType:MGAnimationTypeWave];
21 | [self.view addSubview:menuView];
22 |
23 | //Show/hide menu
24 | [menuView show];
25 | [menuView hide];
26 | ```
27 |
28 | Useful properties:
29 |
30 | ``` objective-c
31 | //Access to property to know if the control is shown or not
32 | [menuView isShown];
33 |
34 | //Access to property to know if the control is performing the animation or not
35 | [menuView isAnimating];
36 | ```
37 |
38 | ## Contact
39 |
40 | Matteo Gobbi
41 |
42 | - http://www.matteogobbi.it
43 | - http://github.com/matteogobbi
44 | - http://twitter.com/matteo_gobbi
45 | - https://angel.co/matteo-gobbi
46 | - http://www.linkedin.com/profile/view?id=24211474
47 |
48 | ## License
49 |
50 | MGFashionMenuView is available under the MIT license.
51 |
--------------------------------------------------------------------------------
/MGFashionMenu.xcodeproj/xcuserdata/matteogobbi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
8 |
20 |
21 |
22 |
24 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/MGFashionMenu.xcodeproj/project.xcworkspace/xcshareddata/MGFashionMenu.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | 6C384A1D-3128-44AE-9C0D-0C3EF89CE84F
9 | IDESourceControlProjectName
10 | MGFashionMenu
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | A0EB1722519769C37444789CE3C58066F015ADD3
14 | https://github.com/matteogobbi/MGFashionMenuView.git
15 |
16 | IDESourceControlProjectPath
17 | MGFashionMenu.xcodeproj/project.xcworkspace
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | A0EB1722519769C37444789CE3C58066F015ADD3
21 | ../..
22 |
23 | IDESourceControlProjectURL
24 | https://github.com/matteogobbi/MGFashionMenuView.git
25 | IDESourceControlProjectVersion
26 | 111
27 | IDESourceControlProjectWCCIdentifier
28 | A0EB1722519769C37444789CE3C58066F015ADD3
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | A0EB1722519769C37444789CE3C58066F015ADD3
36 | IDESourceControlWCCName
37 | MGFashionMenu
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/MGFashionMenu/MGAppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // MGAppDelegate.m
3 | // MGFashionMenu
4 | //
5 | // Created by Matteo Gobbi on 05/07/2014.
6 | // Copyright (c) 2014 Matteo Gobbi. All rights reserved.
7 | //
8 |
9 | #import "MGAppDelegate.h"
10 |
11 | @implementation MGAppDelegate
12 |
13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
14 | {
15 | // Override point for customization after application launch.
16 | return YES;
17 | }
18 |
19 | - (void)applicationWillResignActive:(UIApplication *)application
20 | {
21 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
22 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
23 | }
24 |
25 | - (void)applicationDidEnterBackground:(UIApplication *)application
26 | {
27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
29 | }
30 |
31 | - (void)applicationWillEnterForeground:(UIApplication *)application
32 | {
33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
34 | }
35 |
36 | - (void)applicationDidBecomeActive:(UIApplication *)application
37 | {
38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
39 | }
40 |
41 | - (void)applicationWillTerminate:(UIApplication *)application
42 | {
43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
44 | }
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/MGFashionMenu/MGViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // MGViewController.m
3 | // MGFashionMenu
4 | //
5 | // Created by Matteo Gobbi on 05/07/2014.
6 | // Copyright (c) 2014 Matteo Gobbi. All rights reserved.
7 | //
8 |
9 | #import "MGViewController.h"
10 | #import "MGFashionMenuView.h"
11 | #import
12 |
13 | @interface MGViewController ()
14 |
15 | - (IBAction)menuAction:(id)sender;
16 | - (IBAction)menuAction2:(id)sender;
17 | - (IBAction)menuAction3:(id)sender;
18 |
19 | @end
20 |
21 |
22 | @implementation MGViewController {
23 | MGFashionMenuView *_menuView;
24 | MGFashionMenuView *_menuView2;
25 | MGFashionMenuView *_menuView3;
26 | }
27 |
28 | - (void)viewDidLoad
29 | {
30 | [super viewDidLoad];
31 |
32 | _menuView = [[MGFashionMenuView alloc] initWithMenuView:[self createExampleView]];
33 | [self.view addSubview:_menuView];
34 |
35 | _menuView2 = [[MGFashionMenuView alloc] initWithMenuView:[self createExampleView2] animationType:MGAnimationTypeSoftBounce];
36 | [self.view addSubview:_menuView2];
37 |
38 | _menuView3 = [[MGFashionMenuView alloc] initWithMenuView:[self createExampleView3] animationType:MGAnimationTypeWave];
39 | [self.view addSubview:_menuView3];
40 | }
41 |
42 | - (UIView *)createExampleView {
43 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 60)];
44 | [view setBackgroundColor:[UIColor colorWithRed:0 green:0.722 blue:1 alpha:1]];
45 |
46 | UILabel *lbl = [[UILabel alloc] initWithFrame:view.bounds];
47 | [lbl setText:@"This is a test with Bounce animation"];
48 | [lbl setTextAlignment:NSTextAlignmentCenter];
49 | [lbl setTextColor:[UIColor whiteColor]];
50 | [view addSubview:lbl];
51 | [lbl setCenter:view.center];
52 |
53 | return view;
54 | }
55 |
56 | - (UIView *)createExampleView2 {
57 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
58 | [view setBackgroundColor:[UIColor blackColor]];
59 |
60 | UILabel *lbl = [[UILabel alloc] initWithFrame:view.bounds];
61 | [lbl setText:@"x"];
62 | [lbl setFont:[UIFont boldSystemFontOfSize:16.0]];
63 | [lbl setTextAlignment:NSTextAlignmentCenter];
64 | [lbl setTextColor:[UIColor whiteColor]];
65 | [view addSubview:lbl];
66 | [lbl setCenter:view.center];
67 |
68 | return view;
69 | }
70 |
71 | - (UIView *)createExampleView3 {
72 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 150)];
73 | [view setBackgroundColor:[UIColor colorWithRed:0.2 green:0.722 blue:0.2 alpha:1]];
74 |
75 | UILabel *lbl = [[UILabel alloc] initWithFrame:view.bounds];
76 | [lbl setText:@"This is a test with Wave animation"];
77 | [lbl setTextAlignment:NSTextAlignmentCenter];
78 | [lbl setTextColor:[UIColor whiteColor]];
79 | [view addSubview:lbl];
80 | [lbl setCenter:view.center];
81 |
82 | return view;
83 | }
84 |
85 | - (IBAction)menuAction:(id)sender {
86 | if (_menuView.isShown)
87 | [_menuView hide];
88 | else
89 | [_menuView show];
90 | }
91 |
92 | - (IBAction)menuAction2:(id)sender {
93 | if (_menuView2.isShown)
94 | [_menuView2 hide];
95 | else
96 | [_menuView2 show];
97 | }
98 |
99 | - (IBAction)menuAction3:(id)sender {
100 | if (_menuView3.isShown)
101 | [_menuView3 hide];
102 | else
103 | [_menuView3 show];
104 | }
105 |
106 | - (BOOL)prefersStatusBarHidden {
107 | return YES;
108 | }
109 |
110 | @end
111 |
--------------------------------------------------------------------------------
/MGFashionMenu.xcodeproj/xcuserdata/matteogobbi.xcuserdatad/xcschemes/MGFashionMenu.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
49 |
50 |
51 |
52 |
61 |
62 |
68 |
69 |
70 |
71 |
72 |
73 |
79 |
80 |
86 |
87 |
88 |
89 |
91 |
92 |
95 |
96 |
97 |
--------------------------------------------------------------------------------
/MGFashionMenu/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
28 |
37 |
46 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/MGFashionMenuView/MGFashionMenuView.m:
--------------------------------------------------------------------------------
1 | //
2 | // MGFashionMenuView.m
3 | // MGFashionMenu
4 | //
5 | // Created by Matteo Gobbi on 05/07/2014.
6 | // Copyright (c) 2014 Matteo Gobbi. All rights reserved.
7 | //
8 |
9 | #import "MGFashionMenuView.h"
10 |
11 | static CGFloat const MGSideHelperView = 2.0;
12 | static CGFloat const MGAnimationDuration = .5;
13 |
14 |
15 | struct Animation {
16 | NSTimeInterval sideDelay;
17 | NSTimeInterval sideDumping;
18 | NSTimeInterval sideVelocity;
19 | NSTimeInterval centerDelay;
20 | NSTimeInterval centerDumping;
21 | NSTimeInterval centerVelocity;
22 | };
23 |
24 |
25 | @implementation MGFashionMenuView {
26 | UIView *_centerAnchorView;
27 | UIView *_sideAnchorView;
28 | UIView *_menuView;
29 | UIColor *_fillColor;
30 | CADisplayLink *_displayLink;
31 | struct Animation animation;
32 | }
33 |
34 | - (instancetype)init {
35 | @throw [NSException exceptionWithName:@"Invalid init" reason:@"Use initViewMenuView: instead" userInfo:nil];
36 | }
37 |
38 | - (instancetype)initWithMenuView:(UIView *)menuView {
39 | return [self initWithMenuView:menuView animationType:MGAnimationTypeBounce];
40 | }
41 |
42 | //Init the menuView and the helperViews
43 | - (instancetype)initWithMenuView:(UIView *)menuView animationType:(MGAnimationType)animationType {
44 |
45 | CGRect fakeRect = menuView.frame;
46 |
47 | //Go to make the under view bigger for the animation
48 | fakeRect.size.height += 25.0;
49 |
50 | if (self = [super initWithFrame:fakeRect]) {
51 |
52 | _menuView = menuView;
53 |
54 | //Prepare views positions
55 | _sideAnchorView = [[UIView alloc] initWithFrame:CGRectMake(-MGSideHelperView/2.0, -MGSideHelperView/2.0, MGSideHelperView, MGSideHelperView)];
56 | _centerAnchorView = [[UIView alloc] initWithFrame:CGRectMake(self.frame.size.width/2.0-MGSideHelperView/2.0, -MGSideHelperView/2.0, MGSideHelperView, MGSideHelperView)];
57 | _menuView.frame = CGRectMake(0, -_menuView.frame.size.height, _menuView.frame.size.width, _menuView.frame.size.height);
58 |
59 | //Colors
60 | _fillColor = menuView.backgroundColor;
61 | [self setBackgroundColor:[UIColor clearColor]];
62 | [self setHidden:YES];
63 |
64 | [_menuView setBackgroundColor:[UIColor clearColor]];
65 |
66 | //Animation
67 | [self mg_setValuesForAnimationType:animationType];
68 |
69 | //Flags
70 | _isAnimating = NO;
71 | _isShown = NO;
72 | }
73 |
74 | return self;
75 | }
76 |
77 | //Logic to draw the context for each tick
78 | - (void)drawRect:(CGRect)rect
79 | {
80 | if (!_menuView.superview) {
81 | [self addSubview:_menuView];
82 | [self addSubview:_centerAnchorView];
83 | [self addSubview:_sideAnchorView];
84 | }
85 |
86 | CALayer *sideLayer = _sideAnchorView.layer.presentationLayer;
87 | CALayer *centerLayer = _centerAnchorView.layer.presentationLayer;
88 |
89 | CGPoint sideLayerCenterPoint = CGPointMake(sideLayer.frame.origin.x+sideLayer.frame.size.width/2.0, sideLayer.frame.origin.y+sideLayer.frame.size.height/2.0);
90 | CGPoint centerLayerCenterPoint = CGPointMake(centerLayer.frame.origin.x+centerLayer.frame.size.width/2.0, centerLayer.frame.origin.y+centerLayer.frame.size.height/2.0);
91 |
92 | UIBezierPath *path = [UIBezierPath bezierPath];
93 | [path moveToPoint:sideLayerCenterPoint];
94 | [path addQuadCurveToPoint:CGPointMake(sideLayerCenterPoint.x+_menuView.frame.size.width, sideLayerCenterPoint.y) controlPoint:centerLayerCenterPoint];
95 | [path addLineToPoint:CGPointMake(_menuView.frame.size.width, 0)];
96 | [path addLineToPoint:CGPointMake(0, 0)];
97 | [path closePath];
98 |
99 | CGContextRef context = UIGraphicsGetCurrentContext();
100 | CGContextAddPath(context, path.CGPath);
101 |
102 | [_fillColor setFill];
103 |
104 | CGContextFillPath(context);
105 | }
106 |
107 |
108 |
109 | #pragma mark - Public Methods
110 |
111 | - (void)show {
112 | [self showWithCompletition:nil];
113 | }
114 |
115 | - (void)showWithCompletition:(void (^)(void))completion {
116 | [self mg_animateMenuViewToAppear:YES completition:completion];
117 | }
118 |
119 | - (void)hide {
120 | [self hideWithCompletition:nil];
121 | }
122 |
123 | - (void)hideWithCompletition:(void (^)(void))completion {
124 | [self mg_animateMenuViewToAppear:NO completition:completion];
125 | }
126 |
127 | #pragma mark - Private Methods
128 |
129 | //Animation of the helperViews
130 | - (void)mg_animateMenuViewToAppear:(BOOL)needsToAppear completition:(void (^)(void))completion {
131 |
132 | if (_isShown != needsToAppear && !_isAnimating) {
133 |
134 | if (needsToAppear) {
135 | [self setHidden:NO];
136 | }
137 |
138 | _isAnimating = YES;
139 |
140 | _displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(mg_tick:)];
141 | [_displayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSDefaultRunLoopMode];
142 |
143 |
144 | [UIView animateWithDuration:MGAnimationDuration delay:animation.sideDelay usingSpringWithDamping:animation.sideDumping initialSpringVelocity:animation.sideVelocity options:(UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionAllowUserInteraction) animations:^{
145 |
146 | if (needsToAppear) {
147 | _sideAnchorView.frame = CGRectMake(_sideAnchorView.frame.origin.x, _menuView.frame.size.height-MGSideHelperView/2.0, MGSideHelperView, MGSideHelperView);
148 | _menuView.frame = CGRectMake(_menuView.frame.origin.x, 0, _menuView.frame.size.width, _menuView.frame.size.height);
149 | } else
150 | _sideAnchorView.frame = CGRectMake(_sideAnchorView.frame.origin.x, -MGSideHelperView/2.0, MGSideHelperView, MGSideHelperView);
151 |
152 | } completion:^(BOOL finished) {
153 |
154 | [_displayLink invalidate];
155 | _displayLink = nil;
156 | _isShown = needsToAppear;
157 | _isAnimating = NO;
158 |
159 | if (!needsToAppear) {
160 | [self setHidden:YES];
161 | }
162 |
163 | if (completion) {
164 | completion();
165 | }
166 | }];
167 |
168 |
169 | [UIView animateWithDuration:MGAnimationDuration delay:animation.centerDelay usingSpringWithDamping:animation.centerDumping initialSpringVelocity:animation.centerVelocity options:(UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionAllowUserInteraction) animations:^{
170 |
171 | if (needsToAppear)
172 | _centerAnchorView.frame = CGRectMake(_centerAnchorView.frame.origin.x, _menuView.frame.size.height-MGSideHelperView/2.0, MGSideHelperView, MGSideHelperView);
173 | else {
174 | _centerAnchorView.frame = CGRectMake(_centerAnchorView.frame.origin.x, -MGSideHelperView/2.0, MGSideHelperView, MGSideHelperView);
175 | _menuView.frame = CGRectMake(_menuView.frame.origin.x, -_menuView.frame.size.height, _menuView.frame.size.width, _menuView.frame.size.height);
176 | }
177 |
178 | } completion:nil];
179 |
180 | }
181 | }
182 |
183 | //Called from the displayLink each frame of the view changes
184 | - (void)mg_tick:(CADisplayLink *)displayLink {
185 | [self setNeedsDisplay];
186 | }
187 |
188 | - (void)mg_setValuesForAnimationType:(MGAnimationType)animationType {
189 | switch (animationType) {
190 | case MGAnimationTypeBounce: {
191 | animation.sideDelay = .1;
192 | animation.sideDumping = .4;
193 | animation.sideVelocity = .9;
194 | animation.centerDelay = 0;
195 | animation.centerDumping = .6;
196 | animation.centerVelocity = .6;
197 | }
198 | break;
199 |
200 | case MGAnimationTypeSoftBounce: {
201 | animation.sideDelay = .1;
202 | animation.sideDumping = .6;
203 | animation.sideVelocity = .6;
204 | animation.centerDelay = 0;
205 | animation.centerDumping = .6;
206 | animation.centerVelocity = .6;
207 | }
208 | break;
209 |
210 | case MGAnimationTypeHardBounce: {
211 | animation.sideDelay = .1;
212 | animation.sideDumping = .3;
213 | animation.sideVelocity = .7;
214 | animation.centerDelay = 0;
215 | animation.centerDumping = .6;
216 | animation.centerVelocity = .4;
217 | }
218 | break;
219 |
220 | case MGAnimationTypeWave: {
221 | animation.sideDelay = .0;
222 | animation.sideDumping = .5;
223 | animation.sideVelocity = .5;
224 | animation.centerDelay = .1;
225 | animation.centerDumping = .5;
226 | animation.centerVelocity = .5;
227 | }
228 | break;
229 |
230 | default:
231 | break;
232 | }
233 | }
234 |
235 | @end
236 |
--------------------------------------------------------------------------------
/MGFashionMenu.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 65846A8119716D8000382341 /* MGFashionMenuView.m in Sources */ = {isa = PBXBuildFile; fileRef = 65846A8019716D8000382341 /* MGFashionMenuView.m */; };
11 | 65FDA4041968AE5A001DF616 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 65FDA4031968AE5A001DF616 /* Foundation.framework */; };
12 | 65FDA4061968AE5A001DF616 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 65FDA4051968AE5A001DF616 /* CoreGraphics.framework */; };
13 | 65FDA4081968AE5A001DF616 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 65FDA4071968AE5A001DF616 /* UIKit.framework */; };
14 | 65FDA40E1968AE5A001DF616 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 65FDA40C1968AE5A001DF616 /* InfoPlist.strings */; };
15 | 65FDA4101968AE5A001DF616 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 65FDA40F1968AE5A001DF616 /* main.m */; };
16 | 65FDA4141968AE5A001DF616 /* MGAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 65FDA4131968AE5A001DF616 /* MGAppDelegate.m */; };
17 | 65FDA4171968AE5A001DF616 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 65FDA4151968AE5A001DF616 /* Main.storyboard */; };
18 | 65FDA41A1968AE5A001DF616 /* MGViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 65FDA4191968AE5A001DF616 /* MGViewController.m */; };
19 | 65FDA41C1968AE5A001DF616 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 65FDA41B1968AE5A001DF616 /* Images.xcassets */; };
20 | 65FDA4231968AE5A001DF616 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 65FDA4221968AE5A001DF616 /* XCTest.framework */; };
21 | 65FDA4241968AE5A001DF616 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 65FDA4031968AE5A001DF616 /* Foundation.framework */; };
22 | 65FDA4251968AE5A001DF616 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 65FDA4071968AE5A001DF616 /* UIKit.framework */; };
23 | 65FDA42D1968AE5A001DF616 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 65FDA42B1968AE5A001DF616 /* InfoPlist.strings */; };
24 | 65FDA42F1968AE5A001DF616 /* MGFashionMenuTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 65FDA42E1968AE5A001DF616 /* MGFashionMenuTests.m */; };
25 | /* End PBXBuildFile section */
26 |
27 | /* Begin PBXContainerItemProxy section */
28 | 65FDA4261968AE5A001DF616 /* PBXContainerItemProxy */ = {
29 | isa = PBXContainerItemProxy;
30 | containerPortal = 65FDA3F81968AE5A001DF616 /* Project object */;
31 | proxyType = 1;
32 | remoteGlobalIDString = 65FDA3FF1968AE5A001DF616;
33 | remoteInfo = MGFashionMenu;
34 | };
35 | /* End PBXContainerItemProxy section */
36 |
37 | /* Begin PBXFileReference section */
38 | 65846A7F19716D8000382341 /* MGFashionMenuView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGFashionMenuView.h; sourceTree = ""; };
39 | 65846A8019716D8000382341 /* MGFashionMenuView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGFashionMenuView.m; sourceTree = ""; };
40 | 65FDA4001968AE5A001DF616 /* MGFashionMenu.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MGFashionMenu.app; sourceTree = BUILT_PRODUCTS_DIR; };
41 | 65FDA4031968AE5A001DF616 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
42 | 65FDA4051968AE5A001DF616 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
43 | 65FDA4071968AE5A001DF616 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
44 | 65FDA40B1968AE5A001DF616 /* MGFashionMenu-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "MGFashionMenu-Info.plist"; sourceTree = ""; };
45 | 65FDA40D1968AE5A001DF616 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
46 | 65FDA40F1968AE5A001DF616 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
47 | 65FDA4111968AE5A001DF616 /* MGFashionMenu-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MGFashionMenu-Prefix.pch"; sourceTree = ""; };
48 | 65FDA4121968AE5A001DF616 /* MGAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MGAppDelegate.h; sourceTree = ""; };
49 | 65FDA4131968AE5A001DF616 /* MGAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MGAppDelegate.m; sourceTree = ""; };
50 | 65FDA4161968AE5A001DF616 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
51 | 65FDA4181968AE5A001DF616 /* MGViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MGViewController.h; sourceTree = ""; };
52 | 65FDA4191968AE5A001DF616 /* MGViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MGViewController.m; sourceTree = ""; };
53 | 65FDA41B1968AE5A001DF616 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
54 | 65FDA4211968AE5A001DF616 /* MGFashionMenuTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MGFashionMenuTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
55 | 65FDA4221968AE5A001DF616 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
56 | 65FDA42A1968AE5A001DF616 /* MGFashionMenuTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "MGFashionMenuTests-Info.plist"; sourceTree = ""; };
57 | 65FDA42C1968AE5A001DF616 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
58 | 65FDA42E1968AE5A001DF616 /* MGFashionMenuTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MGFashionMenuTests.m; sourceTree = ""; };
59 | /* End PBXFileReference section */
60 |
61 | /* Begin PBXFrameworksBuildPhase section */
62 | 65FDA3FD1968AE5A001DF616 /* Frameworks */ = {
63 | isa = PBXFrameworksBuildPhase;
64 | buildActionMask = 2147483647;
65 | files = (
66 | 65FDA4061968AE5A001DF616 /* CoreGraphics.framework in Frameworks */,
67 | 65FDA4081968AE5A001DF616 /* UIKit.framework in Frameworks */,
68 | 65FDA4041968AE5A001DF616 /* Foundation.framework in Frameworks */,
69 | );
70 | runOnlyForDeploymentPostprocessing = 0;
71 | };
72 | 65FDA41E1968AE5A001DF616 /* Frameworks */ = {
73 | isa = PBXFrameworksBuildPhase;
74 | buildActionMask = 2147483647;
75 | files = (
76 | 65FDA4231968AE5A001DF616 /* XCTest.framework in Frameworks */,
77 | 65FDA4251968AE5A001DF616 /* UIKit.framework in Frameworks */,
78 | 65FDA4241968AE5A001DF616 /* Foundation.framework in Frameworks */,
79 | );
80 | runOnlyForDeploymentPostprocessing = 0;
81 | };
82 | /* End PBXFrameworksBuildPhase section */
83 |
84 | /* Begin PBXGroup section */
85 | 65846A7E19716D8000382341 /* MGFashionMenuView */ = {
86 | isa = PBXGroup;
87 | children = (
88 | 65846A7F19716D8000382341 /* MGFashionMenuView.h */,
89 | 65846A8019716D8000382341 /* MGFashionMenuView.m */,
90 | );
91 | path = MGFashionMenuView;
92 | sourceTree = SOURCE_ROOT;
93 | };
94 | 65FDA3F71968AE5A001DF616 = {
95 | isa = PBXGroup;
96 | children = (
97 | 65FDA4091968AE5A001DF616 /* MGFashionMenu */,
98 | 65FDA4281968AE5A001DF616 /* MGFashionMenuTests */,
99 | 65FDA4021968AE5A001DF616 /* Frameworks */,
100 | 65FDA4011968AE5A001DF616 /* Products */,
101 | );
102 | sourceTree = "";
103 | };
104 | 65FDA4011968AE5A001DF616 /* Products */ = {
105 | isa = PBXGroup;
106 | children = (
107 | 65FDA4001968AE5A001DF616 /* MGFashionMenu.app */,
108 | 65FDA4211968AE5A001DF616 /* MGFashionMenuTests.xctest */,
109 | );
110 | name = Products;
111 | sourceTree = "";
112 | };
113 | 65FDA4021968AE5A001DF616 /* Frameworks */ = {
114 | isa = PBXGroup;
115 | children = (
116 | 65FDA4031968AE5A001DF616 /* Foundation.framework */,
117 | 65FDA4051968AE5A001DF616 /* CoreGraphics.framework */,
118 | 65FDA4071968AE5A001DF616 /* UIKit.framework */,
119 | 65FDA4221968AE5A001DF616 /* XCTest.framework */,
120 | );
121 | name = Frameworks;
122 | sourceTree = "";
123 | };
124 | 65FDA4091968AE5A001DF616 /* MGFashionMenu */ = {
125 | isa = PBXGroup;
126 | children = (
127 | 65846A7E19716D8000382341 /* MGFashionMenuView */,
128 | 65FDA4121968AE5A001DF616 /* MGAppDelegate.h */,
129 | 65FDA4131968AE5A001DF616 /* MGAppDelegate.m */,
130 | 65FDA4151968AE5A001DF616 /* Main.storyboard */,
131 | 65FDA4181968AE5A001DF616 /* MGViewController.h */,
132 | 65FDA4191968AE5A001DF616 /* MGViewController.m */,
133 | 65FDA41B1968AE5A001DF616 /* Images.xcassets */,
134 | 65FDA40A1968AE5A001DF616 /* Supporting Files */,
135 | );
136 | path = MGFashionMenu;
137 | sourceTree = "";
138 | };
139 | 65FDA40A1968AE5A001DF616 /* Supporting Files */ = {
140 | isa = PBXGroup;
141 | children = (
142 | 65FDA40B1968AE5A001DF616 /* MGFashionMenu-Info.plist */,
143 | 65FDA40C1968AE5A001DF616 /* InfoPlist.strings */,
144 | 65FDA40F1968AE5A001DF616 /* main.m */,
145 | 65FDA4111968AE5A001DF616 /* MGFashionMenu-Prefix.pch */,
146 | );
147 | name = "Supporting Files";
148 | sourceTree = "";
149 | };
150 | 65FDA4281968AE5A001DF616 /* MGFashionMenuTests */ = {
151 | isa = PBXGroup;
152 | children = (
153 | 65FDA42E1968AE5A001DF616 /* MGFashionMenuTests.m */,
154 | 65FDA4291968AE5A001DF616 /* Supporting Files */,
155 | );
156 | path = MGFashionMenuTests;
157 | sourceTree = "";
158 | };
159 | 65FDA4291968AE5A001DF616 /* Supporting Files */ = {
160 | isa = PBXGroup;
161 | children = (
162 | 65FDA42A1968AE5A001DF616 /* MGFashionMenuTests-Info.plist */,
163 | 65FDA42B1968AE5A001DF616 /* InfoPlist.strings */,
164 | );
165 | name = "Supporting Files";
166 | sourceTree = "";
167 | };
168 | /* End PBXGroup section */
169 |
170 | /* Begin PBXNativeTarget section */
171 | 65FDA3FF1968AE5A001DF616 /* MGFashionMenu */ = {
172 | isa = PBXNativeTarget;
173 | buildConfigurationList = 65FDA4321968AE5A001DF616 /* Build configuration list for PBXNativeTarget "MGFashionMenu" */;
174 | buildPhases = (
175 | 65FDA3FC1968AE5A001DF616 /* Sources */,
176 | 65FDA3FD1968AE5A001DF616 /* Frameworks */,
177 | 65FDA3FE1968AE5A001DF616 /* Resources */,
178 | );
179 | buildRules = (
180 | );
181 | dependencies = (
182 | );
183 | name = MGFashionMenu;
184 | productName = MGFashionMenu;
185 | productReference = 65FDA4001968AE5A001DF616 /* MGFashionMenu.app */;
186 | productType = "com.apple.product-type.application";
187 | };
188 | 65FDA4201968AE5A001DF616 /* MGFashionMenuTests */ = {
189 | isa = PBXNativeTarget;
190 | buildConfigurationList = 65FDA4351968AE5A001DF616 /* Build configuration list for PBXNativeTarget "MGFashionMenuTests" */;
191 | buildPhases = (
192 | 65FDA41D1968AE5A001DF616 /* Sources */,
193 | 65FDA41E1968AE5A001DF616 /* Frameworks */,
194 | 65FDA41F1968AE5A001DF616 /* Resources */,
195 | );
196 | buildRules = (
197 | );
198 | dependencies = (
199 | 65FDA4271968AE5A001DF616 /* PBXTargetDependency */,
200 | );
201 | name = MGFashionMenuTests;
202 | productName = MGFashionMenuTests;
203 | productReference = 65FDA4211968AE5A001DF616 /* MGFashionMenuTests.xctest */;
204 | productType = "com.apple.product-type.bundle.unit-test";
205 | };
206 | /* End PBXNativeTarget section */
207 |
208 | /* Begin PBXProject section */
209 | 65FDA3F81968AE5A001DF616 /* Project object */ = {
210 | isa = PBXProject;
211 | attributes = {
212 | CLASSPREFIX = MG;
213 | LastUpgradeCheck = 0510;
214 | ORGANIZATIONNAME = "Matteo Gobbi";
215 | TargetAttributes = {
216 | 65FDA4201968AE5A001DF616 = {
217 | TestTargetID = 65FDA3FF1968AE5A001DF616;
218 | };
219 | };
220 | };
221 | buildConfigurationList = 65FDA3FB1968AE5A001DF616 /* Build configuration list for PBXProject "MGFashionMenu" */;
222 | compatibilityVersion = "Xcode 3.2";
223 | developmentRegion = English;
224 | hasScannedForEncodings = 0;
225 | knownRegions = (
226 | en,
227 | Base,
228 | );
229 | mainGroup = 65FDA3F71968AE5A001DF616;
230 | productRefGroup = 65FDA4011968AE5A001DF616 /* Products */;
231 | projectDirPath = "";
232 | projectRoot = "";
233 | targets = (
234 | 65FDA3FF1968AE5A001DF616 /* MGFashionMenu */,
235 | 65FDA4201968AE5A001DF616 /* MGFashionMenuTests */,
236 | );
237 | };
238 | /* End PBXProject section */
239 |
240 | /* Begin PBXResourcesBuildPhase section */
241 | 65FDA3FE1968AE5A001DF616 /* Resources */ = {
242 | isa = PBXResourcesBuildPhase;
243 | buildActionMask = 2147483647;
244 | files = (
245 | 65FDA41C1968AE5A001DF616 /* Images.xcassets in Resources */,
246 | 65FDA40E1968AE5A001DF616 /* InfoPlist.strings in Resources */,
247 | 65FDA4171968AE5A001DF616 /* Main.storyboard in Resources */,
248 | );
249 | runOnlyForDeploymentPostprocessing = 0;
250 | };
251 | 65FDA41F1968AE5A001DF616 /* Resources */ = {
252 | isa = PBXResourcesBuildPhase;
253 | buildActionMask = 2147483647;
254 | files = (
255 | 65FDA42D1968AE5A001DF616 /* InfoPlist.strings in Resources */,
256 | );
257 | runOnlyForDeploymentPostprocessing = 0;
258 | };
259 | /* End PBXResourcesBuildPhase section */
260 |
261 | /* Begin PBXSourcesBuildPhase section */
262 | 65FDA3FC1968AE5A001DF616 /* Sources */ = {
263 | isa = PBXSourcesBuildPhase;
264 | buildActionMask = 2147483647;
265 | files = (
266 | 65FDA4141968AE5A001DF616 /* MGAppDelegate.m in Sources */,
267 | 65846A8119716D8000382341 /* MGFashionMenuView.m in Sources */,
268 | 65FDA41A1968AE5A001DF616 /* MGViewController.m in Sources */,
269 | 65FDA4101968AE5A001DF616 /* main.m in Sources */,
270 | );
271 | runOnlyForDeploymentPostprocessing = 0;
272 | };
273 | 65FDA41D1968AE5A001DF616 /* Sources */ = {
274 | isa = PBXSourcesBuildPhase;
275 | buildActionMask = 2147483647;
276 | files = (
277 | 65FDA42F1968AE5A001DF616 /* MGFashionMenuTests.m in Sources */,
278 | );
279 | runOnlyForDeploymentPostprocessing = 0;
280 | };
281 | /* End PBXSourcesBuildPhase section */
282 |
283 | /* Begin PBXTargetDependency section */
284 | 65FDA4271968AE5A001DF616 /* PBXTargetDependency */ = {
285 | isa = PBXTargetDependency;
286 | target = 65FDA3FF1968AE5A001DF616 /* MGFashionMenu */;
287 | targetProxy = 65FDA4261968AE5A001DF616 /* PBXContainerItemProxy */;
288 | };
289 | /* End PBXTargetDependency section */
290 |
291 | /* Begin PBXVariantGroup section */
292 | 65FDA40C1968AE5A001DF616 /* InfoPlist.strings */ = {
293 | isa = PBXVariantGroup;
294 | children = (
295 | 65FDA40D1968AE5A001DF616 /* en */,
296 | );
297 | name = InfoPlist.strings;
298 | sourceTree = "";
299 | };
300 | 65FDA4151968AE5A001DF616 /* Main.storyboard */ = {
301 | isa = PBXVariantGroup;
302 | children = (
303 | 65FDA4161968AE5A001DF616 /* Base */,
304 | );
305 | name = Main.storyboard;
306 | sourceTree = "";
307 | };
308 | 65FDA42B1968AE5A001DF616 /* InfoPlist.strings */ = {
309 | isa = PBXVariantGroup;
310 | children = (
311 | 65FDA42C1968AE5A001DF616 /* en */,
312 | );
313 | name = InfoPlist.strings;
314 | sourceTree = "";
315 | };
316 | /* End PBXVariantGroup section */
317 |
318 | /* Begin XCBuildConfiguration section */
319 | 65FDA4301968AE5A001DF616 /* Debug */ = {
320 | isa = XCBuildConfiguration;
321 | buildSettings = {
322 | ALWAYS_SEARCH_USER_PATHS = NO;
323 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
324 | CLANG_CXX_LIBRARY = "libc++";
325 | CLANG_ENABLE_MODULES = YES;
326 | CLANG_ENABLE_OBJC_ARC = YES;
327 | CLANG_WARN_BOOL_CONVERSION = YES;
328 | CLANG_WARN_CONSTANT_CONVERSION = YES;
329 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
330 | CLANG_WARN_EMPTY_BODY = YES;
331 | CLANG_WARN_ENUM_CONVERSION = YES;
332 | CLANG_WARN_INT_CONVERSION = YES;
333 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
334 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
335 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
336 | COPY_PHASE_STRIP = NO;
337 | GCC_C_LANGUAGE_STANDARD = gnu99;
338 | GCC_DYNAMIC_NO_PIC = NO;
339 | GCC_OPTIMIZATION_LEVEL = 0;
340 | GCC_PREPROCESSOR_DEFINITIONS = (
341 | "DEBUG=1",
342 | "$(inherited)",
343 | );
344 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
345 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
346 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
347 | GCC_WARN_UNDECLARED_SELECTOR = YES;
348 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
349 | GCC_WARN_UNUSED_FUNCTION = YES;
350 | GCC_WARN_UNUSED_VARIABLE = YES;
351 | IPHONEOS_DEPLOYMENT_TARGET = 7.1;
352 | ONLY_ACTIVE_ARCH = YES;
353 | SDKROOT = iphoneos;
354 | };
355 | name = Debug;
356 | };
357 | 65FDA4311968AE5A001DF616 /* Release */ = {
358 | isa = XCBuildConfiguration;
359 | buildSettings = {
360 | ALWAYS_SEARCH_USER_PATHS = NO;
361 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
362 | CLANG_CXX_LIBRARY = "libc++";
363 | CLANG_ENABLE_MODULES = YES;
364 | CLANG_ENABLE_OBJC_ARC = YES;
365 | CLANG_WARN_BOOL_CONVERSION = YES;
366 | CLANG_WARN_CONSTANT_CONVERSION = YES;
367 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
368 | CLANG_WARN_EMPTY_BODY = YES;
369 | CLANG_WARN_ENUM_CONVERSION = YES;
370 | CLANG_WARN_INT_CONVERSION = YES;
371 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
372 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
373 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
374 | COPY_PHASE_STRIP = YES;
375 | ENABLE_NS_ASSERTIONS = NO;
376 | GCC_C_LANGUAGE_STANDARD = gnu99;
377 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
378 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
379 | GCC_WARN_UNDECLARED_SELECTOR = YES;
380 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
381 | GCC_WARN_UNUSED_FUNCTION = YES;
382 | GCC_WARN_UNUSED_VARIABLE = YES;
383 | IPHONEOS_DEPLOYMENT_TARGET = 7.1;
384 | SDKROOT = iphoneos;
385 | VALIDATE_PRODUCT = YES;
386 | };
387 | name = Release;
388 | };
389 | 65FDA4331968AE5A001DF616 /* Debug */ = {
390 | isa = XCBuildConfiguration;
391 | buildSettings = {
392 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
393 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
394 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
395 | GCC_PREFIX_HEADER = "MGFashionMenu/MGFashionMenu-Prefix.pch";
396 | INFOPLIST_FILE = "MGFashionMenu/MGFashionMenu-Info.plist";
397 | PRODUCT_NAME = "$(TARGET_NAME)";
398 | WRAPPER_EXTENSION = app;
399 | };
400 | name = Debug;
401 | };
402 | 65FDA4341968AE5A001DF616 /* Release */ = {
403 | isa = XCBuildConfiguration;
404 | buildSettings = {
405 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
406 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
407 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
408 | GCC_PREFIX_HEADER = "MGFashionMenu/MGFashionMenu-Prefix.pch";
409 | INFOPLIST_FILE = "MGFashionMenu/MGFashionMenu-Info.plist";
410 | PRODUCT_NAME = "$(TARGET_NAME)";
411 | WRAPPER_EXTENSION = app;
412 | };
413 | name = Release;
414 | };
415 | 65FDA4361968AE5A001DF616 /* Debug */ = {
416 | isa = XCBuildConfiguration;
417 | buildSettings = {
418 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/MGFashionMenu.app/MGFashionMenu";
419 | FRAMEWORK_SEARCH_PATHS = (
420 | "$(SDKROOT)/Developer/Library/Frameworks",
421 | "$(inherited)",
422 | "$(DEVELOPER_FRAMEWORKS_DIR)",
423 | );
424 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
425 | GCC_PREFIX_HEADER = "MGFashionMenu/MGFashionMenu-Prefix.pch";
426 | GCC_PREPROCESSOR_DEFINITIONS = (
427 | "DEBUG=1",
428 | "$(inherited)",
429 | );
430 | INFOPLIST_FILE = "MGFashionMenuTests/MGFashionMenuTests-Info.plist";
431 | PRODUCT_NAME = "$(TARGET_NAME)";
432 | TEST_HOST = "$(BUNDLE_LOADER)";
433 | WRAPPER_EXTENSION = xctest;
434 | };
435 | name = Debug;
436 | };
437 | 65FDA4371968AE5A001DF616 /* Release */ = {
438 | isa = XCBuildConfiguration;
439 | buildSettings = {
440 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/MGFashionMenu.app/MGFashionMenu";
441 | FRAMEWORK_SEARCH_PATHS = (
442 | "$(SDKROOT)/Developer/Library/Frameworks",
443 | "$(inherited)",
444 | "$(DEVELOPER_FRAMEWORKS_DIR)",
445 | );
446 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
447 | GCC_PREFIX_HEADER = "MGFashionMenu/MGFashionMenu-Prefix.pch";
448 | INFOPLIST_FILE = "MGFashionMenuTests/MGFashionMenuTests-Info.plist";
449 | PRODUCT_NAME = "$(TARGET_NAME)";
450 | TEST_HOST = "$(BUNDLE_LOADER)";
451 | WRAPPER_EXTENSION = xctest;
452 | };
453 | name = Release;
454 | };
455 | /* End XCBuildConfiguration section */
456 |
457 | /* Begin XCConfigurationList section */
458 | 65FDA3FB1968AE5A001DF616 /* Build configuration list for PBXProject "MGFashionMenu" */ = {
459 | isa = XCConfigurationList;
460 | buildConfigurations = (
461 | 65FDA4301968AE5A001DF616 /* Debug */,
462 | 65FDA4311968AE5A001DF616 /* Release */,
463 | );
464 | defaultConfigurationIsVisible = 0;
465 | defaultConfigurationName = Release;
466 | };
467 | 65FDA4321968AE5A001DF616 /* Build configuration list for PBXNativeTarget "MGFashionMenu" */ = {
468 | isa = XCConfigurationList;
469 | buildConfigurations = (
470 | 65FDA4331968AE5A001DF616 /* Debug */,
471 | 65FDA4341968AE5A001DF616 /* Release */,
472 | );
473 | defaultConfigurationIsVisible = 0;
474 | defaultConfigurationName = Release;
475 | };
476 | 65FDA4351968AE5A001DF616 /* Build configuration list for PBXNativeTarget "MGFashionMenuTests" */ = {
477 | isa = XCConfigurationList;
478 | buildConfigurations = (
479 | 65FDA4361968AE5A001DF616 /* Debug */,
480 | 65FDA4371968AE5A001DF616 /* Release */,
481 | );
482 | defaultConfigurationIsVisible = 0;
483 | defaultConfigurationName = Release;
484 | };
485 | /* End XCConfigurationList section */
486 | };
487 | rootObject = 65FDA3F81968AE5A001DF616 /* Project object */;
488 | }
489 |
--------------------------------------------------------------------------------