├── README.md
├── DemoOfQQMeet
├── Images
│ ├── finn.png
│ ├── fiona.png
│ ├── jake.png
│ ├── liked.png
│ ├── nope.png
│ ├── finn@2x.png
│ ├── jake@2x.png
│ ├── nope@2x.png
│ ├── prince.png
│ ├── fiona@2x.png
│ ├── liked@2x.png
│ └── prince@2x.png
├── AppDelegate.h
├── main.m
├── ViewController.h
├── ChoosePersonView
│ ├── ChoosePersonView.h
│ └── ChoosePersonView.m
├── Model
│ ├── Person.h
│ └── Person.m
├── Images.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Info.plist
├── Base.lproj
│ ├── Main.storyboard
│ └── LaunchScreen.xib
├── AppDelegate.m
└── ViewController.m
├── DemoOfQQMeet.xcodeproj
├── xcuserdata
│ └── jianhu.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── xcschememanagement.plist
│ │ └── DemoOfQQMeet.xcscheme
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcuserdata
│ │ └── jianhu.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcshareddata
│ │ └── DemoOfQQMeet.xccheckout
└── project.pbxproj
├── DemoOfQQMeetTests
├── en.lproj
│ └── InfoPlist.strings
├── Base.lproj
│ └── InfoPlist.strings
├── Info.plist
└── DemoOfQQMeetTests.m
└── Third
└── MDCSwipeToChoose
├── LICENSE
├── MDCSwipeToChoose
├── Public
│ ├── State
│ │ ├── MDCPanState.m
│ │ ├── MDCSwipeResult.m
│ │ ├── MDCSwipeDirection.h
│ │ ├── MDCSwipeResult.h
│ │ └── MDCPanState.h
│ ├── Views
│ │ ├── MDCSwipeToChooseDelegate.h
│ │ ├── MDCSwipeToChooseView.h
│ │ ├── UIView+MDCSwipeToChoose.h
│ │ ├── MDCSwipeToChooseView.m
│ │ └── UIView+MDCSwipeToChoose.m
│ ├── MDCSwipeToChoose.h
│ └── Options
│ │ ├── MDCSwipeToChooseViewOptions.m
│ │ ├── MDCSwipeOptions.m
│ │ ├── MDCSwipeToChooseViewOptions.h
│ │ └── MDCSwipeOptions.h
└── Internal
│ ├── State
│ ├── MDCViewState.m
│ └── MDCViewState.h
│ ├── UIColor+MDCRGB8Bit.h
│ ├── Views
│ ├── UIView+MDCBorderedLabel.h
│ └── UIView+MDCBorderedLabel.m
│ ├── MDCGeometry.h
│ ├── UIColor+MDCRGB8Bit.m
│ └── MDCGeometry.m
└── README.md
/README.md:
--------------------------------------------------------------------------------
1 | # DemoOfQQMeet
2 | # DemoOfQQMeet
3 | # DemoOfQQMeet
4 |
--------------------------------------------------------------------------------
/DemoOfQQMeet/Images/finn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SirJunqiuWu/DemoOfQQMeet/HEAD/DemoOfQQMeet/Images/finn.png
--------------------------------------------------------------------------------
/DemoOfQQMeet/Images/fiona.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SirJunqiuWu/DemoOfQQMeet/HEAD/DemoOfQQMeet/Images/fiona.png
--------------------------------------------------------------------------------
/DemoOfQQMeet/Images/jake.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SirJunqiuWu/DemoOfQQMeet/HEAD/DemoOfQQMeet/Images/jake.png
--------------------------------------------------------------------------------
/DemoOfQQMeet/Images/liked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SirJunqiuWu/DemoOfQQMeet/HEAD/DemoOfQQMeet/Images/liked.png
--------------------------------------------------------------------------------
/DemoOfQQMeet/Images/nope.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SirJunqiuWu/DemoOfQQMeet/HEAD/DemoOfQQMeet/Images/nope.png
--------------------------------------------------------------------------------
/DemoOfQQMeet/Images/finn@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SirJunqiuWu/DemoOfQQMeet/HEAD/DemoOfQQMeet/Images/finn@2x.png
--------------------------------------------------------------------------------
/DemoOfQQMeet/Images/jake@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SirJunqiuWu/DemoOfQQMeet/HEAD/DemoOfQQMeet/Images/jake@2x.png
--------------------------------------------------------------------------------
/DemoOfQQMeet/Images/nope@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SirJunqiuWu/DemoOfQQMeet/HEAD/DemoOfQQMeet/Images/nope@2x.png
--------------------------------------------------------------------------------
/DemoOfQQMeet/Images/prince.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SirJunqiuWu/DemoOfQQMeet/HEAD/DemoOfQQMeet/Images/prince.png
--------------------------------------------------------------------------------
/DemoOfQQMeet/Images/fiona@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SirJunqiuWu/DemoOfQQMeet/HEAD/DemoOfQQMeet/Images/fiona@2x.png
--------------------------------------------------------------------------------
/DemoOfQQMeet/Images/liked@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SirJunqiuWu/DemoOfQQMeet/HEAD/DemoOfQQMeet/Images/liked@2x.png
--------------------------------------------------------------------------------
/DemoOfQQMeet/Images/prince@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SirJunqiuWu/DemoOfQQMeet/HEAD/DemoOfQQMeet/Images/prince@2x.png
--------------------------------------------------------------------------------
/DemoOfQQMeet.xcodeproj/xcuserdata/jianhu.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/DemoOfQQMeetTests/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /*
2 | InfoPlist.strings
3 | DemoOfQQMeet
4 |
5 | Created by Jian HU on 15/5/8.
6 | Copyright (c) 2015年 Wujunqiu. All rights reserved.
7 | */
8 | CFBundleDisplayName = "巧遇";
9 |
--------------------------------------------------------------------------------
/DemoOfQQMeetTests/Base.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /*
2 | InfoPlist.strings
3 | DemoOfQQMeet
4 |
5 | Created by Jian HU on 15/5/8.
6 | Copyright (c) 2015年 Wujunqiu. All rights reserved.
7 | */
8 | CFBundleDisplayName = "巧遇";
9 |
--------------------------------------------------------------------------------
/DemoOfQQMeet.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/DemoOfQQMeet.xcodeproj/project.xcworkspace/xcuserdata/jianhu.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SirJunqiuWu/DemoOfQQMeet/HEAD/DemoOfQQMeet.xcodeproj/project.xcworkspace/xcuserdata/jianhu.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/DemoOfQQMeet/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // DemoOfQQMeet
4 | //
5 | // Created by Jian HU on 15/5/8.
6 | // Copyright (c) 2015年 Wujunqiu. 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 |
--------------------------------------------------------------------------------
/DemoOfQQMeet/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // DemoOfQQMeet
4 | //
5 | // Created by Jian HU on 15/5/8.
6 | // Copyright (c) 2015年 Wujunqiu. 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 |
--------------------------------------------------------------------------------
/DemoOfQQMeet/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // DemoOfQQMeet
4 | //
5 | // Created by Jian HU on 15/5/8.
6 | // Copyright (c) 2015年 Wujunqiu. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ChoosePersonView.h"
11 |
12 | @interface ViewController : UIViewController
13 |
14 | @property (nonatomic, strong) Person *currentPerson;
15 | @property (nonatomic, strong) ChoosePersonView *frontCardView;
16 | @property (nonatomic, strong) ChoosePersonView *backCardView;
17 | @property (nonatomic, strong) NSMutableArray *persons;
18 |
19 | @end
20 |
21 |
--------------------------------------------------------------------------------
/DemoOfQQMeet/ChoosePersonView/ChoosePersonView.h:
--------------------------------------------------------------------------------
1 | //
2 | // ChoosePersonView.h
3 | // DemoOfQQMeet
4 | //
5 | // Created by Jian HU on 15/5/8.
6 | // Copyright (c) 2015年 Wujunqiu. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "MDCSwipeToChoose.h"
11 | #import "Person.h"
12 |
13 | //可以对该view进行定制
14 | @interface ChoosePersonView : MDCSwipeToChooseView
15 |
16 | /**
17 | * 该view对应的person,方便在拖拽时读取
18 | */
19 | @property (nonatomic,strong) Person *person;
20 |
21 | /**
22 | * 对外方法:view初始化的数据源
23 | *
24 | * @param model Person对象
25 | */
26 | - (void)initChoosePersonViewWithModel:(Person*)model;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/DemoOfQQMeet/Model/Person.h:
--------------------------------------------------------------------------------
1 | //
2 | // Person.h
3 | // DemoOfQQMeet
4 | //
5 | // Created by Jian HU on 15/5/8.
6 | // Copyright (c) 2015年 Wujunqiu. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface Person : NSObject
12 |
13 | {
14 | NSMutableArray *allPersonsArray;
15 | }
16 |
17 | /**
18 | * 头像
19 | */
20 | @property (nonatomic,strong) NSString *personImageUrl;
21 |
22 | /**
23 | * 名字
24 | */
25 | @property (nonatomic,strong) NSString *personName;
26 |
27 | + (Person *)shareManager;
28 |
29 | - (NSMutableArray *)allPersons;
30 |
31 | - (NSMutableArray *)creatPersonWithDic:(NSDictionary *)dic;
32 |
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/DemoOfQQMeet.xcodeproj/xcuserdata/jianhu.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | DemoOfQQMeet.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | D6EB8C311AFC668D0024E615
16 |
17 | primary
18 |
19 |
20 | D6EB8C4A1AFC668D0024E615
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/DemoOfQQMeet/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" : "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 | }
--------------------------------------------------------------------------------
/DemoOfQQMeetTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.jingqi.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/DemoOfQQMeet/ChoosePersonView/ChoosePersonView.m:
--------------------------------------------------------------------------------
1 | //
2 | // ChoosePersonView.m
3 | // DemoOfQQMeet
4 | //
5 | // Created by Jian HU on 15/5/8.
6 | // Copyright (c) 2015年 Wujunqiu. All rights reserved.
7 | //
8 |
9 | #import "ChoosePersonView.h"
10 |
11 | @implementation ChoosePersonView
12 | @synthesize person;
13 |
14 | - (id)initWithFrame:(CGRect)frame options:(MDCSwipeToChooseViewOptions *)options
15 | {
16 | self = [super initWithFrame:frame options:options];
17 | if (self) {
18 | self.autoresizingMask = UIViewAutoresizingFlexibleHeight |UIViewAutoresizingFlexibleWidth |UIViewAutoresizingFlexibleBottomMargin;
19 | }
20 | return self;
21 | }
22 |
23 | - (void)initChoosePersonViewWithModel:(Person*)model
24 | {
25 | self.imageView.image = [UIImage imageNamed:model.personImageUrl];
26 | self.imageView.autoresizingMask = self.autoresizingMask;
27 | person = model;
28 | }
29 |
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/DemoOfQQMeetTests/DemoOfQQMeetTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // DemoOfQQMeetTests.m
3 | // DemoOfQQMeetTests
4 | //
5 | // Created by Jian HU on 15/5/8.
6 | // Copyright (c) 2015年 Wujunqiu. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface DemoOfQQMeetTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation DemoOfQQMeetTests
17 |
18 | - (void)setUp {
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 | // Put teardown code here. This method is called after the invocation of each test method in the class.
25 | [super tearDown];
26 | }
27 |
28 | - (void)testExample {
29 | // This is an example of a functional test case.
30 | XCTAssert(YES, @"Pass");
31 | }
32 |
33 | - (void)testPerformanceExample {
34 | // This is an example of a performance test case.
35 | [self measureBlock:^{
36 | // Put the code you want to measure the time of here.
37 | }];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/Third/MDCSwipeToChoose/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2014 to present, Brian Gesiak @modocache
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
21 |
--------------------------------------------------------------------------------
/DemoOfQQMeet/Model/Person.m:
--------------------------------------------------------------------------------
1 | //
2 | // Person.m
3 | // DemoOfQQMeet
4 | //
5 | // Created by Jian HU on 15/5/8.
6 | // Copyright (c) 2015年 Wujunqiu. All rights reserved.
7 | //
8 |
9 | #import "Person.h"
10 |
11 | static Person *myPerson = nil;
12 |
13 | @implementation Person
14 |
15 | +(Person *)shareManager
16 | {
17 | @synchronized(self){
18 | static dispatch_once_t pred;
19 | dispatch_once(&pred,^{
20 | myPerson = [[self alloc]init];
21 | });
22 | }
23 | return myPerson;
24 | }
25 |
26 | - (id)init
27 | {
28 | self = [super init];
29 | if (self) {
30 | allPersonsArray = [NSMutableArray array];
31 | }
32 | return self;
33 | }
34 |
35 | - (NSMutableArray *)allPersons
36 | {
37 | return [self creatPersonWithDic:nil];;
38 | }
39 |
40 | - (NSMutableArray *)creatPersonWithDic:(NSDictionary *)dic
41 | {
42 | [allPersonsArray removeAllObjects];
43 | NSArray *images = @[@"finn",@"prince",@"jake",@"prince"];
44 | for (int i = 0; i <4; i ++) {
45 | Person *person = [[Person alloc]init];
46 | person.personImageUrl = images[i];
47 | person.personName = images[i];
48 | [allPersonsArray addObject:person];
49 | }
50 | return allPersonsArray;
51 | }
52 |
53 | @end
54 |
--------------------------------------------------------------------------------
/Third/MDCSwipeToChoose/MDCSwipeToChoose/Public/State/MDCPanState.m:
--------------------------------------------------------------------------------
1 | //
2 | // MDCPanState.m
3 | //
4 | // Copyright (c) 2014 to present, Brian Gesiak @modocache
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 | //
24 |
25 | #import "MDCPanState.h"
26 |
27 | @implementation MDCPanState
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/Third/MDCSwipeToChoose/MDCSwipeToChoose/Public/State/MDCSwipeResult.m:
--------------------------------------------------------------------------------
1 | //
2 | // MDCSwipeResult.m
3 | //
4 | // Copyright (c) 2014 to present, Brian Gesiak @modocache
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 | //
24 |
25 | #import "MDCSwipeResult.h"
26 |
27 | @implementation MDCSwipeResult
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/DemoOfQQMeet/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.jingqi.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
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 |
--------------------------------------------------------------------------------
/Third/MDCSwipeToChoose/MDCSwipeToChoose/Internal/State/MDCViewState.m:
--------------------------------------------------------------------------------
1 | //
2 | // MDCViewState.m
3 | //
4 | // Copyright (c) 2014 to present, Brian Gesiak @modocache
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 | //
24 |
25 | #import "MDCViewState.h"
26 |
27 | const MDCRotationDirection MDCRotationAwayFromCenter = 1.f;
28 | const MDCRotationDirection MDCRotationTowardsCenter = -1.f;
29 |
30 | @implementation MDCViewState
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/Third/MDCSwipeToChoose/MDCSwipeToChoose/Public/Views/MDCSwipeToChooseDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // MDCSwipeToChooseDelegate.h
3 | // MDCSwipeToChoose
4 | //
5 | // Created by Brian Ivan Gesiak on 4/8/14.
6 | // Copyright (c) 2014 modocache. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "MDCSwipeDirection.h"
11 |
12 | /*!
13 | * Classes that adopt the `MDCSwipeToChooseDelegate` protcol may respond to
14 | * swipe events, such as when a view has been swiped and chosen, or when a
15 | * swipe has been cancelled and no choice has been made.
16 | *
17 | * To customize the animation and appearance of a MDCSwipeToChoose-based view,
18 | * use `MDCSwipeOptions` and the `-mdc_swipeToChooseSetup:` method.
19 | */
20 | @protocol MDCSwipeToChooseDelegate
21 | @optional
22 |
23 | /*!
24 | * Sent when a view was not swiped past the selection threshold. The view is
25 | * returned to its original position before this message is sent.
26 | */
27 | - (void)viewDidCancelSwipe:(UIView *)view;
28 |
29 | /*!
30 | * Sent before a choice is made. Return `NO` to prevent the choice from being made,
31 | * and `YES` otherwise.
32 | */
33 | - (BOOL)view:(UIView *)view shouldBeChosenWithDirection:(MDCSwipeDirection)direction;
34 |
35 | /*!
36 | * Sent after a choice is made. When using the default `MDCSwipeOptions`, the `view`
37 | * is removed from the view hierarchy by the time this message is sent.
38 | */
39 | - (void)view:(UIView *)view wasChosenWithDirection:(MDCSwipeDirection)direction;
40 |
41 | @end
42 |
--------------------------------------------------------------------------------
/Third/MDCSwipeToChoose/MDCSwipeToChoose/Internal/UIColor+MDCRGB8Bit.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIColor+MDCRGB8Bit.h
3 | //
4 | // Copyright (c) 2014 to present, Brian Gesiak @modocache
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 | //
24 |
25 | #import
26 |
27 | @interface UIColor (MDCRGB8Bit)
28 |
29 | + (UIColor *)colorWith8BitRed:(CGFloat)red
30 | green:(CGFloat)green
31 | blue:(CGFloat)blue
32 | alpha:(CGFloat)alpha;
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/Third/MDCSwipeToChoose/MDCSwipeToChoose/Internal/Views/UIView+MDCBorderedLabel.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+MDCBorderedLabel.h
3 | //
4 | // Copyright (c) 2014 to present, Brian Gesiak @modocache
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 | //
24 |
25 | #import
26 |
27 | @interface UIView (MDCBorderedLabel)
28 |
29 | - (void)constructBorderedLabelWithText:(NSString *)text
30 | color:(UIColor *)color
31 | angle:(CGFloat)angle;
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/Third/MDCSwipeToChoose/MDCSwipeToChoose/Public/MDCSwipeToChoose.h:
--------------------------------------------------------------------------------
1 | //
2 | // MDCSwipeToChoose.h
3 | //
4 | // Copyright (c) 2014 to present, Brian Gesiak @modocache
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 | //
24 |
25 | #import "MDCSwipeDirection.h"
26 |
27 | #import "MDCSwipeToChooseDelegate.h"
28 | #import "UIView+MDCSwipeToChoose.h"
29 | #import "MDCSwipeOptions.h"
30 |
31 | #import "MDCSwipeToChooseView.h"
32 | #import "MDCSwipeToChooseViewOptions.h"
33 |
34 | #import "MDCSwipeResult.h"
35 | #import "MDCPanState.h"
36 |
--------------------------------------------------------------------------------
/DemoOfQQMeet/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 |
--------------------------------------------------------------------------------
/DemoOfQQMeet.xcodeproj/project.xcworkspace/xcshareddata/DemoOfQQMeet.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | BE8AF971-7102-4E48-AF3F-0CA4180EC75D
9 | IDESourceControlProjectName
10 | DemoOfQQMeet
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | AC796A2FD67288F9908DA2C5967E7E359EFAF91C
14 | github.com:SirJunqiuWu/DemoOfQQMeet.git
15 |
16 | IDESourceControlProjectPath
17 | DemoOfQQMeet.xcodeproj
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | AC796A2FD67288F9908DA2C5967E7E359EFAF91C
21 | ../..
22 |
23 | IDESourceControlProjectURL
24 | github.com:SirJunqiuWu/DemoOfQQMeet.git
25 | IDESourceControlProjectVersion
26 | 111
27 | IDESourceControlProjectWCCIdentifier
28 | AC796A2FD67288F9908DA2C5967E7E359EFAF91C
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | AC796A2FD67288F9908DA2C5967E7E359EFAF91C
36 | IDESourceControlWCCName
37 | DemoOfQQMeet
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/Third/MDCSwipeToChoose/MDCSwipeToChoose/Public/State/MDCSwipeDirection.h:
--------------------------------------------------------------------------------
1 | //
2 | // MDCSwipeDirection.h
3 | //
4 | // Copyright (c) 2014 to present, Brian Gesiak @modocache
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 | //
24 |
25 | #import
26 |
27 | /*!
28 | * MDCSwipeDirection represents the direction of a swipe. For example,
29 | * `MDCSwipeToChooseView` considers a swipe to the left as negative,
30 | * and a swipe to the right as positive.
31 | */
32 | typedef NS_ENUM(NSInteger, MDCSwipeDirection) {
33 | MDCSwipeDirectionNone = 0,
34 | MDCSwipeDirectionLeft,
35 | MDCSwipeDirectionRight
36 | };
37 |
--------------------------------------------------------------------------------
/Third/MDCSwipeToChoose/MDCSwipeToChoose/Internal/MDCGeometry.h:
--------------------------------------------------------------------------------
1 | //
2 | // MDCGeometry.h
3 | //
4 | // Copyright (c) 2014 to present, Brian Gesiak @modocache
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 | //
24 |
25 | #import
26 |
27 | extern CGPoint MDCCGPointAdd(const CGPoint a, const CGPoint b);
28 | extern CGPoint MDCCGPointSubtract(const CGPoint minuend, const CGPoint subtrahend);
29 | extern CGFloat MDCDegreesToRadians(const CGFloat degrees);
30 | extern CGRect MDCCGRectExtendedOutOfBounds(const CGRect rect,
31 | const CGRect bounds,
32 | const CGPoint translation);
33 |
--------------------------------------------------------------------------------
/Third/MDCSwipeToChoose/MDCSwipeToChoose/Internal/UIColor+MDCRGB8Bit.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIColor+MDCRGB8Bit.m
3 | //
4 | // Copyright (c) 2014 to present, Brian Gesiak @modocache
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 | //
24 |
25 | #import "UIColor+MDCRGB8Bit.h"
26 |
27 | @implementation UIColor (MDCRGB8Bit)
28 |
29 | #pragma mark - Public Interface
30 |
31 | + (UIColor *)colorWith8BitRed:(CGFloat)red
32 | green:(CGFloat)green
33 | blue:(CGFloat)blue
34 | alpha:(CGFloat)alpha {
35 | float denominator = 255.f;
36 | return [UIColor colorWithRed:red/denominator
37 | green:green/denominator
38 | blue:blue/denominator
39 | alpha:alpha];
40 | }
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/Third/MDCSwipeToChoose/MDCSwipeToChoose/Public/Options/MDCSwipeToChooseViewOptions.m:
--------------------------------------------------------------------------------
1 | //
2 | // MDCSwipeToChooseViewOptions.m
3 | //
4 | // Copyright (c) 2014 to present, Brian Gesiak @modocache
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 | //
24 |
25 | #import "MDCSwipeToChooseViewOptions.h"
26 | #import "UIColor+MDCRGB8Bit.h"
27 |
28 | @implementation MDCSwipeToChooseViewOptions
29 |
30 | - (instancetype)init {
31 | self = [super init];
32 | if (self) {
33 | _likedText = [NSLocalizedString(@"liked", nil) uppercaseString];
34 | _likedColor = [UIColor colorWith8BitRed:29.f green:245.f blue:106.f alpha:1.f];
35 | _likedRotationAngle = -15.f;
36 |
37 | _nopeText = [NSLocalizedString(@"nope", nil) uppercaseString];
38 | _nopeColor = [UIColor colorWith8BitRed:247.f green:91.f blue:37.f alpha:1.f];
39 | _nopeRotationAngle = 15.f;
40 |
41 | _threshold = 100.f;
42 | }
43 | return self;
44 | }
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/Third/MDCSwipeToChoose/MDCSwipeToChoose/Internal/State/MDCViewState.h:
--------------------------------------------------------------------------------
1 | //
2 | // MDCViewState.h
3 | //
4 | // Copyright (c) 2014 to present, Brian Gesiak @modocache
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 | //
24 |
25 | #import
26 |
27 | typedef CGFloat MDCRotationDirection;
28 | extern const MDCRotationDirection MDCRotationAwayFromCenter;
29 | extern const MDCRotationDirection MDCRotationTowardsCenter;
30 |
31 | @interface MDCViewState : NSObject
32 |
33 | /*!
34 | * The center of the view when the pan gesture began.
35 | */
36 | @property (nonatomic, assign) CGPoint originalCenter;
37 |
38 | /*!
39 | * When the pan gesture originates at the top half of the view, the view rotates
40 | * away from its original center, and this property takes on a value of 1.
41 | *
42 | * When the pan gesture originates at the bottom half, the view rotates toward its
43 | * original center, and this takes on a value of -1.
44 | */
45 | @property (nonatomic, assign) MDCRotationDirection rotationDirection;
46 |
47 | @end
48 |
--------------------------------------------------------------------------------
/Third/MDCSwipeToChoose/MDCSwipeToChoose/Public/State/MDCSwipeResult.h:
--------------------------------------------------------------------------------
1 | //
2 | // MDCSwipeResult.h
3 | //
4 | // Copyright (c) 2014 to present, Brian Gesiak @modocache
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 | //
24 |
25 | #import
26 | #import "MDCSwipeDirection.h"
27 |
28 | typedef void (^MDCSwipedOnCompletionBlock)(void);
29 |
30 | /*!
31 | * An object representing the result of a swipe.
32 | * This is provided as an argument to `MDCSwipeToChooseOnChosenBlock` callbacks.
33 | */
34 | @interface MDCSwipeResult : NSObject
35 |
36 | /*!
37 | * The view that was swiped.
38 | */
39 | @property (nonatomic, strong) UIView *view;
40 |
41 | /*!
42 | * The translation of the swiped view; i.e.: the distance it has been panned
43 | * from its original location.
44 | */
45 | @property (nonatomic, assign) CGPoint translation;
46 |
47 | /*!
48 | * The final direction of the swipe.
49 | */
50 | @property (nonatomic, assign) MDCSwipeDirection direction;
51 |
52 | /*!
53 | * A callback to be executed after any animations performed by the `MDCSwipeOptions`
54 | * `onChosen` callback.
55 | */
56 | @property (nonatomic, copy) MDCSwipedOnCompletionBlock onCompletion;
57 |
58 | @end
59 |
--------------------------------------------------------------------------------
/Third/MDCSwipeToChoose/MDCSwipeToChoose/Public/State/MDCPanState.h:
--------------------------------------------------------------------------------
1 | //
2 | // MDCPanState.h
3 | //
4 | // Copyright (c) 2014 to present, Brian Gesiak @modocache
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 | //
24 |
25 | #import
26 | #import "MDCSwipeDirection.h"
27 |
28 | /*!
29 | * An object representing the state of the current pan gesture.
30 | * This is provided as an argument to `MDCSwipeToChooseOnPanBlock` callbacks.
31 | */
32 | @interface MDCPanState : NSObject
33 |
34 | /*!
35 | * The view being panned.
36 | */
37 | @property (nonatomic, strong) UIView *view;
38 |
39 | /*!
40 | * The direction of the current pan. Note that a direction of `MDCSwipeDirectionRight`
41 | * does not imply that the threshold has been reached.
42 | */
43 | @property (nonatomic, assign) MDCSwipeDirection direction;
44 |
45 | /*!
46 | * The ratio of the threshold that has been reached. This can take on any value
47 | * between `0.0f` and `1.0f`, with `1.0f` meaning the threshold has been reached.
48 | * A `thresholdRatio` of `1.0f` implies that were the user to end the pan gesture,
49 | * the current direction would be chosen.
50 | */
51 | @property (nonatomic, assign) CGFloat thresholdRatio;
52 |
53 | @end
54 |
--------------------------------------------------------------------------------
/Third/MDCSwipeToChoose/MDCSwipeToChoose/Public/Views/MDCSwipeToChooseView.h:
--------------------------------------------------------------------------------
1 | //
2 | // MDCSwipeToChooseView.h
3 | //
4 | // Copyright (c) 2014 to present, Brian Gesiak @modocache
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 | //
24 |
25 | #import
26 |
27 | @class MDCSwipeToChooseViewOptions;
28 |
29 | /*!
30 | * A `UIView` subclass that acts nearly identically to the swipe-to-choose
31 | * views in Tinder.app. Swipe right to "like", left to "dislike".
32 | */
33 | @interface MDCSwipeToChooseView : UIView
34 |
35 | /*!
36 | * The main image to be displayed and then "liked" or "disliked".
37 | */
38 | @property (nonatomic, strong) UIImageView *imageView;
39 |
40 | /*!
41 | * The "liked" view, which fades in as the `MDCSwipeToChooseView` is panned to the right.
42 | */
43 | @property (nonatomic, strong) UIView *likedView;
44 |
45 | /*!
46 | * The "nope" view, which fades in as the `MDCSwipeToChooseView` is panned to the left.
47 | */
48 | @property (nonatomic, strong) UIView *nopeView;
49 |
50 | /*!
51 | * The designated initializer takes a `frame` and a set of options to customize
52 | * the behavior of the view.
53 | */
54 | - (instancetype)initWithFrame:(CGRect)frame
55 | options:(MDCSwipeToChooseViewOptions *)options;
56 |
57 | @end
58 |
--------------------------------------------------------------------------------
/Third/MDCSwipeToChoose/MDCSwipeToChoose/Internal/Views/UIView+MDCBorderedLabel.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+MDCBorderedLabel.m
3 | //
4 | // Copyright (c) 2014 to present, Brian Gesiak @modocache
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 | //
24 |
25 | #import "UIView+MDCBorderedLabel.h"
26 | #import "MDCGeometry.h"
27 | #import
28 |
29 | /**
30 | * 此类为label扩展类 可编辑borderColor,并进行旋转
31 | */
32 | @implementation UIView (MDCBorderedLabel)
33 |
34 | - (void)constructBorderedLabelWithText:(NSString *)text
35 | color:(UIColor *)color
36 | angle:(CGFloat)angle {
37 | self.layer.borderColor = color.CGColor;
38 | self.layer.borderWidth = 5.f;
39 | self.layer.cornerRadius = 10.f;
40 |
41 | UILabel *label = [[UILabel alloc] initWithFrame:self.bounds];
42 | label.text = [text uppercaseString];
43 | label.text = text;
44 | label.textAlignment = NSTextAlignmentCenter;
45 | label.font = [UIFont fontWithName:@"HelveticaNeue-CondensedBlack"
46 | size:48.f];
47 | label.textColor = color;
48 | [self addSubview:label];
49 |
50 | self.transform = CGAffineTransformRotate(CGAffineTransformIdentity,
51 | MDCDegreesToRadians(angle));
52 | }
53 |
54 | @end
55 |
--------------------------------------------------------------------------------
/Third/MDCSwipeToChoose/MDCSwipeToChoose/Internal/MDCGeometry.m:
--------------------------------------------------------------------------------
1 | //
2 | // MDCGeometry.m
3 | //
4 | // Copyright (c) 2014 to present, Brian Gesiak @modocache
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 | //
24 |
25 | #import "MDCGeometry.h"
26 |
27 | #pragma mark - Public Interface
28 |
29 | CGPoint MDCCGPointAdd(const CGPoint a, const CGPoint b) {
30 | return CGPointMake(a.x + b.x,
31 | a.y + b.y);
32 | }
33 |
34 | CGPoint MDCCGPointSubtract(const CGPoint minuend, const CGPoint subtrahend) {
35 | return CGPointMake(minuend.x - subtrahend.x,
36 | minuend.y - subtrahend.y);
37 | }
38 |
39 | CGFloat MDCDegreesToRadians(const CGFloat degrees) {
40 | return degrees * (M_PI/180.0);
41 | }
42 |
43 | CGRect MDCCGRectExtendedOutOfBounds(const CGRect rect,
44 | const CGRect bounds,
45 | const CGPoint translation) {
46 | CGRect destination = rect;
47 | while (!CGRectIsNull(CGRectIntersection(bounds, destination))) {
48 | destination = CGRectMake(CGRectGetMinX(destination) + translation.x,
49 | CGRectGetMinY(destination) + translation.y,
50 | CGRectGetWidth(destination),
51 | CGRectGetHeight(destination));
52 | }
53 |
54 | return destination;
55 | }
56 |
--------------------------------------------------------------------------------
/DemoOfQQMeet/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // DemoOfQQMeet
4 | //
5 | // Created by Jian HU on 15/5/8.
6 | // Copyright (c) 2015年 Wujunqiu. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 | #import "ViewController.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 makeKeyAndVisible];
24 |
25 | UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:[[ViewController alloc]init]];
26 | self.window.rootViewController = nav;
27 | return YES;
28 | }
29 |
30 | - (void)applicationWillResignActive:(UIApplication *)application {
31 | // 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.
32 | // 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.
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 | - (void)applicationWillEnterForeground:(UIApplication *)application {
41 | // 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.
42 | }
43 |
44 | - (void)applicationDidBecomeActive:(UIApplication *)application {
45 | // 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.
46 | }
47 |
48 | - (void)applicationWillTerminate:(UIApplication *)application {
49 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
50 | }
51 |
52 | @end
53 |
--------------------------------------------------------------------------------
/Third/MDCSwipeToChoose/MDCSwipeToChoose/Public/Views/UIView+MDCSwipeToChoose.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+MDCSwipeToChoose.h
3 | //
4 | // Copyright (c) 2014 to present, Brian Gesiak @modocache
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 | //
24 |
25 | #import
26 | #import "MDCSwipeDirection.h"
27 |
28 | @class MDCSwipeOptions;
29 |
30 | /*!
31 | * The `UIView (MDCSwipeToChoose)` category adds a pan gesture recognizer
32 | * to any view, via the `mdc_swipeToChooseSetup:` method. By specifying
33 | * blocks to be executed when the view is panned via an instance of
34 | * `MDCSwipeOptions`, you may add custom behavior based on the panning motion.
35 | *
36 | * This is a more generic version of the `MDCSwipeToChooseView` class.
37 | */
38 | @interface UIView (MDCSwipeToChoose)
39 |
40 | /*!
41 | * Adds swipe-to-choose functionality to an instance of `UIView`.
42 | * You may customize the selection threshold and other parameters by
43 | * setting the corresponding settings on the `options` argument.
44 | * Passing `nil` for the `options` parameter configures the view with
45 | * the default set of options.
46 | */
47 | - (void)mdc_swipeToChooseSetup:(MDCSwipeOptions *)options;
48 |
49 | /*!
50 | * Programmatically swipes the view in the direction specified.
51 | *
52 | * Specifying a direction of MDCSwipeDirectionNone swipes the view
53 | * if the swipe threshold is currently exceeded, and returns it to
54 | * its original position otherwise.
55 | *
56 | * If you haven't called `mdc_swipeToChooseSetup:` already, this will call
57 | * that method and perform setup using the default set of options.
58 | */
59 | - (void)mdc_swipe:(MDCSwipeDirection)direction;
60 |
61 | @end
62 |
--------------------------------------------------------------------------------
/Third/MDCSwipeToChoose/MDCSwipeToChoose/Public/Options/MDCSwipeOptions.m:
--------------------------------------------------------------------------------
1 | //
2 | // MDCSwipeOptions.m
3 | //
4 | // Copyright (c) 2014 to present, Brian Gesiak @modocache
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 | //
24 |
25 | #import "MDCSwipeOptions.h"
26 | #import "MDCSwipeToChoose.h"
27 | #import "MDCGeometry.h"
28 |
29 | @implementation MDCSwipeOptions
30 |
31 | #pragma mark - Object Lifecycle
32 |
33 | - (instancetype)init {
34 | self = [super init];
35 | if (self) {
36 | _swipeCancelledAnimationDuration = 0.2;
37 | _swipeCancelledAnimationOptions = UIViewAnimationOptionCurveEaseOut;
38 | _swipeAnimationDuration = 0.1;
39 | _swipeAnimationOptions = UIViewAnimationOptionCurveEaseIn;
40 | _rotationFactor = 3.f;
41 |
42 | _onChosen = [[self class] exitScreenOnChosenWithDuration:0.1
43 | options:UIViewAnimationOptionCurveLinear];
44 | }
45 | return self;
46 | }
47 |
48 | #pragma mark - Public Interface
49 |
50 | + (MDCSwipeToChooseOnChosenBlock)exitScreenOnChosenWithDuration:(NSTimeInterval)duration
51 | options:(UIViewAnimationOptions)options {
52 | return ^(MDCSwipeResult *state) {
53 | CGRect destination = MDCCGRectExtendedOutOfBounds(state.view.frame,
54 | state.view.superview.bounds,
55 | state.translation);
56 | [UIView animateWithDuration:duration
57 | delay:0.0
58 | options:options
59 | animations:^{
60 | state.view.frame = destination;
61 | } completion:^(BOOL finished) {
62 | if (finished) {
63 | [state.view removeFromSuperview];
64 | state.onCompletion();
65 | }
66 | }];
67 | };
68 | }
69 |
70 | @end
71 |
--------------------------------------------------------------------------------
/Third/MDCSwipeToChoose/MDCSwipeToChoose/Public/Options/MDCSwipeToChooseViewOptions.h:
--------------------------------------------------------------------------------
1 | //
2 | // MDCSwipeToChooseViewOptions.h
3 | //
4 | // Copyright (c) 2014 to present, Brian Gesiak @modocache
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 | //
24 |
25 | #import
26 | #import "MDCSwipeOptions.h"
27 |
28 | /*!
29 | * `MDCSwipeToChooseViewOptions` may be used to customize the behavior and
30 | * appearance of a `MDCSwipeToChooseView`.
31 | */
32 | @interface MDCSwipeToChooseViewOptions : NSObject
33 |
34 | /*!
35 | * The delegate that receives messages pertaining to the swipe choices of the view.
36 | */
37 | @property (nonatomic, weak) id delegate;
38 |
39 | /*!
40 | * The text displayed in the `likedView`. A default value is provided in the
41 | * `-init` method.
42 | */
43 | @property (nonatomic, copy) NSString *likedText;
44 |
45 | /*!
46 | * The color of the text and border of the `likedView`. A default value is provided in the
47 | * `-init` method.
48 | */
49 | @property (nonatomic, strong) UIColor *likedColor;
50 |
51 | /*!
52 | * The rotation angle of the `likedView`. A default value is provided in the
53 | * `-init` method.
54 | */
55 | @property (nonatomic, assign) CGFloat likedRotationAngle;
56 |
57 | /*!
58 | * The text displayed in the `nopeView`. A default value is provided in the
59 | * `-init` method.
60 | */
61 | @property (nonatomic, copy) NSString *nopeText;
62 |
63 | /*!
64 | * The color of the text and border of the `nopeView`. A default value is provided in the
65 | * `-init` method.
66 | */
67 | @property (nonatomic, strong) UIColor *nopeColor;
68 |
69 | /*!
70 | * The rotation angle of the `nopeView`. A default value is provided in the
71 | * `-init` method.
72 | */
73 | @property (nonatomic, assign) CGFloat nopeRotationAngle;
74 |
75 | /*!
76 | * The distance, in pixels, that a view must be panned in order to constitue a selection.
77 | * For example, if the `threshold` is `100.f`, panning the view `101.f` pixels to the right
78 | * is considered a selection in the `MDCSwipeDirectionRight` direction. A default value is
79 | * provided in the `-init` method.
80 | */
81 | @property (nonatomic, assign) CGFloat threshold;
82 |
83 | /*!
84 | * A callback to be executed when the view is panned. The block takes an instance of
85 | * `MDCPanState` as an argument. Use this `state` instance to determine the pan direction
86 | * and the distance until the threshold is reached.
87 | */
88 | @property (nonatomic, copy) MDCSwipeToChooseOnPanBlock onPan;
89 |
90 | @end
91 |
--------------------------------------------------------------------------------
/DemoOfQQMeet/Base.lproj/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
20 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/Third/MDCSwipeToChoose/README.md:
--------------------------------------------------------------------------------
1 | # MDCSwipeToChoose
2 |
3 | [](https://travis-ci.org/modocache/MDCSwipeToChoose)
4 |
5 | Swipe to "like" or "dislike" any view, just like Tinder.app. Build a flashcard app, a photo viewer, and more, in minutes, not hours!
6 |
7 | - Use `UIView+MDCSwipeToChoose` to add a swipe gesture and callbacks to any `UIView`.
8 | - Use `MDCSwipeToChooseView` to get a UI nearly identical to Tinder.app in just a few lines of code.
9 |
10 | 
11 |
12 | You may view slides on some the architecture decisions that went into this library [here](http://modocache.io/ios-ui-component-api-design).
13 |
14 | ## How to Install via CocoaPods
15 |
16 | Place the following in your Podfile and run `pod install`:
17 |
18 | ```objc
19 | pod "MDCSwipeToChoose"
20 | ```
21 |
22 | ## How to Use
23 |
24 | Check out [the sample app](https://github.com/modocache/MDCSwipeToChoose/tree/master/Examples/LikedOrNope) for an example of how to use `MDCSwipeToChooseView` to build the UI in the GIF above.
25 |
26 | > **NOTE:** You must run `pod install` in the `Examples/LikedOrNope` directory before building the example app.
27 |
28 | Every public class contains documentation in its header file.
29 |
30 | ### Swiping Yes/No
31 |
32 | The following is an example of how you can use `MDCSwipeToChooseView` to display a photo. The user can choose to delete it by swiping left, or save it by swiping right.
33 |
34 | ```objc
35 | #import
36 |
37 | // ... in a view controller
38 |
39 | #pragma mark - Creating and Customizing a MDCSwipeToChooseView
40 |
41 | - (void)viewDidLoad {
42 | [super viewDidLoad];
43 |
44 | // You can customize MDCSwipeToChooseView using MDCSwipeToChooseViewOptions.
45 | MDCSwipeToChooseViewOptions *options = [MDCSwipeToChooseViewOptions new];
46 | options.delegate = self;
47 | options.likedText = @"Keep";
48 | options.likedColor = [UIColor blueColor];
49 | options.nopeText = @"Delete";
50 | options.onPan = ^(MDCPanState *state){
51 | if (state.thresholdRatio == 1.f && state.direction == MDCSwipeDirectionLeft) {
52 | NSLog(@"Let go now to delete the photo!");
53 | }
54 | };
55 |
56 | MDCSwipeToChooseView *view = [[MDCSwipeToChooseView alloc] initWithFrame:self.view.bounds
57 | options:options];
58 | view.imageView.image = [UIImage imageNamed:@"photo"];
59 | [self.view addSubview:view];
60 | }
61 |
62 | #pragma mark - MDCSwipeToChooseDelegate Callbacks
63 |
64 | // This is called when a user didn't fully swipe left or right.
65 | - (void)viewDidCancelSwipe:(UIView *)view {
66 | NSLog(@"Couldn't decide, huh?");
67 | }
68 |
69 | // This is called then a user swipes the view fully left or right.
70 | - (void)view:(UIView *)view wasChosenWithDirection:(MDCSwipeDirection)direction {
71 | if (direction == MDCSwipeDirectionLeft) {
72 | NSLog(@"Photo deleted!");
73 | } else {
74 | NSLog(@"Photo saved!");
75 | }
76 | }
77 | ```
78 |
79 | As of version 0.2.0, you may also swipe a view programmatically:
80 |
81 | ```objc
82 | [self.swipeToChooseView mdc_swipe:MDCSwipeDirectionLeft];
83 | ```
84 |
85 | ## More Generic Swiping
86 |
87 | You don't have to use a subclass of `MDCChooseView`. You can use the `mdc_swipeToChooseSetup:` method on any `UIView` to enable swipe-to-choose.
88 |
89 | In the following example, we adjust the opacity of a `UIWebView` when it's panned left and right.
90 |
91 | ```objc
92 | #import
93 |
94 | // ... in a view controller
95 |
96 | - (void)viewDidLoad {
97 | [super viewDidLoad];
98 |
99 | MDCSwipeOptions *options = [MDCSwipeOptions new];
100 | options.delegate = self;
101 | options.onPan = ^(MDCPanState *state){
102 | switch (state.direction) {
103 | case MDCSwipeDirectionLeft:
104 | self.webView.alpha = 0.5f - state.thresholdRatio;
105 | break;
106 | case MDCSwipeDirectionRight:
107 | self.webView.alpha = 0.5f + state.thresholdRatio;
108 | break;
109 | case MDCSwipeDirectionNone:
110 | self.webView.alpha = 0.5f;
111 | break;
112 | }
113 | };
114 | [self.webView mdc_swipeToChooseSetup:options];
115 | }
116 | ```
117 |
118 | ## License
119 |
120 | All the source code is distributed under the [MIT license](http://www.opensource.org/licenses/mit-license.php). See the LICENSE file for details. The license does not apply to the images used in the sample apps.
121 |
--------------------------------------------------------------------------------
/Third/MDCSwipeToChoose/MDCSwipeToChoose/Public/Options/MDCSwipeOptions.h:
--------------------------------------------------------------------------------
1 | //
2 | // MDCSwipeOptions.h
3 | //
4 | // Copyright (c) 2014 to present, Brian Gesiak @modocache
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 | //
24 |
25 | #import
26 |
27 | @class MDCPanState;
28 | @class MDCSwipeResult;
29 | @protocol MDCSwipeToChooseDelegate;
30 |
31 | typedef void (^MDCSwipeToChooseOnPanBlock)(MDCPanState *state);
32 | typedef void (^MDCSwipeToChooseOnChosenBlock)(MDCSwipeResult *state);
33 |
34 | /*!
35 | * A set of options used to customize the behavior of the
36 | * `UIView (MDCSwipeToChoose)` category.
37 | */
38 | @interface MDCSwipeOptions : NSObject
39 |
40 | /*!
41 | * The delegate that receives messages pertaining to the swipe choices of the view.
42 | */
43 | @property (nonatomic, weak) id delegate;
44 |
45 | /*!
46 | * The duration of the animation that occurs when a swipe is cancelled. By default, this
47 | * animation simply slides the view back to its original position. A default value is
48 | * provided in the `-init` method.
49 | */
50 | @property (nonatomic, assign) NSTimeInterval swipeCancelledAnimationDuration;
51 |
52 | /*!
53 | * Animation options for the swipe-cancelled animation. Default values are provided in the
54 | * `-init` method.
55 | */
56 | @property (nonatomic, assign) UIViewAnimationOptions swipeCancelledAnimationOptions;
57 |
58 | /*!
59 | * THe duration of the animation that moves a view to its threshold, caused when `mdc_swipe:`
60 | * is called. A default value is provided in the `-init` method.
61 | */
62 | @property (nonatomic, assign) NSTimeInterval swipeAnimationDuration;
63 |
64 | /*!
65 | * Animation options for the animation that moves a view to its threshold, caused when
66 | * `mdc_swipe:` is called. A default value is provided in the `-init` method.
67 | */
68 | @property (nonatomic, assign) UIViewAnimationOptions swipeAnimationOptions;
69 |
70 | /*!
71 | * The distance, in pixels, that a view must be panned in order to constitue a selection.
72 | * For example, if the `threshold` is `100.f`, panning the view `101.f` pixels to the right
73 | * is considered a selection in the `MDCSwipeDirectionRight` direction. A default value is
74 | * provided in the `-init` method.
75 | */
76 | @property (nonatomic, assign) CGFloat threshold;
77 |
78 | /*!
79 | * When a view is panned, it is rotated slightly. Adjust this value to increase or decrease
80 | * the angle of rotation.
81 | */
82 | @property (nonatomic, assign) CGFloat rotationFactor;
83 |
84 | /*!
85 | * A callback to be executed when the view is panned. The block takes an instance of
86 | * `MDCPanState` as an argument. Use this `state` instance to determine the pan direction
87 | * and the distance until the threshold is reached.
88 | */
89 | @property (nonatomic, copy) MDCSwipeToChooseOnPanBlock onPan;
90 |
91 | /*!
92 | * A callback to be executed when the view is swiped and chosen. The default
93 | is the block returned by the `-exitScreenOnChosenWithDuration:block:` method.
94 |
95 | @warning that this block must execute the `MDCSwipeResult` argument's `onCompletion`
96 | block in order to properly notify the delegate of the swipe result.
97 | */
98 | @property (nonatomic, copy) MDCSwipeToChooseOnChosenBlock onChosen;
99 |
100 | /*!
101 | * The default callback for when a view is swiped an chosen. This callback moves the view
102 | * outside of the bounds of its parent view, then removes it from the view hierarchy.
103 | */
104 | + (MDCSwipeToChooseOnChosenBlock)exitScreenOnChosenWithDuration:(NSTimeInterval)duration
105 | options:(UIViewAnimationOptions)options;
106 |
107 | @end
108 |
--------------------------------------------------------------------------------
/DemoOfQQMeet.xcodeproj/xcuserdata/jianhu.xcuserdatad/xcschemes/DemoOfQQMeet.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
38 |
39 |
44 |
45 |
47 |
53 |
54 |
55 |
56 |
57 |
63 |
64 |
65 |
66 |
75 |
77 |
83 |
84 |
85 |
86 |
87 |
88 |
94 |
96 |
102 |
103 |
104 |
105 |
107 |
108 |
111 |
112 |
113 |
--------------------------------------------------------------------------------
/Third/MDCSwipeToChoose/MDCSwipeToChoose/Public/Views/MDCSwipeToChooseView.m:
--------------------------------------------------------------------------------
1 | //
2 | // MDCSwipeToChooseView.m
3 | //
4 | // Copyright (c) 2014 to present, Brian Gesiak @modocache
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 | //
24 |
25 | #import "MDCSwipeToChooseView.h"
26 | #import "MDCSwipeToChoose.h"
27 | #import "MDCGeometry.h"
28 | #import "UIView+MDCBorderedLabel.h"
29 | #import "UIColor+MDCRGB8Bit.h"
30 | #import
31 |
32 | static CGFloat const MDCSwipeToChooseViewHorizontalPadding = 10.f;
33 | static CGFloat const MDCSwipeToChooseViewTopPadding = 20.f;
34 | static CGFloat const MDCSwipeToChooseViewLabelWidth = 65.f;
35 |
36 | @interface MDCSwipeToChooseView ()
37 | @property (nonatomic, strong) MDCSwipeToChooseViewOptions *options;
38 | @end
39 |
40 | @implementation MDCSwipeToChooseView
41 |
42 | #pragma mark - Object Lifecycle
43 |
44 | - (instancetype)initWithFrame:(CGRect)frame options:(MDCSwipeToChooseViewOptions *)options {
45 | self = [super initWithFrame:frame];
46 | if (self) {
47 | _options = options ? options : [MDCSwipeToChooseViewOptions new];
48 | [self setupView];
49 | [self constructImageView];
50 | [self constructLikedView];
51 | [self constructNopeImageView];
52 | [self setupSwipeToChoose];
53 | }
54 | return self;
55 | }
56 |
57 | #pragma mark - Internal Methods
58 |
59 | - (void)setupView {
60 | self.backgroundColor = [UIColor clearColor];
61 | self.layer.cornerRadius = 5.f;
62 | self.layer.borderWidth = 2.f;
63 | self.layer.borderColor = [UIColor colorWith8BitRed:220.f
64 | green:220.f
65 | blue:220.f
66 | alpha:1.f].CGColor;
67 | }
68 |
69 | - (void)constructImageView {
70 | _imageView = [[UIImageView alloc] initWithFrame:self.bounds];
71 | _imageView.clipsToBounds = YES;
72 | [self addSubview:_imageView];
73 | }
74 |
75 | - (void)constructLikedView {
76 | CGRect frame = CGRectMake(MDCSwipeToChooseViewHorizontalPadding,
77 | MDCSwipeToChooseViewTopPadding,
78 | CGRectGetMidX(_imageView.bounds),
79 | MDCSwipeToChooseViewLabelWidth);
80 | self.likedView = [[UIView alloc] initWithFrame:frame];
81 | [self.likedView constructBorderedLabelWithText:self.options.likedText
82 | color:self.options.likedColor
83 | angle:self.options.likedRotationAngle];
84 | self.likedView.alpha = 0.f;
85 | [self.imageView addSubview:self.likedView];
86 | }
87 |
88 | - (void)constructNopeImageView {
89 | CGFloat width = CGRectGetMidX(self.imageView.bounds);
90 | CGFloat xOrigin = CGRectGetMaxX(_imageView.bounds) - width - MDCSwipeToChooseViewHorizontalPadding;
91 | self.nopeView = [[UIImageView alloc] initWithFrame:CGRectMake(xOrigin,
92 | MDCSwipeToChooseViewTopPadding,
93 | width,
94 | MDCSwipeToChooseViewLabelWidth)];
95 | [self.nopeView constructBorderedLabelWithText:self.options.nopeText
96 | color:self.options.nopeColor
97 | angle:self.options.nopeRotationAngle];
98 | self.nopeView.alpha = 0.f;
99 | [self.imageView addSubview:self.nopeView];
100 | }
101 |
102 | - (void)setupSwipeToChoose {
103 | MDCSwipeOptions *options = [MDCSwipeOptions new];
104 | options.delegate = self.options.delegate;
105 | options.threshold = self.options.threshold;
106 |
107 | __block UIView *likedImageView = self.likedView;
108 | __block UIView *nopeImageView = self.nopeView;
109 | __weak MDCSwipeToChooseView *weakself = self;
110 | options.onPan = ^(MDCPanState *state) {
111 | if (state.direction == MDCSwipeDirectionNone) {
112 | likedImageView.alpha = 0.f;
113 | nopeImageView.alpha = 0.f;
114 | } else if (state.direction == MDCSwipeDirectionLeft) {
115 | likedImageView.alpha = 0.f;
116 | nopeImageView.alpha = state.thresholdRatio;
117 | } else if (state.direction == MDCSwipeDirectionRight) {
118 | likedImageView.alpha = state.thresholdRatio;
119 | nopeImageView.alpha = 0.f;
120 | }
121 |
122 | if (weakself.options.onPan) {
123 | weakself.options.onPan(state);
124 | }
125 | };
126 |
127 | [self mdc_swipeToChooseSetup:options];
128 | }
129 |
130 | @end
131 |
--------------------------------------------------------------------------------
/DemoOfQQMeet/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // DemoOfQQMeet
4 | //
5 | // Created by Jian HU on 15/5/8.
6 | // Copyright (c) 2015年 Wujunqiu. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | static const CGFloat ChoosePersonButtonHorizontalPadding = 80.f;
12 | static const CGFloat ChoosePersonButtonVerticalPadding = 20.f;
13 |
14 | @interface ViewController ()
15 |
16 | @end
17 |
18 | @implementation ViewController
19 | @synthesize persons;
20 | @synthesize frontCardView,backCardView;
21 |
22 | - (id)init
23 | {
24 | self = [super init];
25 | if (self) {
26 | self.title = @"巧遇";
27 | persons = [NSMutableArray array];
28 | }
29 | return self;
30 | }
31 |
32 | - (void)viewDidLoad {
33 | [super viewDidLoad];
34 |
35 | persons = [[Person shareManager]allPersons];
36 |
37 | frontCardView = [self popPersonViewWithFrame:[self frontCardViewFrame]];
38 | [self.view addSubview:frontCardView];
39 |
40 | backCardView = [self popPersonViewWithFrame:[self backCardViewFrame]];
41 | [self.view insertSubview:backCardView belowSubview:frontCardView];
42 |
43 | [self crateDeleteButton];[self createLikedButton];
44 | }
45 |
46 | - (void)didReceiveMemoryWarning {
47 | [super didReceiveMemoryWarning];
48 | }
49 |
50 |
51 | - (ChoosePersonView *)popPersonViewWithFrame:(CGRect)frame {
52 | if ([persons count] == 0) {
53 | /**
54 | * 这样赋值,可以循环拖拽
55 | */
56 | persons = [[Person shareManager]allPersons];
57 | }
58 | MDCSwipeToChooseViewOptions *options = [[MDCSwipeToChooseViewOptions alloc]init];
59 | options.delegate = self;
60 | options.threshold = 160.f;
61 | options.nopeText = @"Delete";
62 | options.likedText = @"Like";
63 | options.onPan = ^(MDCPanState *state){
64 | CGRect frame = [self backCardViewFrame];
65 | self.backCardView.frame = CGRectMake(frame.origin.x,
66 | frame.origin.y - (state.thresholdRatio * 10.f),
67 | CGRectGetWidth(frame),
68 | CGRectGetHeight(frame));
69 | };
70 |
71 | ChoosePersonView *personView = [[ChoosePersonView alloc] initWithFrame:frame options:options];
72 | [personView initChoosePersonViewWithModel:persons[0]];
73 | [persons removeObjectAtIndex:0];
74 | return personView;
75 | }
76 |
77 |
78 | #pragma mark - Get View Rect
79 |
80 | - (CGRect)frontCardViewFrame {
81 | CGFloat horizontalPadding = 20.f;
82 | CGFloat topPadding = 80.f;
83 | CGFloat bottomPadding = 200.f;
84 | return CGRectMake(horizontalPadding,
85 | topPadding,
86 | CGRectGetWidth(self.view.frame) - (horizontalPadding * 2),
87 | CGRectGetHeight(self.view.frame) - bottomPadding);
88 | }
89 |
90 | - (CGRect)backCardViewFrame {
91 | /**
92 | * 后面的view.frame.origin.y 比前一个大10,可以调节错位显示
93 | */
94 | CGRect frontFrame = [self frontCardViewFrame];
95 | return CGRectMake(frontFrame.origin.x,
96 | frontFrame.origin.y + 10.f,
97 | CGRectGetWidth(frontFrame),
98 | CGRectGetHeight(frontFrame));
99 | }
100 |
101 | #pragma mark - MDCSwipeToChooseDelegate
102 |
103 | // This is called when a user didn't fully swipe left or right.
104 | - (void)viewDidCancelSwipe:(UIView *)view {
105 | if ([view isKindOfClass:[ChoosePersonView class]]) {
106 | ChoosePersonView *tempChooseView = (ChoosePersonView *) view;
107 | NSLog(@"You couldn't decide on person:%@",tempChooseView.person.personName);
108 | }
109 | }
110 |
111 | // This is called then a user swipes the view fully left or right.
112 | - (void)view:(UIView *)view wasChosenWithDirection:(MDCSwipeDirection)direction {
113 | // MDCSwipeToChooseView shows "NOPE" on swipes to the left,
114 | // and "LIKED" on swipes to the right.
115 | if (direction == MDCSwipeDirectionLeft) {
116 | NSLog(@"You noped");
117 | //可以针对该视图做相应处理,根据它的属性Person对象
118 | } else {
119 | NSLog(@"You liked");
120 | }
121 |
122 | // MDCSwipeToChooseView removes the view from the view hierarchy
123 | // after it is swiped (this behavior can be customized via the
124 | // MDCSwipeOptions class). Since the front card view is gone, we
125 | // move the back card to the front, and create a new back card.
126 |
127 | self.frontCardView = self.backCardView;
128 | if ((self.backCardView = [self popPersonViewWithFrame:[self backCardViewFrame]])) {
129 | // Fade the back card into view.
130 | self.backCardView.alpha = 0.f;
131 | [self.view insertSubview:self.backCardView belowSubview:self.frontCardView];
132 | [UIView animateWithDuration:0.5
133 | delay:0.0
134 | options:UIViewAnimationOptionCurveEaseInOut
135 | animations:^{
136 | self.backCardView.alpha = 1.f;
137 | } completion:nil];
138 | }
139 | }
140 |
141 | #pragma mark - Create Delete And Like Button
142 |
143 | - (void)crateDeleteButton {
144 | UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
145 | UIImage *image = [UIImage imageNamed:@"nope"];
146 | button.frame = CGRectMake(ChoosePersonButtonHorizontalPadding,
147 | CGRectGetMaxY(self.backCardView.frame) + ChoosePersonButtonVerticalPadding,
148 | image.size.width,
149 | image.size.height);
150 | [button setImage:image forState:UIControlStateNormal];
151 | [button setTintColor:[UIColor colorWithRed:247.f/255.f
152 | green:91.f/255.f
153 | blue:37.f/255.f
154 | alpha:1.f]];
155 | [button addTarget:self action:@selector(deleteFrontCardView) forControlEvents:UIControlEventTouchUpInside];
156 | [self.view addSubview:button];
157 | }
158 |
159 | - (void)createLikedButton {
160 | UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
161 | UIImage *image = [UIImage imageNamed:@"liked"];
162 | button.frame = CGRectMake(CGRectGetMaxX(self.view.frame) - image.size.width - ChoosePersonButtonHorizontalPadding,
163 | CGRectGetMaxY(self.backCardView.frame) + ChoosePersonButtonVerticalPadding,
164 | image.size.width,
165 | image.size.height);
166 | [button setImage:image forState:UIControlStateNormal];
167 | [button setTintColor:[UIColor colorWithRed:29.f/255.f
168 | green:245.f/255.f
169 | blue:106.f/255.f
170 | alpha:1.f]];
171 | [button addTarget:self action:@selector(likeFrontCardView) forControlEvents:UIControlEventTouchUpInside];
172 | [self.view addSubview:button];
173 | }
174 |
175 | #pragma mark Control Events
176 |
177 | - (void)deleteFrontCardView {
178 | [self.frontCardView mdc_swipe:MDCSwipeDirectionLeft];
179 | }
180 |
181 | - (void)likeFrontCardView {
182 | [self.frontCardView mdc_swipe:MDCSwipeDirectionRight];
183 | }
184 |
185 |
186 | @end
187 |
--------------------------------------------------------------------------------
/Third/MDCSwipeToChoose/MDCSwipeToChoose/Public/Views/UIView+MDCSwipeToChoose.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+MDCSwipeToChoose.m
3 | //
4 | // Copyright (c) 2014 to present, Brian Gesiak @modocache
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 | //
24 |
25 | #import "UIView+MDCSwipeToChoose.h"
26 | #import "MDCSwipeToChoose.h"
27 | #import "MDCViewState.h"
28 | #import "MDCGeometry.h"
29 | #import
30 |
31 | const void * const MDCSwipeOptionsKey = &MDCSwipeOptionsKey;
32 | const void * const MDCViewStateKey = &MDCViewStateKey;
33 |
34 | @implementation UIView (MDCSwipeToChoose)
35 |
36 | #pragma mark - Public Interface
37 |
38 | - (void)mdc_swipeToChooseSetup:(MDCSwipeOptions *)options {
39 | self.mdc_options = options ? options : [MDCSwipeOptions new];
40 | self.mdc_viewState = [MDCViewState new];
41 | self.mdc_viewState.originalCenter = self.center;
42 |
43 | [self mdc_setupPanGestureRecognizer];
44 | }
45 |
46 | - (void)mdc_swipe:(MDCSwipeDirection)direction {
47 | [self mdc_swipeToChooseSetupIfNecessary];
48 |
49 | // A swipe in no particular direction "finalizes" the swipe.
50 | if (direction == MDCSwipeDirectionNone) {
51 | [self mdc_finalizePosition];
52 | return;
53 | }
54 |
55 | // Moves the view to the minimum point exceeding the threshold.
56 | // Transforms and executes pan callbacks as well.
57 | void (^animations)(void) = ^{
58 | CGPoint translation = [self mdc_translationExceedingThreshold:self.mdc_options.threshold
59 | direction:direction];
60 | self.center = MDCCGPointAdd(self.center, translation);
61 | [self mdc_rotateForTranslation:translation
62 | rotationDirection:MDCRotationAwayFromCenter];
63 | [self mdc_executeOnPanBlockForTranslation:translation];
64 | };
65 |
66 | // Finalize upon completion of the animations.
67 | void (^completion)(BOOL) = ^(BOOL finished) {
68 | if (finished) { [self mdc_finalizePosition]; }
69 | };
70 |
71 | [UIView animateWithDuration:self.mdc_options.swipeAnimationDuration
72 | delay:0.0
73 | options:self.mdc_options.swipeAnimationOptions
74 | animations:animations
75 | completion:completion];
76 | }
77 |
78 | #pragma mark - Internal Methods
79 |
80 | - (void)setMdc_options:(MDCSwipeOptions *)options {
81 | objc_setAssociatedObject(self, MDCSwipeOptionsKey, options, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
82 | }
83 |
84 | - (MDCSwipeOptions *)mdc_options {
85 | return objc_getAssociatedObject(self, MDCSwipeOptionsKey);
86 | }
87 |
88 | - (void)setMdc_viewState:(MDCViewState *)state {
89 | objc_setAssociatedObject(self, MDCViewStateKey, state, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
90 | }
91 |
92 | - (MDCViewState *)mdc_viewState {
93 | return objc_getAssociatedObject(self, MDCViewStateKey);
94 | }
95 |
96 | #pragma mark Setup
97 |
98 | - (void)mdc_swipeToChooseSetupIfNecessary {
99 | if (!self.mdc_options || !self.mdc_viewState) {
100 | [self mdc_swipeToChooseSetup:nil];
101 | }
102 | }
103 |
104 | - (void)mdc_setupPanGestureRecognizer {
105 | SEL action = @selector(mdc_onSwipeToChoosePanGestureRecognizer:);
106 | UIPanGestureRecognizer *panGestureRecognizer =
107 | [[UIPanGestureRecognizer alloc] initWithTarget:self
108 | action:action];
109 | [self addGestureRecognizer:panGestureRecognizer];
110 | }
111 |
112 | #pragma mark Translation
113 |
114 | - (void)mdc_finalizePosition {
115 | MDCSwipeDirection direction = [self mdc_directionOfExceededThreshold];
116 | switch (direction) {
117 | case MDCSwipeDirectionRight:
118 | case MDCSwipeDirectionLeft: {
119 | CGPoint translation = MDCCGPointSubtract(self.center,
120 | self.mdc_viewState.originalCenter);
121 | [self mdc_exitSuperviewFromTranslation:translation];
122 | break;
123 | }
124 | case MDCSwipeDirectionNone:
125 | [self mdc_returnToOriginalCenter];
126 | [self mdc_executeOnPanBlockForTranslation:CGPointZero];
127 | break;
128 | }
129 | }
130 |
131 | - (void)mdc_returnToOriginalCenter {
132 | [UIView animateWithDuration:self.mdc_options.swipeCancelledAnimationDuration
133 | delay:0.0
134 | options:self.mdc_options.swipeCancelledAnimationOptions
135 | animations:^{
136 | self.transform = CGAffineTransformIdentity;
137 | self.center = self.mdc_viewState.originalCenter;
138 | } completion:^(BOOL finished) {
139 | id delegate = self.mdc_options.delegate;
140 | if ([delegate respondsToSelector:@selector(viewDidCancelSwipe:)]) {
141 | [delegate viewDidCancelSwipe:self];
142 | }
143 | }];
144 | }
145 |
146 | - (void)mdc_exitSuperviewFromTranslation:(CGPoint)translation {
147 | MDCSwipeDirection direction = [self mdc_directionOfExceededThreshold];
148 | id delegate = self.mdc_options.delegate;
149 | if ([delegate respondsToSelector:@selector(view:shouldBeChosenWithDirection:)]) {
150 | BOOL should = [delegate view:self shouldBeChosenWithDirection:direction];
151 | if (!should) {
152 | return;
153 | }
154 | }
155 |
156 | MDCSwipeResult *state = [MDCSwipeResult new];
157 | state.view = self;
158 | state.translation = translation;
159 | state.direction = direction;
160 | state.onCompletion = ^{
161 | if ([delegate respondsToSelector:@selector(view:wasChosenWithDirection:)]) {
162 | [delegate view:self wasChosenWithDirection:direction];
163 | }
164 | };
165 | self.mdc_options.onChosen(state);
166 | }
167 |
168 | - (void)mdc_executeOnPanBlockForTranslation:(CGPoint)translation {
169 | if (self.mdc_options.onPan) {
170 | CGFloat thresholdRatio = MIN(1.f, fabsf(translation.x)/self.mdc_options.threshold);
171 |
172 | MDCSwipeDirection direction = MDCSwipeDirectionNone;
173 | if (translation.x > 0.f) {
174 | direction = MDCSwipeDirectionRight;
175 | } else if (translation.x < 0.f) {
176 | direction = MDCSwipeDirectionLeft;
177 | }
178 |
179 | MDCPanState *state = [MDCPanState new];
180 | state.view = self;
181 | state.direction = direction;
182 | state.thresholdRatio = thresholdRatio;
183 | self.mdc_options.onPan(state);
184 | }
185 | }
186 |
187 | #pragma mark Rotation
188 |
189 | - (void)mdc_rotateForTranslation:(CGPoint)translation
190 | rotationDirection:(MDCRotationDirection)rotationDirection {
191 | CGFloat rotation = MDCDegreesToRadians(translation.x/100 * self.mdc_options.rotationFactor);
192 | self.transform = CGAffineTransformRotate(CGAffineTransformIdentity,
193 | rotationDirection * rotation);
194 | }
195 |
196 | #pragma mark Threshold
197 |
198 | - (CGPoint)mdc_translationExceedingThreshold:(CGFloat)threshold
199 | direction:(MDCSwipeDirection)direction {
200 | NSParameterAssert(direction != MDCSwipeDirectionNone);
201 |
202 | CGFloat offset = threshold + 1.f;
203 | switch (direction) {
204 | case MDCSwipeDirectionLeft:
205 | return CGPointMake(-offset, 0);
206 | case MDCSwipeDirectionRight:
207 | return CGPointMake(offset, 0);
208 | default:
209 | [NSException raise:NSInternalInconsistencyException
210 | format:@"Invallid direction argument."];
211 | return CGPointZero;
212 | }
213 | }
214 |
215 | - (MDCSwipeDirection)mdc_directionOfExceededThreshold {
216 | if (self.center.x > self.mdc_viewState.originalCenter.x + self.mdc_options.threshold) {
217 | return MDCSwipeDirectionRight;
218 | } else if (self.center.x < self.mdc_viewState.originalCenter.x - self.mdc_options.threshold) {
219 | return MDCSwipeDirectionLeft;
220 | } else {
221 | return MDCSwipeDirectionNone;
222 | }
223 | }
224 |
225 | #pragma mark Gesture Recognizer Events
226 |
227 | - (void)mdc_onSwipeToChoosePanGestureRecognizer:(UIPanGestureRecognizer *)panGestureRecognizer {
228 | UIView *view = panGestureRecognizer.view;
229 |
230 | if (panGestureRecognizer.state == UIGestureRecognizerStateBegan) {
231 | self.mdc_viewState.originalCenter = view.center;
232 |
233 | // If the pan gesture originated at the top half of the view, rotate the view
234 | // away from the center. Otherwise, rotate towards the center.
235 | if ([panGestureRecognizer locationInView:view].y < view.center.y) {
236 | self.mdc_viewState.rotationDirection = MDCRotationAwayFromCenter;
237 | } else {
238 | self.mdc_viewState.rotationDirection = MDCRotationTowardsCenter;
239 | }
240 | } else if (panGestureRecognizer.state == UIGestureRecognizerStateEnded) {
241 | // Either move the view back to its original position or move it off screen.
242 | [self mdc_finalizePosition];
243 | } else {
244 | // Update the position and transform. Then, notify any listeners of
245 | // the updates via the pan block.
246 | CGPoint translation = [panGestureRecognizer translationInView:view];
247 | view.center = MDCCGPointAdd(self.mdc_viewState.originalCenter, translation);
248 | [self mdc_rotateForTranslation:translation
249 | rotationDirection:self.mdc_viewState.rotationDirection];
250 | [self mdc_executeOnPanBlockForTranslation:translation];
251 | }
252 | }
253 |
254 | @end
255 |
--------------------------------------------------------------------------------
/DemoOfQQMeet.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | D6EB8C381AFC668D0024E615 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = D6EB8C371AFC668D0024E615 /* main.m */; };
11 | D6EB8C3B1AFC668D0024E615 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = D6EB8C3A1AFC668D0024E615 /* AppDelegate.m */; };
12 | D6EB8C3E1AFC668D0024E615 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D6EB8C3D1AFC668D0024E615 /* ViewController.m */; };
13 | D6EB8C411AFC668D0024E615 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D6EB8C3F1AFC668D0024E615 /* Main.storyboard */; };
14 | D6EB8C431AFC668D0024E615 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D6EB8C421AFC668D0024E615 /* Images.xcassets */; };
15 | D6EB8C461AFC668D0024E615 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = D6EB8C441AFC668D0024E615 /* LaunchScreen.xib */; };
16 | D6EB8C521AFC668D0024E615 /* DemoOfQQMeetTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D6EB8C511AFC668D0024E615 /* DemoOfQQMeetTests.m */; };
17 | D6EB8C7F1AFC67230024E615 /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = D6EB8C5E1AFC67230024E615 /* LICENSE */; };
18 | D6EB8C801AFC67230024E615 /* MDCGeometry.m in Sources */ = {isa = PBXBuildFile; fileRef = D6EB8C621AFC67230024E615 /* MDCGeometry.m */; };
19 | D6EB8C811AFC67230024E615 /* MDCViewState.m in Sources */ = {isa = PBXBuildFile; fileRef = D6EB8C651AFC67230024E615 /* MDCViewState.m */; };
20 | D6EB8C821AFC67230024E615 /* UIColor+MDCRGB8Bit.m in Sources */ = {isa = PBXBuildFile; fileRef = D6EB8C671AFC67230024E615 /* UIColor+MDCRGB8Bit.m */; };
21 | D6EB8C831AFC67230024E615 /* UIView+MDCBorderedLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = D6EB8C6A1AFC67230024E615 /* UIView+MDCBorderedLabel.m */; };
22 | D6EB8C841AFC67230024E615 /* MDCSwipeOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = D6EB8C6F1AFC67230024E615 /* MDCSwipeOptions.m */; };
23 | D6EB8C851AFC67230024E615 /* MDCSwipeToChooseViewOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = D6EB8C711AFC67230024E615 /* MDCSwipeToChooseViewOptions.m */; };
24 | D6EB8C861AFC67230024E615 /* MDCPanState.m in Sources */ = {isa = PBXBuildFile; fileRef = D6EB8C741AFC67230024E615 /* MDCPanState.m */; };
25 | D6EB8C871AFC67230024E615 /* MDCSwipeResult.m in Sources */ = {isa = PBXBuildFile; fileRef = D6EB8C771AFC67230024E615 /* MDCSwipeResult.m */; };
26 | D6EB8C881AFC67230024E615 /* MDCSwipeToChooseView.m in Sources */ = {isa = PBXBuildFile; fileRef = D6EB8C7B1AFC67230024E615 /* MDCSwipeToChooseView.m */; };
27 | D6EB8C891AFC67230024E615 /* UIView+MDCSwipeToChoose.m in Sources */ = {isa = PBXBuildFile; fileRef = D6EB8C7D1AFC67230024E615 /* UIView+MDCSwipeToChoose.m */; };
28 | D6EB8C8A1AFC67230024E615 /* README.md in Sources */ = {isa = PBXBuildFile; fileRef = D6EB8C7E1AFC67230024E615 /* README.md */; };
29 | D6EB8C8E1AFC77280024E615 /* ChoosePersonView.m in Sources */ = {isa = PBXBuildFile; fileRef = D6EB8C8D1AFC77280024E615 /* ChoosePersonView.m */; };
30 | D6EB8C921AFC77800024E615 /* Person.m in Sources */ = {isa = PBXBuildFile; fileRef = D6EB8C911AFC77800024E615 /* Person.m */; };
31 | D6EB8CA01AFC89A00024E615 /* finn.png in Resources */ = {isa = PBXBuildFile; fileRef = D6EB8C941AFC89A00024E615 /* finn.png */; };
32 | D6EB8CA11AFC89A00024E615 /* finn@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D6EB8C951AFC89A00024E615 /* finn@2x.png */; };
33 | D6EB8CA21AFC89A00024E615 /* fiona.png in Resources */ = {isa = PBXBuildFile; fileRef = D6EB8C961AFC89A00024E615 /* fiona.png */; };
34 | D6EB8CA31AFC89A00024E615 /* fiona@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D6EB8C971AFC89A00024E615 /* fiona@2x.png */; };
35 | D6EB8CA41AFC89A00024E615 /* jake.png in Resources */ = {isa = PBXBuildFile; fileRef = D6EB8C981AFC89A00024E615 /* jake.png */; };
36 | D6EB8CA51AFC89A00024E615 /* jake@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D6EB8C991AFC89A00024E615 /* jake@2x.png */; };
37 | D6EB8CA61AFC89A00024E615 /* liked.png in Resources */ = {isa = PBXBuildFile; fileRef = D6EB8C9A1AFC89A00024E615 /* liked.png */; };
38 | D6EB8CA71AFC89A00024E615 /* liked@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D6EB8C9B1AFC89A00024E615 /* liked@2x.png */; };
39 | D6EB8CA81AFC89A00024E615 /* nope.png in Resources */ = {isa = PBXBuildFile; fileRef = D6EB8C9C1AFC89A00024E615 /* nope.png */; };
40 | D6EB8CA91AFC89A00024E615 /* nope@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D6EB8C9D1AFC89A00024E615 /* nope@2x.png */; };
41 | D6EB8CAA1AFC89A00024E615 /* prince.png in Resources */ = {isa = PBXBuildFile; fileRef = D6EB8C9E1AFC89A00024E615 /* prince.png */; };
42 | D6EB8CAB1AFC89A00024E615 /* prince@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D6EB8C9F1AFC89A00024E615 /* prince@2x.png */; };
43 | D6EB8CAE1AFC9FA30024E615 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D6EB8CB01AFC9FA30024E615 /* InfoPlist.strings */; };
44 | D6EB8CB21AFC9FBD0024E615 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D6EB8CB01AFC9FA30024E615 /* InfoPlist.strings */; };
45 | /* End PBXBuildFile section */
46 |
47 | /* Begin PBXContainerItemProxy section */
48 | D6EB8C4C1AFC668D0024E615 /* PBXContainerItemProxy */ = {
49 | isa = PBXContainerItemProxy;
50 | containerPortal = D6EB8C2A1AFC668D0024E615 /* Project object */;
51 | proxyType = 1;
52 | remoteGlobalIDString = D6EB8C311AFC668D0024E615;
53 | remoteInfo = DemoOfQQMeet;
54 | };
55 | /* End PBXContainerItemProxy section */
56 |
57 | /* Begin PBXFileReference section */
58 | D6EB8C321AFC668D0024E615 /* DemoOfQQMeet.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DemoOfQQMeet.app; sourceTree = BUILT_PRODUCTS_DIR; };
59 | D6EB8C361AFC668D0024E615 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
60 | D6EB8C371AFC668D0024E615 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
61 | D6EB8C391AFC668D0024E615 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
62 | D6EB8C3A1AFC668D0024E615 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
63 | D6EB8C3C1AFC668D0024E615 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
64 | D6EB8C3D1AFC668D0024E615 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
65 | D6EB8C401AFC668D0024E615 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
66 | D6EB8C421AFC668D0024E615 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
67 | D6EB8C451AFC668D0024E615 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; };
68 | D6EB8C4B1AFC668D0024E615 /* DemoOfQQMeetTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DemoOfQQMeetTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
69 | D6EB8C501AFC668D0024E615 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
70 | D6EB8C511AFC668D0024E615 /* DemoOfQQMeetTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DemoOfQQMeetTests.m; sourceTree = ""; };
71 | D6EB8C5E1AFC67230024E615 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = ""; };
72 | D6EB8C611AFC67230024E615 /* MDCGeometry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDCGeometry.h; sourceTree = ""; };
73 | D6EB8C621AFC67230024E615 /* MDCGeometry.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDCGeometry.m; sourceTree = ""; };
74 | D6EB8C641AFC67230024E615 /* MDCViewState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDCViewState.h; sourceTree = ""; };
75 | D6EB8C651AFC67230024E615 /* MDCViewState.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDCViewState.m; sourceTree = ""; };
76 | D6EB8C661AFC67230024E615 /* UIColor+MDCRGB8Bit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIColor+MDCRGB8Bit.h"; sourceTree = ""; };
77 | D6EB8C671AFC67230024E615 /* UIColor+MDCRGB8Bit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIColor+MDCRGB8Bit.m"; sourceTree = ""; };
78 | D6EB8C691AFC67230024E615 /* UIView+MDCBorderedLabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+MDCBorderedLabel.h"; sourceTree = ""; };
79 | D6EB8C6A1AFC67230024E615 /* UIView+MDCBorderedLabel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+MDCBorderedLabel.m"; sourceTree = ""; };
80 | D6EB8C6C1AFC67230024E615 /* MDCSwipeToChoose.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDCSwipeToChoose.h; sourceTree = ""; };
81 | D6EB8C6E1AFC67230024E615 /* MDCSwipeOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDCSwipeOptions.h; sourceTree = ""; };
82 | D6EB8C6F1AFC67230024E615 /* MDCSwipeOptions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDCSwipeOptions.m; sourceTree = ""; };
83 | D6EB8C701AFC67230024E615 /* MDCSwipeToChooseViewOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDCSwipeToChooseViewOptions.h; sourceTree = ""; };
84 | D6EB8C711AFC67230024E615 /* MDCSwipeToChooseViewOptions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDCSwipeToChooseViewOptions.m; sourceTree = ""; };
85 | D6EB8C731AFC67230024E615 /* MDCPanState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDCPanState.h; sourceTree = ""; };
86 | D6EB8C741AFC67230024E615 /* MDCPanState.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDCPanState.m; sourceTree = ""; };
87 | D6EB8C751AFC67230024E615 /* MDCSwipeDirection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDCSwipeDirection.h; sourceTree = ""; };
88 | D6EB8C761AFC67230024E615 /* MDCSwipeResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDCSwipeResult.h; sourceTree = ""; };
89 | D6EB8C771AFC67230024E615 /* MDCSwipeResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDCSwipeResult.m; sourceTree = ""; };
90 | D6EB8C791AFC67230024E615 /* MDCSwipeToChooseDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDCSwipeToChooseDelegate.h; sourceTree = ""; };
91 | D6EB8C7A1AFC67230024E615 /* MDCSwipeToChooseView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MDCSwipeToChooseView.h; sourceTree = ""; };
92 | D6EB8C7B1AFC67230024E615 /* MDCSwipeToChooseView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MDCSwipeToChooseView.m; sourceTree = ""; };
93 | D6EB8C7C1AFC67230024E615 /* UIView+MDCSwipeToChoose.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+MDCSwipeToChoose.h"; sourceTree = ""; };
94 | D6EB8C7D1AFC67230024E615 /* UIView+MDCSwipeToChoose.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+MDCSwipeToChoose.m"; sourceTree = ""; };
95 | D6EB8C7E1AFC67230024E615 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; };
96 | D6EB8C8C1AFC77280024E615 /* ChoosePersonView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChoosePersonView.h; sourceTree = ""; };
97 | D6EB8C8D1AFC77280024E615 /* ChoosePersonView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChoosePersonView.m; sourceTree = ""; };
98 | D6EB8C901AFC77800024E615 /* Person.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Person.h; sourceTree = ""; };
99 | D6EB8C911AFC77800024E615 /* Person.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Person.m; sourceTree = ""; };
100 | D6EB8C941AFC89A00024E615 /* finn.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = finn.png; sourceTree = ""; };
101 | D6EB8C951AFC89A00024E615 /* finn@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "finn@2x.png"; sourceTree = ""; };
102 | D6EB8C961AFC89A00024E615 /* fiona.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = fiona.png; sourceTree = ""; };
103 | D6EB8C971AFC89A00024E615 /* fiona@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "fiona@2x.png"; sourceTree = ""; };
104 | D6EB8C981AFC89A00024E615 /* jake.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = jake.png; sourceTree = ""; };
105 | D6EB8C991AFC89A00024E615 /* jake@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "jake@2x.png"; sourceTree = ""; };
106 | D6EB8C9A1AFC89A00024E615 /* liked.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = liked.png; sourceTree = ""; };
107 | D6EB8C9B1AFC89A00024E615 /* liked@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "liked@2x.png"; sourceTree = ""; };
108 | D6EB8C9C1AFC89A00024E615 /* nope.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = nope.png; sourceTree = ""; };
109 | D6EB8C9D1AFC89A00024E615 /* nope@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "nope@2x.png"; sourceTree = ""; };
110 | D6EB8C9E1AFC89A00024E615 /* prince.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = prince.png; sourceTree = ""; };
111 | D6EB8C9F1AFC89A00024E615 /* prince@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "prince@2x.png"; sourceTree = ""; };
112 | D6EB8CAF1AFC9FA30024E615 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
113 | D6EB8CB11AFC9FA70024E615 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/InfoPlist.strings; sourceTree = ""; };
114 | /* End PBXFileReference section */
115 |
116 | /* Begin PBXFrameworksBuildPhase section */
117 | D6EB8C2F1AFC668D0024E615 /* Frameworks */ = {
118 | isa = PBXFrameworksBuildPhase;
119 | buildActionMask = 2147483647;
120 | files = (
121 | );
122 | runOnlyForDeploymentPostprocessing = 0;
123 | };
124 | D6EB8C481AFC668D0024E615 /* Frameworks */ = {
125 | isa = PBXFrameworksBuildPhase;
126 | buildActionMask = 2147483647;
127 | files = (
128 | );
129 | runOnlyForDeploymentPostprocessing = 0;
130 | };
131 | /* End PBXFrameworksBuildPhase section */
132 |
133 | /* Begin PBXGroup section */
134 | D6EB8C291AFC668D0024E615 = {
135 | isa = PBXGroup;
136 | children = (
137 | D6EB8C5C1AFC670B0024E615 /* Third */,
138 | D6EB8C341AFC668D0024E615 /* DemoOfQQMeet */,
139 | D6EB8C4E1AFC668D0024E615 /* DemoOfQQMeetTests */,
140 | D6EB8C331AFC668D0024E615 /* Products */,
141 | );
142 | sourceTree = "";
143 | };
144 | D6EB8C331AFC668D0024E615 /* Products */ = {
145 | isa = PBXGroup;
146 | children = (
147 | D6EB8C321AFC668D0024E615 /* DemoOfQQMeet.app */,
148 | D6EB8C4B1AFC668D0024E615 /* DemoOfQQMeetTests.xctest */,
149 | );
150 | name = Products;
151 | sourceTree = "";
152 | };
153 | D6EB8C341AFC668D0024E615 /* DemoOfQQMeet */ = {
154 | isa = PBXGroup;
155 | children = (
156 | D6EB8C931AFC89A00024E615 /* Images */,
157 | D6EB8C8F1AFC776F0024E615 /* Model */,
158 | D6EB8C8B1AFC68960024E615 /* ChoosePersonView */,
159 | D6EB8C391AFC668D0024E615 /* AppDelegate.h */,
160 | D6EB8C3A1AFC668D0024E615 /* AppDelegate.m */,
161 | D6EB8C3C1AFC668D0024E615 /* ViewController.h */,
162 | D6EB8C3D1AFC668D0024E615 /* ViewController.m */,
163 | D6EB8C3F1AFC668D0024E615 /* Main.storyboard */,
164 | D6EB8C421AFC668D0024E615 /* Images.xcassets */,
165 | D6EB8C441AFC668D0024E615 /* LaunchScreen.xib */,
166 | D6EB8C351AFC668D0024E615 /* Supporting Files */,
167 | );
168 | path = DemoOfQQMeet;
169 | sourceTree = "";
170 | };
171 | D6EB8C351AFC668D0024E615 /* Supporting Files */ = {
172 | isa = PBXGroup;
173 | children = (
174 | D6EB8C361AFC668D0024E615 /* Info.plist */,
175 | D6EB8C371AFC668D0024E615 /* main.m */,
176 | );
177 | name = "Supporting Files";
178 | sourceTree = "";
179 | };
180 | D6EB8C4E1AFC668D0024E615 /* DemoOfQQMeetTests */ = {
181 | isa = PBXGroup;
182 | children = (
183 | D6EB8C511AFC668D0024E615 /* DemoOfQQMeetTests.m */,
184 | D6EB8C4F1AFC668D0024E615 /* Supporting Files */,
185 | );
186 | path = DemoOfQQMeetTests;
187 | sourceTree = "";
188 | };
189 | D6EB8C4F1AFC668D0024E615 /* Supporting Files */ = {
190 | isa = PBXGroup;
191 | children = (
192 | D6EB8C501AFC668D0024E615 /* Info.plist */,
193 | D6EB8CB01AFC9FA30024E615 /* InfoPlist.strings */,
194 | );
195 | name = "Supporting Files";
196 | sourceTree = "";
197 | };
198 | D6EB8C5C1AFC670B0024E615 /* Third */ = {
199 | isa = PBXGroup;
200 | children = (
201 | D6EB8C5D1AFC67230024E615 /* MDCSwipeToChoose */,
202 | );
203 | path = Third;
204 | sourceTree = "";
205 | };
206 | D6EB8C5D1AFC67230024E615 /* MDCSwipeToChoose */ = {
207 | isa = PBXGroup;
208 | children = (
209 | D6EB8C5E1AFC67230024E615 /* LICENSE */,
210 | D6EB8C5F1AFC67230024E615 /* MDCSwipeToChoose */,
211 | D6EB8C7E1AFC67230024E615 /* README.md */,
212 | );
213 | path = MDCSwipeToChoose;
214 | sourceTree = "";
215 | };
216 | D6EB8C5F1AFC67230024E615 /* MDCSwipeToChoose */ = {
217 | isa = PBXGroup;
218 | children = (
219 | D6EB8C601AFC67230024E615 /* Internal */,
220 | D6EB8C6B1AFC67230024E615 /* Public */,
221 | );
222 | path = MDCSwipeToChoose;
223 | sourceTree = "";
224 | };
225 | D6EB8C601AFC67230024E615 /* Internal */ = {
226 | isa = PBXGroup;
227 | children = (
228 | D6EB8C611AFC67230024E615 /* MDCGeometry.h */,
229 | D6EB8C621AFC67230024E615 /* MDCGeometry.m */,
230 | D6EB8C631AFC67230024E615 /* State */,
231 | D6EB8C661AFC67230024E615 /* UIColor+MDCRGB8Bit.h */,
232 | D6EB8C671AFC67230024E615 /* UIColor+MDCRGB8Bit.m */,
233 | D6EB8C681AFC67230024E615 /* Views */,
234 | );
235 | path = Internal;
236 | sourceTree = "";
237 | };
238 | D6EB8C631AFC67230024E615 /* State */ = {
239 | isa = PBXGroup;
240 | children = (
241 | D6EB8C641AFC67230024E615 /* MDCViewState.h */,
242 | D6EB8C651AFC67230024E615 /* MDCViewState.m */,
243 | );
244 | path = State;
245 | sourceTree = "";
246 | };
247 | D6EB8C681AFC67230024E615 /* Views */ = {
248 | isa = PBXGroup;
249 | children = (
250 | D6EB8C691AFC67230024E615 /* UIView+MDCBorderedLabel.h */,
251 | D6EB8C6A1AFC67230024E615 /* UIView+MDCBorderedLabel.m */,
252 | );
253 | path = Views;
254 | sourceTree = "";
255 | };
256 | D6EB8C6B1AFC67230024E615 /* Public */ = {
257 | isa = PBXGroup;
258 | children = (
259 | D6EB8C6C1AFC67230024E615 /* MDCSwipeToChoose.h */,
260 | D6EB8C6D1AFC67230024E615 /* Options */,
261 | D6EB8C721AFC67230024E615 /* State */,
262 | D6EB8C781AFC67230024E615 /* Views */,
263 | );
264 | path = Public;
265 | sourceTree = "";
266 | };
267 | D6EB8C6D1AFC67230024E615 /* Options */ = {
268 | isa = PBXGroup;
269 | children = (
270 | D6EB8C6E1AFC67230024E615 /* MDCSwipeOptions.h */,
271 | D6EB8C6F1AFC67230024E615 /* MDCSwipeOptions.m */,
272 | D6EB8C701AFC67230024E615 /* MDCSwipeToChooseViewOptions.h */,
273 | D6EB8C711AFC67230024E615 /* MDCSwipeToChooseViewOptions.m */,
274 | );
275 | path = Options;
276 | sourceTree = "";
277 | };
278 | D6EB8C721AFC67230024E615 /* State */ = {
279 | isa = PBXGroup;
280 | children = (
281 | D6EB8C731AFC67230024E615 /* MDCPanState.h */,
282 | D6EB8C741AFC67230024E615 /* MDCPanState.m */,
283 | D6EB8C751AFC67230024E615 /* MDCSwipeDirection.h */,
284 | D6EB8C761AFC67230024E615 /* MDCSwipeResult.h */,
285 | D6EB8C771AFC67230024E615 /* MDCSwipeResult.m */,
286 | );
287 | path = State;
288 | sourceTree = "";
289 | };
290 | D6EB8C781AFC67230024E615 /* Views */ = {
291 | isa = PBXGroup;
292 | children = (
293 | D6EB8C791AFC67230024E615 /* MDCSwipeToChooseDelegate.h */,
294 | D6EB8C7A1AFC67230024E615 /* MDCSwipeToChooseView.h */,
295 | D6EB8C7B1AFC67230024E615 /* MDCSwipeToChooseView.m */,
296 | D6EB8C7C1AFC67230024E615 /* UIView+MDCSwipeToChoose.h */,
297 | D6EB8C7D1AFC67230024E615 /* UIView+MDCSwipeToChoose.m */,
298 | );
299 | path = Views;
300 | sourceTree = "";
301 | };
302 | D6EB8C8B1AFC68960024E615 /* ChoosePersonView */ = {
303 | isa = PBXGroup;
304 | children = (
305 | D6EB8C8C1AFC77280024E615 /* ChoosePersonView.h */,
306 | D6EB8C8D1AFC77280024E615 /* ChoosePersonView.m */,
307 | );
308 | path = ChoosePersonView;
309 | sourceTree = "";
310 | };
311 | D6EB8C8F1AFC776F0024E615 /* Model */ = {
312 | isa = PBXGroup;
313 | children = (
314 | D6EB8C901AFC77800024E615 /* Person.h */,
315 | D6EB8C911AFC77800024E615 /* Person.m */,
316 | );
317 | path = Model;
318 | sourceTree = "";
319 | };
320 | D6EB8C931AFC89A00024E615 /* Images */ = {
321 | isa = PBXGroup;
322 | children = (
323 | D6EB8C941AFC89A00024E615 /* finn.png */,
324 | D6EB8C951AFC89A00024E615 /* finn@2x.png */,
325 | D6EB8C961AFC89A00024E615 /* fiona.png */,
326 | D6EB8C971AFC89A00024E615 /* fiona@2x.png */,
327 | D6EB8C981AFC89A00024E615 /* jake.png */,
328 | D6EB8C991AFC89A00024E615 /* jake@2x.png */,
329 | D6EB8C9A1AFC89A00024E615 /* liked.png */,
330 | D6EB8C9B1AFC89A00024E615 /* liked@2x.png */,
331 | D6EB8C9C1AFC89A00024E615 /* nope.png */,
332 | D6EB8C9D1AFC89A00024E615 /* nope@2x.png */,
333 | D6EB8C9E1AFC89A00024E615 /* prince.png */,
334 | D6EB8C9F1AFC89A00024E615 /* prince@2x.png */,
335 | );
336 | path = Images;
337 | sourceTree = "";
338 | };
339 | /* End PBXGroup section */
340 |
341 | /* Begin PBXNativeTarget section */
342 | D6EB8C311AFC668D0024E615 /* DemoOfQQMeet */ = {
343 | isa = PBXNativeTarget;
344 | buildConfigurationList = D6EB8C551AFC668D0024E615 /* Build configuration list for PBXNativeTarget "DemoOfQQMeet" */;
345 | buildPhases = (
346 | D6EB8C2E1AFC668D0024E615 /* Sources */,
347 | D6EB8C2F1AFC668D0024E615 /* Frameworks */,
348 | D6EB8C301AFC668D0024E615 /* Resources */,
349 | );
350 | buildRules = (
351 | );
352 | dependencies = (
353 | );
354 | name = DemoOfQQMeet;
355 | productName = DemoOfQQMeet;
356 | productReference = D6EB8C321AFC668D0024E615 /* DemoOfQQMeet.app */;
357 | productType = "com.apple.product-type.application";
358 | };
359 | D6EB8C4A1AFC668D0024E615 /* DemoOfQQMeetTests */ = {
360 | isa = PBXNativeTarget;
361 | buildConfigurationList = D6EB8C581AFC668D0024E615 /* Build configuration list for PBXNativeTarget "DemoOfQQMeetTests" */;
362 | buildPhases = (
363 | D6EB8C471AFC668D0024E615 /* Sources */,
364 | D6EB8C481AFC668D0024E615 /* Frameworks */,
365 | D6EB8C491AFC668D0024E615 /* Resources */,
366 | );
367 | buildRules = (
368 | );
369 | dependencies = (
370 | D6EB8C4D1AFC668D0024E615 /* PBXTargetDependency */,
371 | );
372 | name = DemoOfQQMeetTests;
373 | productName = DemoOfQQMeetTests;
374 | productReference = D6EB8C4B1AFC668D0024E615 /* DemoOfQQMeetTests.xctest */;
375 | productType = "com.apple.product-type.bundle.unit-test";
376 | };
377 | /* End PBXNativeTarget section */
378 |
379 | /* Begin PBXProject section */
380 | D6EB8C2A1AFC668D0024E615 /* Project object */ = {
381 | isa = PBXProject;
382 | attributes = {
383 | LastUpgradeCheck = 0630;
384 | ORGANIZATIONNAME = Wujunqiu;
385 | TargetAttributes = {
386 | D6EB8C311AFC668D0024E615 = {
387 | CreatedOnToolsVersion = 6.3.1;
388 | };
389 | D6EB8C4A1AFC668D0024E615 = {
390 | CreatedOnToolsVersion = 6.3.1;
391 | TestTargetID = D6EB8C311AFC668D0024E615;
392 | };
393 | };
394 | };
395 | buildConfigurationList = D6EB8C2D1AFC668D0024E615 /* Build configuration list for PBXProject "DemoOfQQMeet" */;
396 | compatibilityVersion = "Xcode 3.2";
397 | developmentRegion = English;
398 | hasScannedForEncodings = 0;
399 | knownRegions = (
400 | en,
401 | Base,
402 | );
403 | mainGroup = D6EB8C291AFC668D0024E615;
404 | productRefGroup = D6EB8C331AFC668D0024E615 /* Products */;
405 | projectDirPath = "";
406 | projectRoot = "";
407 | targets = (
408 | D6EB8C311AFC668D0024E615 /* DemoOfQQMeet */,
409 | D6EB8C4A1AFC668D0024E615 /* DemoOfQQMeetTests */,
410 | );
411 | };
412 | /* End PBXProject section */
413 |
414 | /* Begin PBXResourcesBuildPhase section */
415 | D6EB8C301AFC668D0024E615 /* Resources */ = {
416 | isa = PBXResourcesBuildPhase;
417 | buildActionMask = 2147483647;
418 | files = (
419 | D6EB8CA81AFC89A00024E615 /* nope.png in Resources */,
420 | D6EB8C411AFC668D0024E615 /* Main.storyboard in Resources */,
421 | D6EB8CA51AFC89A00024E615 /* jake@2x.png in Resources */,
422 | D6EB8CA01AFC89A00024E615 /* finn.png in Resources */,
423 | D6EB8CA41AFC89A00024E615 /* jake.png in Resources */,
424 | D6EB8CB21AFC9FBD0024E615 /* InfoPlist.strings in Resources */,
425 | D6EB8C461AFC668D0024E615 /* LaunchScreen.xib in Resources */,
426 | D6EB8CA11AFC89A00024E615 /* finn@2x.png in Resources */,
427 | D6EB8CAA1AFC89A00024E615 /* prince.png in Resources */,
428 | D6EB8CA21AFC89A00024E615 /* fiona.png in Resources */,
429 | D6EB8C7F1AFC67230024E615 /* LICENSE in Resources */,
430 | D6EB8CA61AFC89A00024E615 /* liked.png in Resources */,
431 | D6EB8CAB1AFC89A00024E615 /* prince@2x.png in Resources */,
432 | D6EB8CA31AFC89A00024E615 /* fiona@2x.png in Resources */,
433 | D6EB8CA71AFC89A00024E615 /* liked@2x.png in Resources */,
434 | D6EB8CA91AFC89A00024E615 /* nope@2x.png in Resources */,
435 | D6EB8C431AFC668D0024E615 /* Images.xcassets in Resources */,
436 | );
437 | runOnlyForDeploymentPostprocessing = 0;
438 | };
439 | D6EB8C491AFC668D0024E615 /* Resources */ = {
440 | isa = PBXResourcesBuildPhase;
441 | buildActionMask = 2147483647;
442 | files = (
443 | D6EB8CAE1AFC9FA30024E615 /* InfoPlist.strings in Resources */,
444 | );
445 | runOnlyForDeploymentPostprocessing = 0;
446 | };
447 | /* End PBXResourcesBuildPhase section */
448 |
449 | /* Begin PBXSourcesBuildPhase section */
450 | D6EB8C2E1AFC668D0024E615 /* Sources */ = {
451 | isa = PBXSourcesBuildPhase;
452 | buildActionMask = 2147483647;
453 | files = (
454 | D6EB8C851AFC67230024E615 /* MDCSwipeToChooseViewOptions.m in Sources */,
455 | D6EB8C801AFC67230024E615 /* MDCGeometry.m in Sources */,
456 | D6EB8C811AFC67230024E615 /* MDCViewState.m in Sources */,
457 | D6EB8C831AFC67230024E615 /* UIView+MDCBorderedLabel.m in Sources */,
458 | D6EB8C3E1AFC668D0024E615 /* ViewController.m in Sources */,
459 | D6EB8C841AFC67230024E615 /* MDCSwipeOptions.m in Sources */,
460 | D6EB8C821AFC67230024E615 /* UIColor+MDCRGB8Bit.m in Sources */,
461 | D6EB8C871AFC67230024E615 /* MDCSwipeResult.m in Sources */,
462 | D6EB8C8E1AFC77280024E615 /* ChoosePersonView.m in Sources */,
463 | D6EB8C881AFC67230024E615 /* MDCSwipeToChooseView.m in Sources */,
464 | D6EB8C921AFC77800024E615 /* Person.m in Sources */,
465 | D6EB8C3B1AFC668D0024E615 /* AppDelegate.m in Sources */,
466 | D6EB8C8A1AFC67230024E615 /* README.md in Sources */,
467 | D6EB8C861AFC67230024E615 /* MDCPanState.m in Sources */,
468 | D6EB8C891AFC67230024E615 /* UIView+MDCSwipeToChoose.m in Sources */,
469 | D6EB8C381AFC668D0024E615 /* main.m in Sources */,
470 | );
471 | runOnlyForDeploymentPostprocessing = 0;
472 | };
473 | D6EB8C471AFC668D0024E615 /* Sources */ = {
474 | isa = PBXSourcesBuildPhase;
475 | buildActionMask = 2147483647;
476 | files = (
477 | D6EB8C521AFC668D0024E615 /* DemoOfQQMeetTests.m in Sources */,
478 | );
479 | runOnlyForDeploymentPostprocessing = 0;
480 | };
481 | /* End PBXSourcesBuildPhase section */
482 |
483 | /* Begin PBXTargetDependency section */
484 | D6EB8C4D1AFC668D0024E615 /* PBXTargetDependency */ = {
485 | isa = PBXTargetDependency;
486 | target = D6EB8C311AFC668D0024E615 /* DemoOfQQMeet */;
487 | targetProxy = D6EB8C4C1AFC668D0024E615 /* PBXContainerItemProxy */;
488 | };
489 | /* End PBXTargetDependency section */
490 |
491 | /* Begin PBXVariantGroup section */
492 | D6EB8C3F1AFC668D0024E615 /* Main.storyboard */ = {
493 | isa = PBXVariantGroup;
494 | children = (
495 | D6EB8C401AFC668D0024E615 /* Base */,
496 | );
497 | name = Main.storyboard;
498 | sourceTree = "";
499 | };
500 | D6EB8C441AFC668D0024E615 /* LaunchScreen.xib */ = {
501 | isa = PBXVariantGroup;
502 | children = (
503 | D6EB8C451AFC668D0024E615 /* Base */,
504 | );
505 | name = LaunchScreen.xib;
506 | sourceTree = "";
507 | };
508 | D6EB8CB01AFC9FA30024E615 /* InfoPlist.strings */ = {
509 | isa = PBXVariantGroup;
510 | children = (
511 | D6EB8CAF1AFC9FA30024E615 /* en */,
512 | D6EB8CB11AFC9FA70024E615 /* Base */,
513 | );
514 | name = InfoPlist.strings;
515 | sourceTree = "";
516 | };
517 | /* End PBXVariantGroup section */
518 |
519 | /* Begin XCBuildConfiguration section */
520 | D6EB8C531AFC668D0024E615 /* Debug */ = {
521 | isa = XCBuildConfiguration;
522 | buildSettings = {
523 | ALWAYS_SEARCH_USER_PATHS = NO;
524 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
525 | CLANG_CXX_LIBRARY = "libc++";
526 | CLANG_ENABLE_MODULES = YES;
527 | CLANG_ENABLE_OBJC_ARC = YES;
528 | CLANG_WARN_BOOL_CONVERSION = YES;
529 | CLANG_WARN_CONSTANT_CONVERSION = YES;
530 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
531 | CLANG_WARN_EMPTY_BODY = YES;
532 | CLANG_WARN_ENUM_CONVERSION = YES;
533 | CLANG_WARN_INT_CONVERSION = YES;
534 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
535 | CLANG_WARN_UNREACHABLE_CODE = YES;
536 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
537 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
538 | COPY_PHASE_STRIP = NO;
539 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
540 | ENABLE_STRICT_OBJC_MSGSEND = YES;
541 | GCC_C_LANGUAGE_STANDARD = gnu99;
542 | GCC_DYNAMIC_NO_PIC = NO;
543 | GCC_NO_COMMON_BLOCKS = YES;
544 | GCC_OPTIMIZATION_LEVEL = 0;
545 | GCC_PREPROCESSOR_DEFINITIONS = (
546 | "DEBUG=1",
547 | "$(inherited)",
548 | );
549 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
550 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
551 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
552 | GCC_WARN_UNDECLARED_SELECTOR = YES;
553 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
554 | GCC_WARN_UNUSED_FUNCTION = YES;
555 | GCC_WARN_UNUSED_VARIABLE = YES;
556 | IPHONEOS_DEPLOYMENT_TARGET = 8.3;
557 | MTL_ENABLE_DEBUG_INFO = YES;
558 | ONLY_ACTIVE_ARCH = YES;
559 | SDKROOT = iphoneos;
560 | };
561 | name = Debug;
562 | };
563 | D6EB8C541AFC668D0024E615 /* Release */ = {
564 | isa = XCBuildConfiguration;
565 | buildSettings = {
566 | ALWAYS_SEARCH_USER_PATHS = NO;
567 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
568 | CLANG_CXX_LIBRARY = "libc++";
569 | CLANG_ENABLE_MODULES = YES;
570 | CLANG_ENABLE_OBJC_ARC = YES;
571 | CLANG_WARN_BOOL_CONVERSION = YES;
572 | CLANG_WARN_CONSTANT_CONVERSION = YES;
573 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
574 | CLANG_WARN_EMPTY_BODY = YES;
575 | CLANG_WARN_ENUM_CONVERSION = YES;
576 | CLANG_WARN_INT_CONVERSION = YES;
577 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
578 | CLANG_WARN_UNREACHABLE_CODE = YES;
579 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
580 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
581 | COPY_PHASE_STRIP = NO;
582 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
583 | ENABLE_NS_ASSERTIONS = NO;
584 | ENABLE_STRICT_OBJC_MSGSEND = YES;
585 | GCC_C_LANGUAGE_STANDARD = gnu99;
586 | GCC_NO_COMMON_BLOCKS = YES;
587 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
588 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
589 | GCC_WARN_UNDECLARED_SELECTOR = YES;
590 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
591 | GCC_WARN_UNUSED_FUNCTION = YES;
592 | GCC_WARN_UNUSED_VARIABLE = YES;
593 | IPHONEOS_DEPLOYMENT_TARGET = 8.3;
594 | MTL_ENABLE_DEBUG_INFO = NO;
595 | SDKROOT = iphoneos;
596 | VALIDATE_PRODUCT = YES;
597 | };
598 | name = Release;
599 | };
600 | D6EB8C561AFC668D0024E615 /* Debug */ = {
601 | isa = XCBuildConfiguration;
602 | buildSettings = {
603 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
604 | INFOPLIST_FILE = DemoOfQQMeet/Info.plist;
605 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
606 | PRODUCT_NAME = "$(TARGET_NAME)";
607 | };
608 | name = Debug;
609 | };
610 | D6EB8C571AFC668D0024E615 /* Release */ = {
611 | isa = XCBuildConfiguration;
612 | buildSettings = {
613 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
614 | INFOPLIST_FILE = DemoOfQQMeet/Info.plist;
615 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
616 | PRODUCT_NAME = "$(TARGET_NAME)";
617 | };
618 | name = Release;
619 | };
620 | D6EB8C591AFC668D0024E615 /* Debug */ = {
621 | isa = XCBuildConfiguration;
622 | buildSettings = {
623 | BUNDLE_LOADER = "$(TEST_HOST)";
624 | FRAMEWORK_SEARCH_PATHS = (
625 | "$(SDKROOT)/Developer/Library/Frameworks",
626 | "$(inherited)",
627 | );
628 | GCC_PREPROCESSOR_DEFINITIONS = (
629 | "DEBUG=1",
630 | "$(inherited)",
631 | );
632 | INFOPLIST_FILE = DemoOfQQMeetTests/Info.plist;
633 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
634 | PRODUCT_NAME = "$(TARGET_NAME)";
635 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DemoOfQQMeet.app/DemoOfQQMeet";
636 | };
637 | name = Debug;
638 | };
639 | D6EB8C5A1AFC668D0024E615 /* Release */ = {
640 | isa = XCBuildConfiguration;
641 | buildSettings = {
642 | BUNDLE_LOADER = "$(TEST_HOST)";
643 | FRAMEWORK_SEARCH_PATHS = (
644 | "$(SDKROOT)/Developer/Library/Frameworks",
645 | "$(inherited)",
646 | );
647 | INFOPLIST_FILE = DemoOfQQMeetTests/Info.plist;
648 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
649 | PRODUCT_NAME = "$(TARGET_NAME)";
650 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DemoOfQQMeet.app/DemoOfQQMeet";
651 | };
652 | name = Release;
653 | };
654 | /* End XCBuildConfiguration section */
655 |
656 | /* Begin XCConfigurationList section */
657 | D6EB8C2D1AFC668D0024E615 /* Build configuration list for PBXProject "DemoOfQQMeet" */ = {
658 | isa = XCConfigurationList;
659 | buildConfigurations = (
660 | D6EB8C531AFC668D0024E615 /* Debug */,
661 | D6EB8C541AFC668D0024E615 /* Release */,
662 | );
663 | defaultConfigurationIsVisible = 0;
664 | defaultConfigurationName = Release;
665 | };
666 | D6EB8C551AFC668D0024E615 /* Build configuration list for PBXNativeTarget "DemoOfQQMeet" */ = {
667 | isa = XCConfigurationList;
668 | buildConfigurations = (
669 | D6EB8C561AFC668D0024E615 /* Debug */,
670 | D6EB8C571AFC668D0024E615 /* Release */,
671 | );
672 | defaultConfigurationIsVisible = 0;
673 | };
674 | D6EB8C581AFC668D0024E615 /* Build configuration list for PBXNativeTarget "DemoOfQQMeetTests" */ = {
675 | isa = XCConfigurationList;
676 | buildConfigurations = (
677 | D6EB8C591AFC668D0024E615 /* Debug */,
678 | D6EB8C5A1AFC668D0024E615 /* Release */,
679 | );
680 | defaultConfigurationIsVisible = 0;
681 | };
682 | /* End XCConfigurationList section */
683 | };
684 | rootObject = D6EB8C2A1AFC668D0024E615 /* Project object */;
685 | }
686 |
--------------------------------------------------------------------------------