├── .DS_Store
├── EleMeCartListDemo
├── .DS_Store
├── gif5新文件.gif
├── EleMeCartListDemo
│ ├── .DS_Store
│ ├── CartList
│ │ ├── .DS_Store
│ │ ├── CartListViewController.h
│ │ ├── Views
│ │ │ ├── CartBottomView.h
│ │ │ ├── CartAddView.h
│ │ │ ├── CartBottomView.m
│ │ │ └── CartAddView.m
│ │ ├── Utils
│ │ │ ├── UIControl+Button.h
│ │ │ ├── UIControl+Button.m
│ │ │ ├── CommonUI.h
│ │ │ ├── UIView+Size.h
│ │ │ ├── CommonUI.m
│ │ │ └── UIView+Size.m
│ │ ├── Cells
│ │ │ ├── CartListTableViewCell.h
│ │ │ └── CartListTableViewCell.m
│ │ └── CartListViewController.m
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── main.m
│ ├── ViewController.m
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ ├── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ └── AppDelegate.m
└── EleMeCartListDemo.xcodeproj
│ ├── xcuserdata
│ └── chaojiwandianshang.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── xcschememanagement.plist
│ │ └── EleMeCartListDemo.xcscheme
│ ├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ └── chaojiwandianshang.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
│ └── project.pbxproj
└── README.md
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SionChen/EleMeCartListDemo/HEAD/.DS_Store
--------------------------------------------------------------------------------
/EleMeCartListDemo/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SionChen/EleMeCartListDemo/HEAD/EleMeCartListDemo/.DS_Store
--------------------------------------------------------------------------------
/EleMeCartListDemo/gif5新文件.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SionChen/EleMeCartListDemo/HEAD/EleMeCartListDemo/gif5新文件.gif
--------------------------------------------------------------------------------
/EleMeCartListDemo/EleMeCartListDemo/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SionChen/EleMeCartListDemo/HEAD/EleMeCartListDemo/EleMeCartListDemo/.DS_Store
--------------------------------------------------------------------------------
/EleMeCartListDemo/EleMeCartListDemo/CartList/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SionChen/EleMeCartListDemo/HEAD/EleMeCartListDemo/EleMeCartListDemo/CartList/.DS_Store
--------------------------------------------------------------------------------
/EleMeCartListDemo/EleMeCartListDemo.xcodeproj/xcuserdata/chaojiwandianshang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # EleMeCartListDemo
2 | 仿饿了么 美团 购物车 点餐页面的动画效果
3 |
4 | 公司计划要做想饿了么点餐效果的 加入购物车动画。于是就研究了一下 写了个小demo
5 |
6 | 
7 |
--------------------------------------------------------------------------------
/EleMeCartListDemo/EleMeCartListDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/EleMeCartListDemo/EleMeCartListDemo.xcodeproj/project.xcworkspace/xcuserdata/chaojiwandianshang.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SionChen/EleMeCartListDemo/HEAD/EleMeCartListDemo/EleMeCartListDemo.xcodeproj/project.xcworkspace/xcuserdata/chaojiwandianshang.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/EleMeCartListDemo/EleMeCartListDemo/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // EleMeCartListDemo
4 | //
5 | // Created by 超级腕电商 on 2017/9/15.
6 | // Copyright © 2017年 超级腕电商. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/EleMeCartListDemo/EleMeCartListDemo/CartList/CartListViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // CartListViewController.h
3 | // EleMeCartListDemo
4 | //
5 | // Created by 超级腕电商 on 2017/9/15.
6 | // Copyright © 2017年 超级腕电商. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CartListViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/EleMeCartListDemo/EleMeCartListDemo/CartList/Views/CartBottomView.h:
--------------------------------------------------------------------------------
1 | //
2 | // CartBottomView.h
3 | // EleMeCartListDemo
4 | //
5 | // Created by 超级腕电商 on 2017/9/15.
6 | // Copyright © 2017年 超级腕电商. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CartBottomView : UIView
12 | @property (nonatomic,strong) UIButton *cartButton;//icon
13 | @end
14 |
--------------------------------------------------------------------------------
/EleMeCartListDemo/EleMeCartListDemo/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // EleMeCartListDemo
4 | //
5 | // Created by 超级腕电商 on 2017/9/15.
6 | // Copyright © 2017年 超级腕电商. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/EleMeCartListDemo/EleMeCartListDemo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // EleMeCartListDemo
4 | //
5 | // Created by 超级腕电商 on 2017/9/15.
6 | // Copyright © 2017年 超级腕电商. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/EleMeCartListDemo/EleMeCartListDemo/CartList/Utils/UIControl+Button.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIControl+Button.h
3 | // Project
4 | //
5 | // Created by 超级腕电商 on 2017/9/5.
6 | // Copyright © 2017年 super. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIControl (Button)
12 |
13 | typedef void (^ActionBlock)(UIControl *control);
14 | - (void)addMethodBlock:(ActionBlock)actionBlock WithEvents:(UIControlEvents)controlEvents;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/EleMeCartListDemo/EleMeCartListDemo/CartList/Cells/CartListTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // CartListTableViewCell.h
3 | // EleMeCartListDemo
4 | //
5 | // Created by 超级腕电商 on 2017/9/15.
6 | // Copyright © 2017年 超级腕电商. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "CartAddView.h"
11 | @class CartAddView;
12 |
13 | @interface CartListTableViewCell : UITableViewCell
14 |
15 | @property (nonatomic,strong) CartAddView *addView;
16 | @property (nonatomic,weak) id delegate;
17 | @end
18 |
19 |
--------------------------------------------------------------------------------
/EleMeCartListDemo/EleMeCartListDemo/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // EleMeCartListDemo
4 | //
5 | // Created by 超级腕电商 on 2017/9/15.
6 | // Copyright © 2017年 超级腕电商. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | @interface ViewController ()
12 |
13 | @end
14 |
15 | @implementation ViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do any additional setup after loading the view, typically from a nib.
20 | }
21 |
22 |
23 | - (void)didReceiveMemoryWarning {
24 | [super didReceiveMemoryWarning];
25 | // Dispose of any resources that can be recreated.
26 | }
27 |
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/EleMeCartListDemo/EleMeCartListDemo.xcodeproj/xcuserdata/chaojiwandianshang.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | EleMeCartListDemo.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 55F9180E1F6BBA5700CEAFBD
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/EleMeCartListDemo/EleMeCartListDemo/Assets.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" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/EleMeCartListDemo/EleMeCartListDemo/CartList/Utils/UIControl+Button.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIControl+Button.m
3 | // Project
4 | //
5 | // Created by 超级腕电商 on 2017/9/5.
6 | // Copyright © 2017年 super. All rights reserved.
7 | //
8 |
9 | #import "UIControl+Button.h"
10 | #import
11 |
12 | @implementation UIControl (Button)
13 | static char kButtonActionKey;
14 |
15 | - (void)addMethodBlock:(ActionBlock)actionBlock WithEvents:(UIControlEvents)controlEvents{
16 | ///id object, const void *key, id value, objc_AssociationPolicy policy
17 | objc_setAssociatedObject(self, &kButtonActionKey, actionBlock, OBJC_ASSOCIATION_COPY_NONATOMIC);
18 | [self addTarget:self action:@selector(myAction) forControlEvents:controlEvents];
19 |
20 | }
21 |
22 | - (void)myAction{
23 | ActionBlock block = (ActionBlock)objc_getAssociatedObject(self, &kButtonActionKey);
24 | if (block) {
25 | block(self);
26 | }
27 | }
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/EleMeCartListDemo/EleMeCartListDemo/CartList/Utils/CommonUI.h:
--------------------------------------------------------------------------------
1 | //
2 | // CommonUI.h
3 | //
4 | //
5 | // Created by 超级腕电商 on 16/12/16.
6 | // Copyright © 2016年 super. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "UIControl+Button.h"
11 |
12 | @interface CommonUI : NSObject
13 |
14 | + (UIBarButtonItem *)rightBarBtnItemWithTitle:(NSString *)title target:(id)target action:(SEL)action;
15 | //
16 | + (UIButton *)rightButtonWithTitle:(NSString *)title target:(id)target action:(SEL)action;
17 |
18 |
19 | /**
20 | 创建按钮
21 |
22 | @param frame
23 | @param backgroundColor
24 | @param title
25 | @param font
26 | @param color
27 | @param actionBlock
28 | @return
29 | */
30 | +(UIButton *)creatButtonWithFrame:(CGRect)frame
31 | backgroundColor:(UIColor *)backgroundColor
32 | title:(NSString *)title
33 | titleFont:(UIFont *)font
34 | titleColor:(UIColor *)color
35 | actionBlock:(ActionBlock)actionBlock;
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/EleMeCartListDemo/EleMeCartListDemo/CartList/Views/CartAddView.h:
--------------------------------------------------------------------------------
1 | //
2 | // CartAddView.h
3 | // EleMeCartListDemo
4 | //
5 | // Created by 超级腕电商 on 2017/9/15.
6 | // Copyright © 2017年 超级腕电商. All rights reserved.
7 | //
8 |
9 | #import
10 | #define CALL_DELEGATE_WITH_ARG(_delegate, _selector, _argument) \
11 | do { \
12 | id _theDelegate = _delegate; \
13 | if(_theDelegate != nil && [_theDelegate respondsToSelector:_selector]) { \
14 | [_theDelegate performSelector:_selector withObject:_argument]; \
15 | } \
16 | } while(0);
17 | #define Animation_Time 0.3
18 |
19 | @class CartAddView;
20 | @protocol CartAddViewDelegate
21 |
22 | -(void)cartViewAddButtonActionWithCartAddView:(CartAddView *)cartAddView;
23 |
24 | @end
25 | @interface CartAddView : UIView
26 |
27 | @property (nonatomic,strong) UITextField *numberTextfield;
28 | @property (nonatomic,strong) UIButton *addButton;//加
29 | @property (nonatomic,strong) UIButton *subtractBtn;//减
30 | @property(nonatomic) int number;
31 | @property(nonatomic) int minNumber;
32 | @property(nonatomic) int maxNumber;
33 | @property (nonatomic,weak) id delegate;
34 |
35 | @end
36 |
37 |
--------------------------------------------------------------------------------
/EleMeCartListDemo/EleMeCartListDemo/CartList/Cells/CartListTableViewCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // CartListTableViewCell.m
3 | // EleMeCartListDemo
4 | //
5 | // Created by 超级腕电商 on 2017/9/15.
6 | // Copyright © 2017年 超级腕电商. All rights reserved.
7 | //
8 |
9 | #import "CartListTableViewCell.h"
10 | #import "CartAddView.h"
11 | #import "UIView+Size.h"
12 |
13 | @implementation CartListTableViewCell
14 |
15 | -(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
16 | {
17 |
18 | if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
19 | self.backgroundColor = [UIColor whiteColor];
20 |
21 | [self addSubview:self.addView];
22 | }
23 |
24 | return self;
25 | }
26 | -(void)setDelegate:(id)delegate{
27 | self.addView.delegate = delegate;
28 | }
29 | -(void)layoutSubviews{
30 | [super layoutSubviews];
31 | self.addView.frame = CGRectMake(0, 0, 90, 25);
32 | self.addView.bottom = self.height-15;
33 | self.addView.right = self.width-20;
34 | }
35 |
36 | #pragma mark G
37 | -(CartAddView*)addView{
38 | if(!_addView){
39 | _addView = [[CartAddView alloc] init];
40 | }
41 | return _addView;
42 | }
43 |
44 | @end
45 |
--------------------------------------------------------------------------------
/EleMeCartListDemo/EleMeCartListDemo/CartList/Views/CartBottomView.m:
--------------------------------------------------------------------------------
1 | //
2 | // CartBottomView.m
3 | // EleMeCartListDemo
4 | //
5 | // Created by 超级腕电商 on 2017/9/15.
6 | // Copyright © 2017年 超级腕电商. All rights reserved.
7 | //
8 |
9 | #import "CartBottomView.h"
10 | #import "CommonUI.h"
11 | #import "UIView+Size.h"
12 |
13 |
14 | @implementation CartBottomView
15 | - (id)initWithFrame:(CGRect)frame
16 | {
17 | self = [super initWithFrame:frame];
18 | if (self) {
19 |
20 | self.backgroundColor = [UIColor grayColor];
21 | [self addSubview:self.cartButton];
22 |
23 | }
24 | return self;
25 | }
26 | -(void)layoutSubviews{
27 | [super layoutSubviews];
28 | self.cartButton.frame = CGRectMake(20, -30, 60, 60);
29 | self.cartButton.layer.masksToBounds = YES;
30 | self.cartButton.layer.cornerRadius = self.cartButton.width/2;
31 | }
32 |
33 | #pragma mark G
34 |
35 | -(UIButton*)cartButton{
36 | if(!_cartButton){
37 | _cartButton = [CommonUI creatButtonWithFrame:CGRectZero backgroundColor:[UIColor purpleColor] title:@"" titleFont:[UIFont boldSystemFontOfSize:20] titleColor:[UIColor blackColor] actionBlock:^(UIControl *control) {
38 |
39 |
40 | }];
41 | }
42 | return _cartButton;
43 | }
44 | @end
45 |
--------------------------------------------------------------------------------
/EleMeCartListDemo/EleMeCartListDemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | EleMeCartListDemo
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/EleMeCartListDemo/EleMeCartListDemo/CartList/Utils/UIView+Size.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+Size.h
3 | //
4 | //
5 | // Created by 超级腕电商 on 16/12/16.
6 | // Copyright © 2016年 super. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIView (Size)
12 |
13 | @property (nonatomic) CGFloat left;
14 | @property (nonatomic) CGFloat top;
15 | @property (nonatomic) CGFloat right;
16 | @property (nonatomic) CGFloat bottom;
17 |
18 | @property (nonatomic) CGFloat width;
19 | @property (nonatomic) CGFloat height;
20 |
21 | @property (nonatomic) CGFloat centerX;
22 | @property (nonatomic) CGFloat centerY;
23 |
24 | @property (nonatomic, readonly) CGFloat screenX;
25 | @property (nonatomic, readonly) CGFloat screenY;
26 | @property (nonatomic, readonly) CGFloat screenViewX;
27 | @property (nonatomic, readonly) CGFloat screenViewY;
28 | @property (nonatomic, readonly) CGRect screenFrame;
29 |
30 | @property (nonatomic, readonly) CGFloat scrollViewY;
31 |
32 | @property (nonatomic) CGPoint origin;
33 | @property (nonatomic) CGSize size;
34 |
35 | @property (nonatomic, readonly) CGFloat orientationWidth;
36 | @property (nonatomic, readonly) CGFloat orientationHeight;
37 |
38 | - (UIView *)descendantOrSelfWithClass:(Class)cls;
39 | - (UIView *)ancestorOrSelfWithClass:(Class)cls;
40 |
41 | - (void)removeAllSubviews;
42 |
43 | - (void)setTapActionWithBlock:(void (^)(void))block;
44 |
45 | - (void)setLongPressActionWithBlock:(void (^)(void))block;
46 |
47 | @end
48 |
--------------------------------------------------------------------------------
/EleMeCartListDemo/EleMeCartListDemo/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/EleMeCartListDemo/EleMeCartListDemo/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/EleMeCartListDemo/EleMeCartListDemo/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // EleMeCartListDemo
4 | //
5 | // Created by 超级腕电商 on 2017/9/15.
6 | // Copyright © 2017年 超级腕电商. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 | #import "CartListViewController.h"
11 |
12 | @interface AppDelegate ()
13 |
14 | @end
15 |
16 | @implementation AppDelegate
17 |
18 |
19 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
20 | // Override point for customization after application launch.
21 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
22 | self.window.backgroundColor = [UIColor whiteColor];
23 | self.window.rootViewController = [[UINavigationController alloc] initWithRootViewController:[[CartListViewController alloc] init]];
24 | [self.window makeKeyAndVisible];
25 | return YES;
26 | }
27 |
28 |
29 | - (void)applicationWillResignActive:(UIApplication *)application {
30 | // 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.
31 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
32 | }
33 |
34 |
35 | - (void)applicationDidEnterBackground:(UIApplication *)application {
36 | // 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.
37 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
38 | }
39 |
40 |
41 | - (void)applicationWillEnterForeground:(UIApplication *)application {
42 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
43 | }
44 |
45 |
46 | - (void)applicationDidBecomeActive:(UIApplication *)application {
47 | // 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.
48 | }
49 |
50 |
51 | - (void)applicationWillTerminate:(UIApplication *)application {
52 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
53 | }
54 |
55 |
56 | @end
57 |
--------------------------------------------------------------------------------
/EleMeCartListDemo/EleMeCartListDemo.xcodeproj/xcuserdata/chaojiwandianshang.xcuserdatad/xcschemes/EleMeCartListDemo.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/EleMeCartListDemo/EleMeCartListDemo/CartList/Utils/CommonUI.m:
--------------------------------------------------------------------------------
1 | //
2 | // CommonUI.m
3 | //
4 | //
5 | // Created by 超级腕电商 on 16/12/16.
6 | // Copyright © 2016年 super. All rights reserved.
7 | //
8 | #import "CommonUI.h"
9 | #import "UIView+Size.h"
10 |
11 | @implementation CommonUI
12 |
13 | + (UIButton *)itemButtonWithTitle:(NSString *)title
14 | target:(id)target
15 | action:(SEL)action
16 | image:(UIImage *)image
17 | selectedImage:(UIImage *)selectedImage
18 | {
19 | UIButton *button = [UIButton buttonWithType:(UIButtonTypeCustom)];
20 | [button setFrame:CGRectMake(0, 0, image.size.width, image.size.height)];
21 | [button setTitle:title forState:(UIControlStateNormal)];
22 | [button setTitle:title forState:(UIControlStateHighlighted)];
23 | [button.titleLabel setFont:[UIFont systemFontOfSize:16.0]];
24 | [button setImage:image forState:(UIControlStateNormal)];
25 | [button setImage:selectedImage forState:(UIControlStateHighlighted)];
26 | [button addTarget:target action:action forControlEvents:(UIControlEventTouchUpInside)];
27 |
28 | return button;
29 | }
30 |
31 | + (UIBarButtonItem *)navItemBack:(id)target action:(SEL)action
32 | {
33 | UIImage *image = [UIImage imageNamed:@"navItemBack"];
34 |
35 | UIButton *itemButton = [CommonUI itemButtonWithTitle:nil target:target action:action
36 | image:image
37 | selectedImage:nil];
38 | [itemButton setFrame:CGRectMake(0, 0, 44, 44)];
39 | [itemButton setImageEdgeInsets:UIEdgeInsetsMake(0, -10, 0, 10)];
40 |
41 | UIBarButtonItem *barItem = [[UIBarButtonItem alloc] initWithCustomView:(itemButton)];
42 | return barItem;
43 | }
44 |
45 | + (UIBarButtonItem *)navItemSetting:(id)target action:(SEL)action
46 | {
47 | UIImage *image = [UIImage imageNamed:@"navItemSetting"];
48 | UIImage *selectedImage = [UIImage imageNamed:@"navItemSettingSelected"];
49 |
50 | UIButton *itemButton = [CommonUI itemButtonWithTitle:nil target:target action:action
51 | image:image
52 | selectedImage:selectedImage];
53 | itemButton.frame = CGRectMake(0, 0, 44, 44);
54 | itemButton.imageEdgeInsets = UIEdgeInsetsMake(0, -10, 0, 10);
55 |
56 | UIBarButtonItem *barItem = [[UIBarButtonItem alloc] initWithCustomView:(itemButton)];
57 | return barItem;
58 | }
59 |
60 | + (UIButton *)rightButtonWithTitle:(NSString *)title target:(id)target action:(SEL)action
61 | {
62 | UIButton *itemButton = [UIButton buttonWithType:UIButtonTypeCustom];
63 | [itemButton setBackgroundColor:[UIColor clearColor]];
64 | [itemButton setFrame:CGRectMake(0, 0, 44, 44)];
65 | [itemButton setTitleColor:[UIColor whiteColor] forState:(UIControlStateNormal)];
66 | [itemButton setTitle:title forState:(UIControlStateNormal)];
67 | [itemButton.titleLabel setFont:[UIFont systemFontOfSize:14.0]];
68 | [itemButton addTarget:target action:action forControlEvents:UIControlEventTouchUpInside];
69 | [itemButton.titleLabel sizeToFit];
70 | itemButton.width = itemButton.titleLabel.width;
71 | itemButton.height = 44.0;
72 | return itemButton;
73 | }
74 |
75 | + (UIBarButtonItem *)rightBarBtnItemWithTitle:(NSString *)title target:(id)target action:(SEL)action
76 | {
77 | UIButton *itemButton = [CommonUI rightButtonWithTitle:title target:target action:action];
78 | UIBarButtonItem *barItem = [[UIBarButtonItem alloc] initWithCustomView:itemButton];
79 | return barItem;
80 | }
81 |
82 | /**
83 | 创建按钮
84 |
85 | @param frame
86 | @param backgroundColor
87 | @param title
88 | @param font
89 | @param color
90 | @param actionBlock
91 | @return
92 | */
93 | +(UIButton *)creatButtonWithFrame:(CGRect)frame
94 | backgroundColor:(UIColor *)backgroundColor
95 | title:(NSString *)title
96 | titleFont:(UIFont *)font
97 | titleColor:(UIColor *)color
98 | actionBlock:(ActionBlock)actionBlock
99 | {
100 | UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
101 | button.frame = frame;
102 | [button setBackgroundColor:backgroundColor];
103 | [button setTitle:title forState:UIControlStateNormal];
104 | button.titleLabel.font = font;
105 | [button setTitleColor:color forState:UIControlStateNormal];
106 | [button addMethodBlock:actionBlock WithEvents:UIControlEventTouchUpInside];
107 | return button;
108 | }
109 |
110 | @end
111 |
--------------------------------------------------------------------------------
/EleMeCartListDemo/EleMeCartListDemo/CartList/Views/CartAddView.m:
--------------------------------------------------------------------------------
1 | //
2 | // CartAddView.m
3 | // EleMeCartListDemo
4 | //
5 | // Created by 超级腕电商 on 2017/9/15.
6 | // Copyright © 2017年 超级腕电商. All rights reserved.
7 | //
8 |
9 | #import "CartAddView.h"
10 | #import "CommonUI.h"
11 | #import "UIView+Size.h"
12 |
13 | #define WS(weakSelf) __weak __typeof(&*self)weakSelf = self;
14 |
15 |
16 | @implementation CartAddView
17 |
18 | - (id)initWithFrame:(CGRect)frame
19 | {
20 | self = [super initWithFrame:frame];
21 | if (self) {
22 | self.number =0;
23 | self.maxNumber = 99;
24 | self.minNumber = 0;
25 | self.backgroundColor = [UIColor clearColor];
26 | [self addSubview:self.subtractBtn];
27 | [self addSubview:self.numberTextfield];
28 | [self addSubview:self.addButton];
29 |
30 | }
31 | return self;
32 | }
33 | -(void)setFrame:(CGRect)frame{
34 | [super setFrame:frame];
35 | self.numberTextfield.text = [NSString stringWithFormat:@"%d",self.number];
36 | self.subtractBtn.frame = CGRectMake(0, 0, frame.size.height, frame.size.height);
37 | self.numberTextfield.frame = CGRectMake(self.subtractBtn.right, 0, self.width-self.height*2, self.height);
38 | self.addButton.frame = CGRectMake(0, 0, frame.size.height, frame.size.height);
39 | self.addButton.right = self.width;
40 | self.subtractBtn.layer.cornerRadius = self.subtractBtn.width/2;
41 | self.addButton.layer.cornerRadius = self.addButton.width/2;
42 | }
43 | -(void)layoutSubviews
44 | {
45 | [super layoutSubviews];
46 |
47 | }
48 |
49 | #pragma mark Action
50 | -(void)showAnimation{
51 | self.subtractBtn.hidden=NO;
52 | self.subtractBtn.alpha = 0;
53 | self.subtractBtn.right = self.width;
54 | self.numberTextfield.hidden = NO;
55 | self.numberTextfield.alpha = 0;
56 | [UIView animateWithDuration:Animation_Time animations:^{
57 | self.subtractBtn.transform = CGAffineTransformRotate(self.subtractBtn.transform, -M_PI_2*3);
58 | self.subtractBtn.alpha = 1;
59 | self.subtractBtn.left = 0;
60 | self.numberTextfield.alpha = 1;
61 | } completion:^(BOOL finished) {
62 |
63 | }];
64 | }
65 | -(void)disMissAnimation{
66 | self.subtractBtn.hidden=NO;
67 | self.subtractBtn.alpha = 1;
68 | self.subtractBtn.left = 0;
69 | self.numberTextfield.hidden = YES;
70 | [UIView animateWithDuration:Animation_Time animations:^{
71 | self.subtractBtn.transform = CGAffineTransformRotate(self.subtractBtn.transform, -M_PI_2*3);
72 | self.subtractBtn.alpha = 0;
73 | self.subtractBtn.right = self.width;
74 | } completion:^(BOOL finished) {
75 | self.subtractBtn.hidden=YES;
76 | }];
77 | }
78 |
79 | #pragma mark G
80 | -(UIButton*)addButton{
81 | if(!_addButton){
82 | _addButton = [CommonUI creatButtonWithFrame:CGRectZero backgroundColor:[UIColor clearColor] title:@"+" titleFont:[UIFont boldSystemFontOfSize:20] titleColor:[UIColor blackColor] actionBlock:^(UIControl *control) {
83 | if (self.numberself.minNumber) {
104 | if (self.number==1) {
105 | [self disMissAnimation];
106 | }
107 | self.number--;
108 | self.numberTextfield.text =[NSString stringWithFormat:@"%d",self.number];
109 | }
110 |
111 | }];
112 | _subtractBtn.transform = CGAffineTransformRotate(_subtractBtn.transform, M_PI_2);
113 | _subtractBtn.hidden = YES;
114 | _subtractBtn.titleEdgeInsets = UIEdgeInsetsMake(-1, 0.5, 1, -0.5);
115 | _subtractBtn.layer.masksToBounds = YES;
116 | _subtractBtn.layer.borderWidth = 0.5;
117 | _subtractBtn.layer.borderColor = [UIColor blackColor].CGColor;
118 | }
119 | return _subtractBtn;
120 | }
121 | -(UITextField*)numberTextfield{
122 | if(!_numberTextfield){
123 | _numberTextfield = [[UITextField alloc] init];
124 | _numberTextfield.backgroundColor = [UIColor clearColor];
125 | _numberTextfield.textColor = [UIColor blackColor];
126 | _numberTextfield.textAlignment = NSTextAlignmentCenter;
127 | _numberTextfield.enabled = NO;
128 | _numberTextfield.hidden = YES;
129 | }
130 | return _numberTextfield;
131 | }
132 | @end
133 |
--------------------------------------------------------------------------------
/EleMeCartListDemo/EleMeCartListDemo/CartList/Utils/UIView+Size.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+Size.m
3 | //
4 | //
5 | // Created by 超级腕电商 on 16/12/16.
6 | // Copyright © 2016年 super. All rights reserved.
7 | //
8 |
9 | #import "UIView+Size.h"
10 | #import
11 |
12 | static char kDTActionHandlerTapBlockKey;
13 | static char kDTActionHandlerTapGestureKey;
14 | static char kDTActionHandlerLongPressBlockKey;
15 | static char kDTActionHandlerLongPressGestureKey;
16 |
17 | @implementation UIView (Utils)
18 |
19 | - (CGFloat)left {
20 | return self.frame.origin.x;
21 | }
22 |
23 | - (void)setLeft:(CGFloat)x {
24 | CGRect frame = self.frame;
25 | frame.origin.x = x;
26 | self.frame = frame;
27 | }
28 |
29 | - (CGFloat)top {
30 | return self.frame.origin.y;
31 | }
32 |
33 | - (void)setTop:(CGFloat)y {
34 | CGRect frame = self.frame;
35 | frame.origin.y = y;
36 | self.frame = frame;
37 | }
38 |
39 | - (CGFloat)right {
40 | return self.frame.origin.x + self.frame.size.width;
41 | }
42 |
43 | - (void)setRight:(CGFloat)right {
44 | CGRect frame = self.frame;
45 | frame.origin.x = right - frame.size.width;
46 | self.frame = frame;
47 | }
48 |
49 | - (CGFloat)bottom {
50 | return self.frame.origin.y + self.frame.size.height;
51 | }
52 |
53 | - (void)setBottom:(CGFloat)bottom {
54 | CGRect frame = self.frame;
55 | frame.origin.y = bottom - frame.size.height;
56 | self.frame = frame;
57 | }
58 |
59 | - (CGFloat)centerX {
60 | return self.center.x;
61 | }
62 |
63 | - (void)setCenterX:(CGFloat)centerX {
64 | self.center = CGPointMake(centerX, self.center.y);
65 | }
66 |
67 | - (CGFloat)centerY {
68 | return self.center.y;
69 | }
70 |
71 | - (void)setCenterY:(CGFloat)centerY {
72 | self.center = CGPointMake(self.center.x, centerY);
73 | }
74 |
75 | - (CGFloat)width {
76 | return self.frame.size.width;
77 | }
78 |
79 | - (void)setWidth:(CGFloat)width {
80 | CGRect frame = self.frame;
81 | frame.size.width = width;
82 | self.frame = frame;
83 | }
84 |
85 | - (CGFloat)height {
86 | return self.frame.size.height;
87 | }
88 |
89 | - (void)setHeight:(CGFloat)height {
90 | CGRect frame = self.frame;
91 | frame.size.height = height;
92 | self.frame = frame;
93 | }
94 |
95 | - (CGFloat)screenX {
96 | CGFloat x = 0.0f;
97 | for (UIView* view = self; view; view = view.superview) {
98 | x += view.left;
99 | }
100 | return x;
101 | }
102 | - (CGFloat)screenY {
103 | CGFloat y = 0.0f;
104 | for (UIView* view = self; view; view = view.superview) {
105 | y += view.top;
106 | }
107 | return y;
108 | }
109 |
110 | - (CGFloat)screenViewX {
111 | CGFloat x = 0.0f;
112 | for (UIView* view = self; view; view = view.superview) {
113 | x += view.left;
114 |
115 | if ([view isKindOfClass:[UIScrollView class]]) {
116 | UIScrollView* scrollView = (UIScrollView*)view;
117 | x -= scrollView.contentOffset.x;
118 | }
119 | }
120 | return x;
121 | }
122 |
123 | - (CGFloat)screenViewY {
124 | CGFloat y = 0;
125 | for (UIView* view = self; view; view = view.superview) {
126 | y += view.top;
127 |
128 | if ([view isKindOfClass:[UIScrollView class]]) {
129 | UIScrollView *scrollView = (UIScrollView*)view;
130 | y -= scrollView.contentOffset.y;
131 | }
132 | }
133 | return y;
134 | }
135 |
136 | - (CGRect)screenFrame {
137 | return CGRectMake(self.screenViewX, self.screenViewY, self.width, self.height);
138 | }
139 |
140 | - (CGFloat)scrollViewY {
141 | CGFloat offsetY = self.frame.origin.y;
142 | UIView *superview = self.superview;
143 |
144 | while (![superview isKindOfClass:[UIScrollView class]]) {
145 | offsetY += superview.frame.origin.y;
146 | superview = superview.superview;
147 | }
148 | return offsetY;
149 | }
150 |
151 | - (CGPoint)origin {
152 | return self.frame.origin;
153 | }
154 |
155 | - (void)setOrigin:(CGPoint)origin {
156 | CGRect frame = self.frame;
157 | frame.origin = origin;
158 | self.frame = frame;
159 | }
160 |
161 | - (CGSize)size {
162 | return self.frame.size;
163 | }
164 |
165 | - (void)setSize:(CGSize)size {
166 | CGRect frame = self.frame;
167 | frame.size = size;
168 | self.frame = frame;
169 | }
170 |
171 | - (CGFloat)orientationWidth {
172 | return UIInterfaceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation)
173 | ? self.height : self.width;
174 | }
175 |
176 | - (CGFloat)orientationHeight {
177 | return UIInterfaceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation)
178 | ? self.width : self.height;
179 | }
180 |
181 | - (UIView*)descendantOrSelfWithClass:(Class)cls {
182 | if ([self isKindOfClass:cls])
183 | return self;
184 |
185 | for (UIView* child in self.subviews) {
186 | UIView* it = [child descendantOrSelfWithClass:cls];
187 | if (it)
188 | return it;
189 | }
190 |
191 | return nil;
192 | }
193 |
194 | - (UIView*)ancestorOrSelfWithClass:(Class)cls {
195 | if ([self isKindOfClass:cls]) {
196 | return self;
197 |
198 | } else if (self.superview) {
199 | return [self.superview ancestorOrSelfWithClass:cls];
200 |
201 | } else {
202 | return nil;
203 | }
204 | }
205 |
206 |
207 |
208 | - (void)removeAllSubviews {
209 | while (self.subviews.count) {
210 | UIView* child = self.subviews.lastObject;
211 | [child removeFromSuperview];
212 | }
213 | }
214 |
215 |
216 |
217 | - (CGPoint)offsetFromView:(UIView*)otherView {
218 | CGFloat x = 0.0f, y = 0.0f;
219 | for (UIView* view = self; view && view != otherView; view = view.superview) {
220 | x += view.left;
221 | y += view.top;
222 | }
223 | return CGPointMake(x, y);
224 | }
225 |
226 | - (void)setTapActionWithBlock:(void (^)(void))block
227 | {
228 | UITapGestureRecognizer *gesture = objc_getAssociatedObject(self, &kDTActionHandlerTapGestureKey);
229 | if (!gesture) {
230 | gesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(__handleActionForTapGesture:)];
231 | [self addGestureRecognizer:gesture];
232 |
233 | objc_setAssociatedObject(self, &kDTActionHandlerTapGestureKey, gesture, OBJC_ASSOCIATION_RETAIN);
234 | }
235 |
236 | objc_setAssociatedObject(self, &kDTActionHandlerTapBlockKey, block, OBJC_ASSOCIATION_COPY);
237 | }
238 |
239 | - (void)__handleActionForTapGesture:(UITapGestureRecognizer *)gesture
240 | {
241 | if (gesture.state == UIGestureRecognizerStateRecognized) {
242 | void(^action)(void) = objc_getAssociatedObject(self, &kDTActionHandlerTapBlockKey);
243 | if (action) {
244 | action();
245 | }
246 | }
247 | }
248 |
249 | - (void)setLongPressActionWithBlock:(void (^)(void))block
250 | {
251 | UILongPressGestureRecognizer *gesture = objc_getAssociatedObject(self, &kDTActionHandlerLongPressGestureKey);
252 | if (!gesture) {
253 | gesture = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(__handleActionForLongPressGesture:)];
254 | [self addGestureRecognizer:gesture];
255 |
256 | objc_setAssociatedObject(self, &kDTActionHandlerLongPressGestureKey, gesture, OBJC_ASSOCIATION_RETAIN);
257 | }
258 |
259 | objc_setAssociatedObject(self, &kDTActionHandlerLongPressBlockKey, block, OBJC_ASSOCIATION_COPY);
260 | }
261 |
262 | - (void)__handleActionForLongPressGesture:(UITapGestureRecognizer *)gesture
263 | {
264 | if (gesture.state == UIGestureRecognizerStateBegan) {
265 | void(^action)(void) = objc_getAssociatedObject(self, &kDTActionHandlerLongPressBlockKey);
266 | if (action) {
267 | action();
268 | }
269 | }
270 | }
271 |
272 | @end
273 |
--------------------------------------------------------------------------------
/EleMeCartListDemo/EleMeCartListDemo/CartList/CartListViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // CartListViewController.m
3 | // EleMeCartListDemo
4 | //
5 | // Created by 超级腕电商 on 2017/9/15.
6 | // Copyright © 2017年 超级腕电商. All rights reserved.
7 | //
8 |
9 | #import "CartListViewController.h"
10 | #import "CartListTableViewCell.h"
11 | #import "CartBottomView.h"
12 | #import "UIView+Size.h"
13 |
14 | #define screenWidth [UIScreen mainScreen].bounds.size.width
15 | #define screenHeight [UIScreen mainScreen].bounds.size.height
16 | #define navBarHeight self.navigationController.navigationBar.bounds.size.height
17 | #define statusBarHeight [UIApplication sharedApplication].statusBarFrame.size.height
18 | #define CartAnimation_Time 0.5
19 | @interface CartListViewController ()
20 |
21 | @property (nonatomic, strong) UITableView *tableView;
22 | @property (nonatomic,strong) CartBottomView *cartBottomView;
23 | @end
24 |
25 | @implementation CartListViewController
26 |
27 | - (void)viewDidLoad {
28 | [super viewDidLoad];
29 | // Do any additional setup after loading the view.
30 | self.view.backgroundColor = [UIColor whiteColor];
31 | self.navigationController.navigationBar.barTintColor = [UIColor whiteColor];
32 | self.automaticallyAdjustsScrollViewInsets = NO;
33 | self.title = @"EleMeCartListDemo";
34 | [self initViews];
35 | }
36 | -(void)initViews{
37 | CGFloat viewWidth = screenWidth;
38 | CGFloat viewHeight = screenHeight - statusBarHeight - navBarHeight - 60;
39 | self.tableView.frame = CGRectMake(0, navBarHeight+statusBarHeight, viewWidth, viewHeight);
40 | [self.view addSubview:self.tableView];
41 | self.cartBottomView.frame = CGRectMake(0, self.tableView.bottom, viewWidth, 60);
42 | [self.view addSubview:self.cartBottomView];
43 | }
44 | #pragma mark - UITableViewDataSource
45 |
46 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
47 | return 20;
48 | }
49 |
50 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
51 |
52 | return 104.0;
53 | }
54 |
55 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
56 | static NSString *CellIdentifier = @"CartListTableViewCell";
57 |
58 | CartListTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
59 | if (cell == nil) {
60 | cell = [[CartListTableViewCell alloc] initWithStyle:(UITableViewCellStyleDefault) reuseIdentifier:CellIdentifier];
61 | cell.selectionStyle = UITableViewCellSelectionStyleNone;
62 | cell.delegate = self;
63 | }
64 |
65 | return cell;
66 | }
67 |
68 | #pragma mark - UITableViewDelegate
69 |
70 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
71 | [tableView deselectRowAtIndexPath:indexPath animated:true];
72 | }
73 | #pragma mark CartAddViewDelegate
74 | -(void)cartViewAddButtonActionWithCartAddView:(CartAddView *)cartAddView
75 | {
76 | CGRect rect = [cartAddView convertRect:cartAddView.addButton.frame toView:self.view];
77 | [self joinCartAnimationWithRect:rect];
78 | }
79 | #pragma mark -加入购物车动画
80 | -(void)joinCartAnimationWithRect:(CGRect)rect
81 | {
82 | CGFloat endPoint_x = [self.cartBottomView convertRect:self.cartBottomView.cartButton.frame toView:self.view].origin.x+self.cartBottomView.cartButton.width/2;
83 | CGFloat endPoint_y = [self.cartBottomView convertRect:self.cartBottomView.cartButton.frame toView:self.view].origin.y+self.cartBottomView.cartButton.height/2;
84 |
85 | CGFloat startX = rect.origin.x;
86 | CGFloat startY = rect.origin.y;
87 |
88 | UIBezierPath * path= [UIBezierPath bezierPath];
89 | [path moveToPoint:CGPointMake(startX, startY)];
90 |
91 | //三点曲线
92 | [path addCurveToPoint:CGPointMake(endPoint_x, endPoint_y)
93 | controlPoint1:CGPointMake(startX, startY)
94 | controlPoint2:CGPointMake(startX - 250, startY - 100)];
95 | CALayer * dotLayer = [CALayer layer];
96 | dotLayer.backgroundColor = [UIColor purpleColor].CGColor;
97 | dotLayer.frame = CGRectMake(0, 0, 20, 20);
98 | dotLayer.cornerRadius = 10;
99 | [self.view.layer addSublayer:dotLayer];
100 | [self groupAnimationWithPath:path andDotLayer:dotLayer];
101 | }
102 | #pragma mark - 组合动画
103 | -(void)groupAnimationWithPath:(UIBezierPath *)path andDotLayer:(CALayer *)dotLayer
104 | {
105 | CAKeyframeAnimation *animation = [CAKeyframeAnimation animationWithKeyPath:@"position"];
106 | animation.path = path.CGPath;
107 | animation.rotationMode = kCAAnimationRotateAuto;
108 |
109 | CABasicAnimation *alphaAnimation = [CABasicAnimation animationWithKeyPath:@"alpha"];
110 | alphaAnimation.duration = CartAnimation_Time;
111 | alphaAnimation.fromValue = [NSNumber numberWithFloat:1.0];
112 | alphaAnimation.toValue = [NSNumber numberWithFloat:0.1];
113 | alphaAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut];
114 |
115 | CAAnimationGroup *groups = [CAAnimationGroup animation];
116 | groups.animations = @[animation,alphaAnimation];
117 | groups.duration = CartAnimation_Time;
118 | groups.removedOnCompletion = NO;
119 | groups.fillMode = kCAFillModeForwards;
120 | groups.delegate = self;
121 | [groups setValue:@"groupsAnimation" forKey:@"animationName"];
122 | [dotLayer addAnimation:groups forKey:nil];
123 | [self performSelector:@selector(removeFromLayer:) withObject:dotLayer afterDelay:CartAnimation_Time];
124 | }
125 | - (void)removeFromLayer:(CALayer *)layerAnimation{
126 |
127 | [layerAnimation removeFromSuperlayer];
128 | }
129 | #pragma mark - CAAnimationDelegate
130 | - (void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag
131 | {
132 |
133 | if ([[anim valueForKey:@"animationName"]isEqualToString:@"groupsAnimation"]) {
134 |
135 | NSMutableArray *values = [NSMutableArray array];
136 | [values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(0.9, 0.9, 1.0)]];
137 | [values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(1.1, 1.1, 1.0)]];
138 | [values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(1.0, 1.0, 1.0)]];
139 |
140 | CAKeyframeAnimation *anim = [CAKeyframeAnimation animationWithKeyPath:@"transform"];
141 | anim.fillMode = kCAFillModeForwards;
142 | anim.values = values;
143 | anim.duration = Animation_Time;
144 | [self.cartBottomView.cartButton.layer addAnimation:anim forKey:nil];
145 |
146 | }
147 | }
148 | #pragma mark G
149 | -(UITableView*)tableView{
150 | if(!_tableView){
151 | _tableView = [[UITableView alloc] initWithFrame:(CGRectZero) style:(UITableViewStylePlain)];
152 | _tableView.backgroundColor = [UIColor yellowColor];
153 | //_tableView.frame = CGRectMake(0, mTabBar.bottom, viewWidth, viewHeight);
154 | _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
155 | _tableView.showsHorizontalScrollIndicator = false;
156 | _tableView.showsVerticalScrollIndicator = true;
157 | _tableView.delaysContentTouches = false;
158 | _tableView.scrollsToTop = true;
159 | _tableView.dataSource = self;
160 | _tableView.delegate = self;
161 | _tableView.sectionHeaderHeight = 0.0;
162 | _tableView.sectionFooterHeight = 0.0;
163 | }
164 | return _tableView;
165 | }
166 | -(CartBottomView*)cartBottomView{
167 | if(!_cartBottomView){
168 | _cartBottomView = [[CartBottomView alloc] init];
169 | }
170 | return _cartBottomView;
171 | }
172 |
173 | @end
174 |
--------------------------------------------------------------------------------
/EleMeCartListDemo/EleMeCartListDemo.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 55F918141F6BBA5700CEAFBD /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 55F918131F6BBA5700CEAFBD /* main.m */; };
11 | 55F918171F6BBA5700CEAFBD /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 55F918161F6BBA5700CEAFBD /* AppDelegate.m */; };
12 | 55F9181A1F6BBA5700CEAFBD /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 55F918191F6BBA5700CEAFBD /* ViewController.m */; };
13 | 55F9181D1F6BBA5700CEAFBD /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 55F9181B1F6BBA5700CEAFBD /* Main.storyboard */; };
14 | 55F9181F1F6BBA5700CEAFBD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 55F9181E1F6BBA5700CEAFBD /* Assets.xcassets */; };
15 | 55F918221F6BBA5700CEAFBD /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 55F918201F6BBA5700CEAFBD /* LaunchScreen.storyboard */; };
16 | 55F9182C1F6BBAFD00CEAFBD /* CartListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 55F9182B1F6BBAFD00CEAFBD /* CartListViewController.m */; };
17 | 55F918311F6BBD0E00CEAFBD /* CartListTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 55F918301F6BBD0E00CEAFBD /* CartListTableViewCell.m */; };
18 | 55F918341F6BC04700CEAFBD /* CartAddView.m in Sources */ = {isa = PBXBuildFile; fileRef = 55F918331F6BC04700CEAFBD /* CartAddView.m */; };
19 | 55F918381F6BC1F300CEAFBD /* UIView+Size.m in Sources */ = {isa = PBXBuildFile; fileRef = 55F918371F6BC1F300CEAFBD /* UIView+Size.m */; };
20 | 55F9183D1F6BC2C500CEAFBD /* UIControl+Button.m in Sources */ = {isa = PBXBuildFile; fileRef = 55F9183A1F6BC2C500CEAFBD /* UIControl+Button.m */; };
21 | 55F9183E1F6BC2C500CEAFBD /* CommonUI.m in Sources */ = {isa = PBXBuildFile; fileRef = 55F9183C1F6BC2C500CEAFBD /* CommonUI.m */; };
22 | 55F918411F6BE87900CEAFBD /* CartBottomView.m in Sources */ = {isa = PBXBuildFile; fileRef = 55F918401F6BE87900CEAFBD /* CartBottomView.m */; };
23 | /* End PBXBuildFile section */
24 |
25 | /* Begin PBXFileReference section */
26 | 55F9180F1F6BBA5700CEAFBD /* EleMeCartListDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = EleMeCartListDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
27 | 55F918131F6BBA5700CEAFBD /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
28 | 55F918151F6BBA5700CEAFBD /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
29 | 55F918161F6BBA5700CEAFBD /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
30 | 55F918181F6BBA5700CEAFBD /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
31 | 55F918191F6BBA5700CEAFBD /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
32 | 55F9181C1F6BBA5700CEAFBD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
33 | 55F9181E1F6BBA5700CEAFBD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
34 | 55F918211F6BBA5700CEAFBD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
35 | 55F918231F6BBA5700CEAFBD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
36 | 55F9182A1F6BBAFD00CEAFBD /* CartListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CartListViewController.h; sourceTree = ""; };
37 | 55F9182B1F6BBAFD00CEAFBD /* CartListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CartListViewController.m; sourceTree = ""; };
38 | 55F9182F1F6BBD0E00CEAFBD /* CartListTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CartListTableViewCell.h; sourceTree = ""; };
39 | 55F918301F6BBD0E00CEAFBD /* CartListTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CartListTableViewCell.m; sourceTree = ""; };
40 | 55F918321F6BC04700CEAFBD /* CartAddView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CartAddView.h; sourceTree = ""; };
41 | 55F918331F6BC04700CEAFBD /* CartAddView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CartAddView.m; sourceTree = ""; };
42 | 55F918361F6BC1F300CEAFBD /* UIView+Size.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+Size.h"; sourceTree = ""; };
43 | 55F918371F6BC1F300CEAFBD /* UIView+Size.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+Size.m"; sourceTree = ""; };
44 | 55F918391F6BC2C500CEAFBD /* UIControl+Button.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIControl+Button.h"; sourceTree = ""; };
45 | 55F9183A1F6BC2C500CEAFBD /* UIControl+Button.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIControl+Button.m"; sourceTree = ""; };
46 | 55F9183B1F6BC2C500CEAFBD /* CommonUI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommonUI.h; sourceTree = ""; };
47 | 55F9183C1F6BC2C500CEAFBD /* CommonUI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CommonUI.m; sourceTree = ""; };
48 | 55F9183F1F6BE87900CEAFBD /* CartBottomView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CartBottomView.h; sourceTree = ""; };
49 | 55F918401F6BE87900CEAFBD /* CartBottomView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CartBottomView.m; sourceTree = ""; };
50 | /* End PBXFileReference section */
51 |
52 | /* Begin PBXFrameworksBuildPhase section */
53 | 55F9180C1F6BBA5700CEAFBD /* Frameworks */ = {
54 | isa = PBXFrameworksBuildPhase;
55 | buildActionMask = 2147483647;
56 | files = (
57 | );
58 | runOnlyForDeploymentPostprocessing = 0;
59 | };
60 | /* End PBXFrameworksBuildPhase section */
61 |
62 | /* Begin PBXGroup section */
63 | 55F918061F6BBA5700CEAFBD = {
64 | isa = PBXGroup;
65 | children = (
66 | 55F918111F6BBA5700CEAFBD /* EleMeCartListDemo */,
67 | 55F918101F6BBA5700CEAFBD /* Products */,
68 | );
69 | sourceTree = "";
70 | };
71 | 55F918101F6BBA5700CEAFBD /* Products */ = {
72 | isa = PBXGroup;
73 | children = (
74 | 55F9180F1F6BBA5700CEAFBD /* EleMeCartListDemo.app */,
75 | );
76 | name = Products;
77 | sourceTree = "";
78 | };
79 | 55F918111F6BBA5700CEAFBD /* EleMeCartListDemo */ = {
80 | isa = PBXGroup;
81 | children = (
82 | 55F918291F6BBAEE00CEAFBD /* CartList */,
83 | 55F918151F6BBA5700CEAFBD /* AppDelegate.h */,
84 | 55F918161F6BBA5700CEAFBD /* AppDelegate.m */,
85 | 55F918181F6BBA5700CEAFBD /* ViewController.h */,
86 | 55F918191F6BBA5700CEAFBD /* ViewController.m */,
87 | 55F9181B1F6BBA5700CEAFBD /* Main.storyboard */,
88 | 55F9181E1F6BBA5700CEAFBD /* Assets.xcassets */,
89 | 55F918201F6BBA5700CEAFBD /* LaunchScreen.storyboard */,
90 | 55F918231F6BBA5700CEAFBD /* Info.plist */,
91 | 55F918121F6BBA5700CEAFBD /* Supporting Files */,
92 | );
93 | path = EleMeCartListDemo;
94 | sourceTree = "";
95 | };
96 | 55F918121F6BBA5700CEAFBD /* Supporting Files */ = {
97 | isa = PBXGroup;
98 | children = (
99 | 55F918131F6BBA5700CEAFBD /* main.m */,
100 | );
101 | name = "Supporting Files";
102 | sourceTree = "";
103 | };
104 | 55F918291F6BBAEE00CEAFBD /* CartList */ = {
105 | isa = PBXGroup;
106 | children = (
107 | 55F9182A1F6BBAFD00CEAFBD /* CartListViewController.h */,
108 | 55F9182B1F6BBAFD00CEAFBD /* CartListViewController.m */,
109 | 55F9182D1F6BBCF700CEAFBD /* Cells */,
110 | 55F9182E1F6BBCF700CEAFBD /* Views */,
111 | 55F918351F6BC1DB00CEAFBD /* Utils */,
112 | );
113 | path = CartList;
114 | sourceTree = "";
115 | };
116 | 55F9182D1F6BBCF700CEAFBD /* Cells */ = {
117 | isa = PBXGroup;
118 | children = (
119 | 55F9182F1F6BBD0E00CEAFBD /* CartListTableViewCell.h */,
120 | 55F918301F6BBD0E00CEAFBD /* CartListTableViewCell.m */,
121 | );
122 | path = Cells;
123 | sourceTree = "";
124 | };
125 | 55F9182E1F6BBCF700CEAFBD /* Views */ = {
126 | isa = PBXGroup;
127 | children = (
128 | 55F918321F6BC04700CEAFBD /* CartAddView.h */,
129 | 55F918331F6BC04700CEAFBD /* CartAddView.m */,
130 | 55F9183F1F6BE87900CEAFBD /* CartBottomView.h */,
131 | 55F918401F6BE87900CEAFBD /* CartBottomView.m */,
132 | );
133 | path = Views;
134 | sourceTree = "";
135 | };
136 | 55F918351F6BC1DB00CEAFBD /* Utils */ = {
137 | isa = PBXGroup;
138 | children = (
139 | 55F918361F6BC1F300CEAFBD /* UIView+Size.h */,
140 | 55F918371F6BC1F300CEAFBD /* UIView+Size.m */,
141 | 55F918391F6BC2C500CEAFBD /* UIControl+Button.h */,
142 | 55F9183A1F6BC2C500CEAFBD /* UIControl+Button.m */,
143 | 55F9183B1F6BC2C500CEAFBD /* CommonUI.h */,
144 | 55F9183C1F6BC2C500CEAFBD /* CommonUI.m */,
145 | );
146 | path = Utils;
147 | sourceTree = "";
148 | };
149 | /* End PBXGroup section */
150 |
151 | /* Begin PBXNativeTarget section */
152 | 55F9180E1F6BBA5700CEAFBD /* EleMeCartListDemo */ = {
153 | isa = PBXNativeTarget;
154 | buildConfigurationList = 55F918261F6BBA5700CEAFBD /* Build configuration list for PBXNativeTarget "EleMeCartListDemo" */;
155 | buildPhases = (
156 | 55F9180B1F6BBA5700CEAFBD /* Sources */,
157 | 55F9180C1F6BBA5700CEAFBD /* Frameworks */,
158 | 55F9180D1F6BBA5700CEAFBD /* Resources */,
159 | );
160 | buildRules = (
161 | );
162 | dependencies = (
163 | );
164 | name = EleMeCartListDemo;
165 | productName = EleMeCartListDemo;
166 | productReference = 55F9180F1F6BBA5700CEAFBD /* EleMeCartListDemo.app */;
167 | productType = "com.apple.product-type.application";
168 | };
169 | /* End PBXNativeTarget section */
170 |
171 | /* Begin PBXProject section */
172 | 55F918071F6BBA5700CEAFBD /* Project object */ = {
173 | isa = PBXProject;
174 | attributes = {
175 | LastUpgradeCheck = 0830;
176 | ORGANIZATIONNAME = "超级腕电商";
177 | TargetAttributes = {
178 | 55F9180E1F6BBA5700CEAFBD = {
179 | CreatedOnToolsVersion = 8.3.3;
180 | DevelopmentTeam = QS43CC5A87;
181 | ProvisioningStyle = Automatic;
182 | };
183 | };
184 | };
185 | buildConfigurationList = 55F9180A1F6BBA5700CEAFBD /* Build configuration list for PBXProject "EleMeCartListDemo" */;
186 | compatibilityVersion = "Xcode 3.2";
187 | developmentRegion = English;
188 | hasScannedForEncodings = 0;
189 | knownRegions = (
190 | en,
191 | Base,
192 | );
193 | mainGroup = 55F918061F6BBA5700CEAFBD;
194 | productRefGroup = 55F918101F6BBA5700CEAFBD /* Products */;
195 | projectDirPath = "";
196 | projectRoot = "";
197 | targets = (
198 | 55F9180E1F6BBA5700CEAFBD /* EleMeCartListDemo */,
199 | );
200 | };
201 | /* End PBXProject section */
202 |
203 | /* Begin PBXResourcesBuildPhase section */
204 | 55F9180D1F6BBA5700CEAFBD /* Resources */ = {
205 | isa = PBXResourcesBuildPhase;
206 | buildActionMask = 2147483647;
207 | files = (
208 | 55F918221F6BBA5700CEAFBD /* LaunchScreen.storyboard in Resources */,
209 | 55F9181F1F6BBA5700CEAFBD /* Assets.xcassets in Resources */,
210 | 55F9181D1F6BBA5700CEAFBD /* Main.storyboard in Resources */,
211 | );
212 | runOnlyForDeploymentPostprocessing = 0;
213 | };
214 | /* End PBXResourcesBuildPhase section */
215 |
216 | /* Begin PBXSourcesBuildPhase section */
217 | 55F9180B1F6BBA5700CEAFBD /* Sources */ = {
218 | isa = PBXSourcesBuildPhase;
219 | buildActionMask = 2147483647;
220 | files = (
221 | 55F918381F6BC1F300CEAFBD /* UIView+Size.m in Sources */,
222 | 55F9182C1F6BBAFD00CEAFBD /* CartListViewController.m in Sources */,
223 | 55F9181A1F6BBA5700CEAFBD /* ViewController.m in Sources */,
224 | 55F9183D1F6BC2C500CEAFBD /* UIControl+Button.m in Sources */,
225 | 55F918311F6BBD0E00CEAFBD /* CartListTableViewCell.m in Sources */,
226 | 55F918171F6BBA5700CEAFBD /* AppDelegate.m in Sources */,
227 | 55F918341F6BC04700CEAFBD /* CartAddView.m in Sources */,
228 | 55F9183E1F6BC2C500CEAFBD /* CommonUI.m in Sources */,
229 | 55F918141F6BBA5700CEAFBD /* main.m in Sources */,
230 | 55F918411F6BE87900CEAFBD /* CartBottomView.m in Sources */,
231 | );
232 | runOnlyForDeploymentPostprocessing = 0;
233 | };
234 | /* End PBXSourcesBuildPhase section */
235 |
236 | /* Begin PBXVariantGroup section */
237 | 55F9181B1F6BBA5700CEAFBD /* Main.storyboard */ = {
238 | isa = PBXVariantGroup;
239 | children = (
240 | 55F9181C1F6BBA5700CEAFBD /* Base */,
241 | );
242 | name = Main.storyboard;
243 | sourceTree = "";
244 | };
245 | 55F918201F6BBA5700CEAFBD /* LaunchScreen.storyboard */ = {
246 | isa = PBXVariantGroup;
247 | children = (
248 | 55F918211F6BBA5700CEAFBD /* Base */,
249 | );
250 | name = LaunchScreen.storyboard;
251 | sourceTree = "";
252 | };
253 | /* End PBXVariantGroup section */
254 |
255 | /* Begin XCBuildConfiguration section */
256 | 55F918241F6BBA5700CEAFBD /* Debug */ = {
257 | isa = XCBuildConfiguration;
258 | buildSettings = {
259 | ALWAYS_SEARCH_USER_PATHS = NO;
260 | CLANG_ANALYZER_NONNULL = YES;
261 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
262 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
263 | CLANG_CXX_LIBRARY = "libc++";
264 | CLANG_ENABLE_MODULES = YES;
265 | CLANG_ENABLE_OBJC_ARC = YES;
266 | CLANG_WARN_BOOL_CONVERSION = YES;
267 | CLANG_WARN_CONSTANT_CONVERSION = YES;
268 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
269 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
270 | CLANG_WARN_EMPTY_BODY = YES;
271 | CLANG_WARN_ENUM_CONVERSION = YES;
272 | CLANG_WARN_INFINITE_RECURSION = YES;
273 | CLANG_WARN_INT_CONVERSION = YES;
274 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
275 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
276 | CLANG_WARN_UNREACHABLE_CODE = YES;
277 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
278 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
279 | COPY_PHASE_STRIP = NO;
280 | DEBUG_INFORMATION_FORMAT = dwarf;
281 | ENABLE_STRICT_OBJC_MSGSEND = YES;
282 | ENABLE_TESTABILITY = YES;
283 | GCC_C_LANGUAGE_STANDARD = gnu99;
284 | GCC_DYNAMIC_NO_PIC = NO;
285 | GCC_NO_COMMON_BLOCKS = YES;
286 | GCC_OPTIMIZATION_LEVEL = 0;
287 | GCC_PREPROCESSOR_DEFINITIONS = (
288 | "DEBUG=1",
289 | "$(inherited)",
290 | );
291 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
292 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
293 | GCC_WARN_UNDECLARED_SELECTOR = YES;
294 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
295 | GCC_WARN_UNUSED_FUNCTION = YES;
296 | GCC_WARN_UNUSED_VARIABLE = YES;
297 | IPHONEOS_DEPLOYMENT_TARGET = 10.3;
298 | MTL_ENABLE_DEBUG_INFO = YES;
299 | ONLY_ACTIVE_ARCH = YES;
300 | SDKROOT = iphoneos;
301 | };
302 | name = Debug;
303 | };
304 | 55F918251F6BBA5700CEAFBD /* Release */ = {
305 | isa = XCBuildConfiguration;
306 | buildSettings = {
307 | ALWAYS_SEARCH_USER_PATHS = NO;
308 | CLANG_ANALYZER_NONNULL = YES;
309 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
310 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
311 | CLANG_CXX_LIBRARY = "libc++";
312 | CLANG_ENABLE_MODULES = YES;
313 | CLANG_ENABLE_OBJC_ARC = YES;
314 | CLANG_WARN_BOOL_CONVERSION = YES;
315 | CLANG_WARN_CONSTANT_CONVERSION = YES;
316 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
317 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
318 | CLANG_WARN_EMPTY_BODY = YES;
319 | CLANG_WARN_ENUM_CONVERSION = YES;
320 | CLANG_WARN_INFINITE_RECURSION = YES;
321 | CLANG_WARN_INT_CONVERSION = YES;
322 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
323 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
324 | CLANG_WARN_UNREACHABLE_CODE = YES;
325 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
326 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
327 | COPY_PHASE_STRIP = NO;
328 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
329 | ENABLE_NS_ASSERTIONS = NO;
330 | ENABLE_STRICT_OBJC_MSGSEND = YES;
331 | GCC_C_LANGUAGE_STANDARD = gnu99;
332 | GCC_NO_COMMON_BLOCKS = YES;
333 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
334 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
335 | GCC_WARN_UNDECLARED_SELECTOR = YES;
336 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
337 | GCC_WARN_UNUSED_FUNCTION = YES;
338 | GCC_WARN_UNUSED_VARIABLE = YES;
339 | IPHONEOS_DEPLOYMENT_TARGET = 10.3;
340 | MTL_ENABLE_DEBUG_INFO = NO;
341 | SDKROOT = iphoneos;
342 | VALIDATE_PRODUCT = YES;
343 | };
344 | name = Release;
345 | };
346 | 55F918271F6BBA5700CEAFBD /* Debug */ = {
347 | isa = XCBuildConfiguration;
348 | buildSettings = {
349 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
350 | DEVELOPMENT_TEAM = QS43CC5A87;
351 | INFOPLIST_FILE = EleMeCartListDemo/Info.plist;
352 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
353 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
354 | PRODUCT_BUNDLE_IDENTIFIER = model.EleMeCartListDemo;
355 | PRODUCT_NAME = "$(TARGET_NAME)";
356 | };
357 | name = Debug;
358 | };
359 | 55F918281F6BBA5700CEAFBD /* Release */ = {
360 | isa = XCBuildConfiguration;
361 | buildSettings = {
362 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
363 | DEVELOPMENT_TEAM = QS43CC5A87;
364 | INFOPLIST_FILE = EleMeCartListDemo/Info.plist;
365 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
366 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
367 | PRODUCT_BUNDLE_IDENTIFIER = model.EleMeCartListDemo;
368 | PRODUCT_NAME = "$(TARGET_NAME)";
369 | };
370 | name = Release;
371 | };
372 | /* End XCBuildConfiguration section */
373 |
374 | /* Begin XCConfigurationList section */
375 | 55F9180A1F6BBA5700CEAFBD /* Build configuration list for PBXProject "EleMeCartListDemo" */ = {
376 | isa = XCConfigurationList;
377 | buildConfigurations = (
378 | 55F918241F6BBA5700CEAFBD /* Debug */,
379 | 55F918251F6BBA5700CEAFBD /* Release */,
380 | );
381 | defaultConfigurationIsVisible = 0;
382 | defaultConfigurationName = Release;
383 | };
384 | 55F918261F6BBA5700CEAFBD /* Build configuration list for PBXNativeTarget "EleMeCartListDemo" */ = {
385 | isa = XCConfigurationList;
386 | buildConfigurations = (
387 | 55F918271F6BBA5700CEAFBD /* Debug */,
388 | 55F918281F6BBA5700CEAFBD /* Release */,
389 | );
390 | defaultConfigurationIsVisible = 0;
391 | };
392 | /* End XCConfigurationList section */
393 | };
394 | rootObject = 55F918071F6BBA5700CEAFBD /* Project object */;
395 | }
396 |
--------------------------------------------------------------------------------