├── voice_curve.gif
├── KYVoiceCurve
├── KYVoiceCurve
│ ├── record.mp3
│ ├── Images.xcassets
│ │ ├── bt.imageset
│ │ │ ├── Real_Pixels.png
│ │ │ ├── Real_Pixels-1.png
│ │ │ ├── Real_Pixels-2.png
│ │ │ └── Contents.json
│ │ ├── cover.imageset
│ │ │ ├── Real_Pixels.png
│ │ │ ├── Real_Pixels-1.png
│ │ │ ├── Real_Pixels-2.png
│ │ │ └── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── main.m
│ ├── VoiceCurveView.h
│ ├── ViewController.m
│ ├── Info.plist
│ ├── AppDelegate.m
│ ├── Base.lproj
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ └── VoiceCurveView.m
├── KYVoiceCurve.xcodeproj
│ ├── xcuserdata
│ │ └── KittenYang.xcuserdatad
│ │ │ ├── xcdebugger
│ │ │ └── Breakpoints_v2.xcbkptlist
│ │ │ └── xcschemes
│ │ │ ├── xcschememanagement.plist
│ │ │ └── KYVoiceCurve.xcscheme
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── KittenYang.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── project.pbxproj
└── KYVoiceCurveTests
│ ├── Info.plist
│ └── KYVoiceCurveTests.m
└── README.md
/voice_curve.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KittenYang/KYVoiceCurve/HEAD/voice_curve.gif
--------------------------------------------------------------------------------
/KYVoiceCurve/KYVoiceCurve/record.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KittenYang/KYVoiceCurve/HEAD/KYVoiceCurve/KYVoiceCurve/record.mp3
--------------------------------------------------------------------------------
/KYVoiceCurve/KYVoiceCurve/Images.xcassets/bt.imageset/Real_Pixels.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KittenYang/KYVoiceCurve/HEAD/KYVoiceCurve/KYVoiceCurve/Images.xcassets/bt.imageset/Real_Pixels.png
--------------------------------------------------------------------------------
/KYVoiceCurve/KYVoiceCurve/Images.xcassets/bt.imageset/Real_Pixels-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KittenYang/KYVoiceCurve/HEAD/KYVoiceCurve/KYVoiceCurve/Images.xcassets/bt.imageset/Real_Pixels-1.png
--------------------------------------------------------------------------------
/KYVoiceCurve/KYVoiceCurve/Images.xcassets/bt.imageset/Real_Pixels-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KittenYang/KYVoiceCurve/HEAD/KYVoiceCurve/KYVoiceCurve/Images.xcassets/bt.imageset/Real_Pixels-2.png
--------------------------------------------------------------------------------
/KYVoiceCurve/KYVoiceCurve/Images.xcassets/cover.imageset/Real_Pixels.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KittenYang/KYVoiceCurve/HEAD/KYVoiceCurve/KYVoiceCurve/Images.xcassets/cover.imageset/Real_Pixels.png
--------------------------------------------------------------------------------
/KYVoiceCurve/KYVoiceCurve/Images.xcassets/cover.imageset/Real_Pixels-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KittenYang/KYVoiceCurve/HEAD/KYVoiceCurve/KYVoiceCurve/Images.xcassets/cover.imageset/Real_Pixels-1.png
--------------------------------------------------------------------------------
/KYVoiceCurve/KYVoiceCurve/Images.xcassets/cover.imageset/Real_Pixels-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KittenYang/KYVoiceCurve/HEAD/KYVoiceCurve/KYVoiceCurve/Images.xcassets/cover.imageset/Real_Pixels-2.png
--------------------------------------------------------------------------------
/KYVoiceCurve/KYVoiceCurve.xcodeproj/xcuserdata/KittenYang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/KYVoiceCurve/KYVoiceCurve.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/KYVoiceCurve/KYVoiceCurve.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KittenYang/KYVoiceCurve/HEAD/KYVoiceCurve/KYVoiceCurve.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/KYVoiceCurve/KYVoiceCurve/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // KYVoiceCurve
4 | //
5 | // Created by Kitten Yang on 4/5/15.
6 | // Copyright (c) 2015 Kitten Yang. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/KYVoiceCurve/KYVoiceCurve/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // KYVoiceCurve
4 | //
5 | // Created by Kitten Yang on 4/5/15.
6 | // Copyright (c) 2015 Kitten Yang. 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 |
--------------------------------------------------------------------------------
/KYVoiceCurve/KYVoiceCurve/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // KYVoiceCurve
4 | //
5 | // Created by Kitten Yang on 4/5/15.
6 | // Copyright (c) 2015 Kitten Yang. 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 |
--------------------------------------------------------------------------------
/KYVoiceCurve/KYVoiceCurve/VoiceCurveView.h:
--------------------------------------------------------------------------------
1 | //
2 | // VoiceCurveView.h
3 | // KYVoiceCurve
4 | //
5 | // Created by Kitten Yang on 4/6/15.
6 | // Copyright (c) 2015 Kitten Yang. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import
12 |
13 | @interface VoiceCurveView : UIView
14 |
15 |
16 | -(id)initWithFrame:(CGRect)frame superView:(UIView *)superView;
17 | -(void)present;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # KYVoiceCurve
2 | 类似Apple Watch中语音的声音曲线动画
3 | The animating voice curve like Apple Watch
4 |
5 |
6 | 
7 |
8 |
9 |
10 | ##Usage
11 |
12 | Firstly,
13 | ```
14 | #import "VoiceCurveView.h"
15 | ```
16 |
17 | Then,at the trigger method,like that:
18 |
19 | ```
20 | VoiceCurveView *voiceCurveView = [[VoiceCurveView alloc]initWithFrame:self.view.frame superView:self.view];
21 | [voiceCurveView present];
22 | ```
23 |
24 |
25 | ##License
26 |
27 | MIT License
28 |
--------------------------------------------------------------------------------
/KYVoiceCurve/KYVoiceCurve/Images.xcassets/bt.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "Real_Pixels.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x",
11 | "filename" : "Real_Pixels-1.png"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x",
16 | "filename" : "Real_Pixels-2.png"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/KYVoiceCurve/KYVoiceCurve/Images.xcassets/cover.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "Real_Pixels-1.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x",
11 | "filename" : "Real_Pixels.png"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x",
16 | "filename" : "Real_Pixels-2.png"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/KYVoiceCurve/KYVoiceCurve.xcodeproj/xcuserdata/KittenYang.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | KYVoiceCurve.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 5FCD1F3C1AD18C22000082C2
16 |
17 | primary
18 |
19 |
20 | 5FCD1F551AD18C23000082C2
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/KYVoiceCurve/KYVoiceCurveTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.$(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 |
--------------------------------------------------------------------------------
/KYVoiceCurve/KYVoiceCurveTests/KYVoiceCurveTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // KYVoiceCurveTests.m
3 | // KYVoiceCurveTests
4 | //
5 | // Created by Kitten Yang on 4/5/15.
6 | // Copyright (c) 2015 Kitten Yang. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface KYVoiceCurveTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation KYVoiceCurveTests
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 |
--------------------------------------------------------------------------------
/KYVoiceCurve/KYVoiceCurve/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 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/KYVoiceCurve/KYVoiceCurve/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // KYVoiceCurve
4 | //
5 | // Created by Kitten Yang on 4/5/15.
6 | // Copyright (c) 2015 Kitten Yang. All rights reserved.
7 | //
8 |
9 |
10 |
11 | #import "ViewController.h"
12 | #import "VoiceCurveView.h"
13 |
14 |
15 | @interface ViewController ()
16 | @property (strong, nonatomic) IBOutlet UIButton *longPressBt;
17 |
18 | @end
19 |
20 | @implementation ViewController
21 |
22 | - (void)viewDidLoad {
23 | [super viewDidLoad];
24 | UILongPressGestureRecognizer *longGes = [[UILongPressGestureRecognizer alloc]initWithTarget:self action:@selector(longPress:)];
25 | longGes.minimumPressDuration = 0.8;
26 | [self.longPressBt addGestureRecognizer:longGes];
27 | }
28 |
29 | - (void)didReceiveMemoryWarning {
30 | [super didReceiveMemoryWarning];
31 |
32 | }
33 |
34 | -(void)longPress:(UILongPressGestureRecognizer *)longGes{
35 | if (longGes.state == UIGestureRecognizerStateBegan) {
36 |
37 | NSString *path = [[NSBundle mainBundle] pathForResource:@"record" ofType:@"mp3"];
38 | NSURL *url = [NSURL fileURLWithPath:path];
39 | SystemSoundID soundId;
40 | AudioServicesCreateSystemSoundID((CFURLRef)CFBridgingRetain(url), &soundId);
41 | AudioServicesPlaySystemSound(soundId);
42 |
43 | VoiceCurveView *voiceCurveView = [[VoiceCurveView alloc]initWithFrame:self.view.frame superView:self.view];
44 | [voiceCurveView present];
45 | }
46 | }
47 |
48 |
49 | @end
50 |
--------------------------------------------------------------------------------
/KYVoiceCurve/KYVoiceCurve/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.$(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 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/KYVoiceCurve/KYVoiceCurve/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // KYVoiceCurve
4 | //
5 | // Created by Kitten Yang on 4/5/15.
6 | // Copyright (c) 2015 Kitten Yang. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19 | // Override point for customization after application launch.
20 | return YES;
21 | }
22 |
23 | - (void)applicationWillResignActive:(UIApplication *)application {
24 | // 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.
25 | // 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.
26 | }
27 |
28 | - (void)applicationDidEnterBackground:(UIApplication *)application {
29 | // 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.
30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
31 | }
32 |
33 | - (void)applicationWillEnterForeground:(UIApplication *)application {
34 | // 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.
35 | }
36 |
37 | - (void)applicationDidBecomeActive:(UIApplication *)application {
38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
39 | }
40 |
41 | - (void)applicationWillTerminate:(UIApplication *)application {
42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
43 | }
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/KYVoiceCurve/KYVoiceCurve/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 |
--------------------------------------------------------------------------------
/KYVoiceCurve/KYVoiceCurve/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 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/KYVoiceCurve/KYVoiceCurve.xcodeproj/xcuserdata/KittenYang.xcuserdatad/xcschemes/KYVoiceCurve.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 |
--------------------------------------------------------------------------------
/KYVoiceCurve/KYVoiceCurve/VoiceCurveView.m:
--------------------------------------------------------------------------------
1 | //
2 | // VoiceCurveView.m
3 | // KYVoiceCurve
4 | //
5 | // Created by Kitten Yang on 4/6/15.
6 | // Copyright (c) 2015 Kitten Yang. All rights reserved.
7 | //
8 |
9 |
10 | #define ScreenWidth [UIScreen mainScreen].bounds.size.width
11 | #define ScreenHeight [UIScreen mainScreen].bounds.size.height
12 |
13 | #import "VoiceCurveView.h"
14 |
15 | @interface VoiceCurveView()
16 |
17 | @property(readwrite, nonatomic, strong) AVAudioRecorder *recorder;
18 | @property(readwrite, nonatomic, strong) NSDictionary *recordSettings;
19 | @property(nonatomic,strong)CADisplayLink *displayLink;
20 |
21 | @end
22 |
23 | @implementation VoiceCurveView{
24 |
25 | UIVisualEffectView *blurView;
26 | UIView *SUPERVIEW;
27 |
28 | CAShapeLayer *layer1;
29 | CAShapeLayer *layer2;
30 | CAShapeLayer *layer3;
31 | CAShapeLayer *layer4;
32 | CAShapeLayer *layer5;
33 | }
34 |
35 |
36 |
37 | -(id)initWithFrame:(CGRect)frame superView:(UIView *)superView{
38 | self = [super initWithFrame:frame];
39 | if (self) {
40 | SUPERVIEW = superView;
41 | [self setUp];
42 | [superView addSubview:self];
43 | }
44 |
45 | return self;
46 | }
47 |
48 | -(void)setUp{
49 |
50 | [self setAudioProperties];
51 |
52 | self.backgroundColor = [UIColor clearColor];
53 |
54 | blurView = [[UIVisualEffectView alloc]initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleDark]];
55 | blurView.frame = self.frame;
56 | UIGestureRecognizer *tapGes = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(dismiss)];
57 | [blurView addGestureRecognizer:tapGes];
58 | blurView.alpha = 0.0f;
59 | blurView.tag = 101;
60 |
61 | [self addSubview:blurView];
62 |
63 | //layer1
64 | layer1 = [CAShapeLayer layer];
65 | layer1.fillColor = [UIColor yellowColor].CGColor;
66 | layer1.opacity = 0.7;
67 | [blurView.layer addSublayer:layer1];
68 |
69 | //layer2
70 | layer2 = [CAShapeLayer layer];
71 | layer2.fillColor = [UIColor magentaColor].CGColor;
72 | layer2.opacity = 0.7;
73 | [blurView.layer addSublayer:layer2];
74 |
75 | //layer3
76 | layer3 = [CAShapeLayer layer];
77 | layer3.fillColor = [UIColor orangeColor].CGColor;
78 | layer3.opacity = 0.7;
79 | [blurView.layer addSublayer:layer3];
80 |
81 | //layer4
82 | layer4 = [CAShapeLayer layer];
83 | layer4.fillColor = [UIColor redColor].CGColor;
84 | layer4.opacity = 0.7;
85 | [blurView.layer addSublayer:layer4];
86 |
87 | //layer5
88 | layer5 = [CAShapeLayer layer];
89 | layer5.fillColor = [UIColor colorWithRed:0 green:0.722 blue:1 alpha:1].CGColor;
90 | layer5.opacity = 0.7;
91 | [blurView.layer addSublayer:layer5];
92 |
93 |
94 | //the label -- 正在聆听
95 | // UIVibrancyEffect *vibrancy = [UIVibrancyEffect effectForBlurEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleDark]];
96 | // UIVisualEffectView *vibrancyView = [[UIVisualEffectView alloc]initWithEffect:vibrancy];
97 | // vibrancyView.frame = blurView.bounds;
98 |
99 | UILabel *listeningLabel = [[UILabel alloc]init];
100 | listeningLabel.frame = CGRectMake(ScreenWidth/2 - 320/2, 100, 320, 30);
101 | listeningLabel.textAlignment = NSTextAlignmentCenter;
102 | listeningLabel.font = [UIFont systemFontOfSize:30.0f];
103 | listeningLabel.textColor = [UIColor whiteColor];
104 | listeningLabel.text = @"正在聆听...";
105 | [blurView.contentView addSubview:listeningLabel];
106 |
107 | // [vibrancyView.contentView addSubview:listeningLabel];
108 | // [blurView.contentView addSubview:vibrancyView];
109 |
110 | }
111 |
112 | //---------配置AVAudioRecorder的一些音频采样参数-------------
113 | - (void)setAudioProperties{
114 |
115 | self.recordSettings = @{AVFormatIDKey : @(kAudioFormatLinearPCM),
116 | AVEncoderBitRateKey:@(16),
117 | AVEncoderAudioQualityKey : @(AVAudioQualityMax),
118 | AVSampleRateKey : @(8000.0),
119 | AVNumberOfChannelsKey : @(1)
120 | };
121 |
122 | if (self.recorder.isRecording) {
123 | return;
124 | }
125 |
126 | AVAudioSession *audioSession = [AVAudioSession sharedInstance];
127 | NSError *err;
128 | [audioSession setCategory :AVAudioSessionCategoryPlayAndRecord error:&err];
129 | if(err){
130 | NSLog(@"audioSession: %@ %ld %@", [err domain], (long)[err code], [[err userInfo] description]);
131 | return;
132 | }
133 | [audioSession setActive:YES error:&err];
134 | err = nil;
135 | if(err){
136 | NSLog(@"audioSession: %@ %ld %@", [err domain], (long)[err code], [[err userInfo] description]);
137 | return;
138 | }
139 |
140 | NSURL *url = [NSURL fileURLWithPath:[self fullPathAtCache:@"record.wav"]];
141 | NSDate *existedData = (NSDate *)[NSData dataWithContentsOfFile:[url path] options:NSDataReadingMapped error:&err];
142 | if (existedData) {
143 | NSFileManager *fm = [NSFileManager defaultManager];
144 | [fm removeItemAtPath:[url path] error:&err];
145 | }
146 |
147 | self.recorder = [[AVAudioRecorder alloc] initWithURL:url settings:self.recordSettings error:&err];
148 | self.recorder.meteringEnabled = YES;
149 | [self.recorder setDelegate:self];
150 | [self.recorder record];
151 | [self.recorder prepareToRecord];
152 |
153 |
154 | self.displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(drawRealTimeCurve:)];
155 | [self.displayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes];
156 | }
157 |
158 | - (NSString *)fullPathAtCache:(NSString *)fileName{
159 | NSError *error;
160 | NSString *path = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES)objectAtIndex:0];
161 | NSFileManager *fm = [NSFileManager defaultManager];
162 | if (YES != [fm fileExistsAtPath:path]) {
163 | if (YES != [fm createDirectoryAtPath:path withIntermediateDirectories:YES attributes:nil error:&error]) {
164 | NSLog(@"create dir path=%@, error=%@", path, error);
165 | }
166 | }
167 | return [path stringByAppendingPathComponent:fileName];
168 | }
169 |
170 | -(void)drawRealTimeCurve:(CADisplayLink *)dis{
171 | [self.recorder updateMeters];
172 |
173 | NSLog(@"volume:%f",[self.recorder averagePowerForChannel:0]);
174 |
175 | //------重绘函数-------
176 | CGFloat volume = [self.recorder averagePowerForChannel:0];
177 | CGFloat controlY1 = ScreenHeight - (volume+60);
178 | CGFloat controlY2 = ScreenHeight - ((volume+60)+10)*1.5;
179 | CGFloat controlY3 = ScreenHeight - ((volume+60)+15)*2.3;
180 | CGFloat controlY4 = ScreenHeight - ((volume+60)+12)*2;
181 | CGFloat controlY5 = ScreenHeight - ((volume+60)+5)*1.5;
182 |
183 | layer1.path = [self createBezierPathWithStartPoint:CGPointMake(30, ScreenHeight) endPoint:CGPointMake(ScreenWidth/2-10, ScreenHeight) controlPoint:CGPointMake((ScreenWidth/2-10-30)/2+30, controlY1)].CGPath;
184 |
185 | layer2.path = [self createBezierPathWithStartPoint:CGPointMake(50, ScreenHeight) endPoint:CGPointMake(ScreenWidth*5/8, ScreenHeight) controlPoint:CGPointMake((ScreenWidth*5/8-50)/2+35,controlY2)].CGPath;
186 |
187 | layer3.path = [self createBezierPathWithStartPoint:CGPointMake((ScreenWidth/2-10-30)/2+30, ScreenHeight) endPoint:CGPointMake((ScreenWidth-20-ScreenWidth*5/8)/2+ScreenWidth*5/8-20, ScreenHeight) controlPoint:CGPointMake(((ScreenWidth-20-ScreenWidth*5/8)/2+ScreenWidth*5/8-20-((ScreenWidth/2-10-30)/2+30))/2+(ScreenWidth/2-10-30)/2+30,controlY3)].CGPath;
188 |
189 | layer4.path = [self createBezierPathWithStartPoint:CGPointMake(ScreenWidth/2-20, ScreenHeight) endPoint:CGPointMake(ScreenWidth*7/8, ScreenHeight) controlPoint:CGPointMake((ScreenWidth*7/8-ScreenWidth/2+20)/2+ScreenWidth/2-20, controlY4)].CGPath;
190 |
191 | layer5.path = [self createBezierPathWithStartPoint:CGPointMake(ScreenWidth*5/8-20, ScreenHeight) endPoint:CGPointMake(ScreenWidth-20, ScreenHeight) controlPoint:CGPointMake((ScreenWidth-20-(ScreenWidth*5/8-20))/2+ScreenWidth*5/8-20, controlY5)].CGPath;
192 |
193 | }
194 |
195 |
196 | //-------------根据返回音量返回实时的曲线----------------------
197 | -(UIBezierPath*)createBezierPathWithStartPoint:(CGPoint)startPoint endPoint:(CGPoint)endPoint controlPoint:(CGPoint)controlPoint{
198 |
199 | UIBezierPath* BezierPath = [UIBezierPath bezierPath];
200 | [BezierPath moveToPoint: startPoint];
201 | [BezierPath addQuadCurveToPoint:endPoint controlPoint:controlPoint];
202 | return BezierPath;
203 | }
204 |
205 |
206 |
207 | -(void)present{
208 |
209 | [UIView animateWithDuration:0.8f delay:0.0f usingSpringWithDamping:0.6f initialSpringVelocity:0.0f options:UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionAllowUserInteraction | UIViewAnimationOptionCurveEaseInOut animations:^{
210 | UIView *bv = [SUPERVIEW viewWithTag:101];
211 | bv.alpha = 1.0f;
212 | } completion:nil];
213 |
214 | }
215 |
216 | -(void)dismiss{
217 |
218 | [UIView animateWithDuration:0.3f delay:0.0f options:UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionAllowUserInteraction | UIViewAnimationOptionCurveEaseInOut animations:^{
219 | UIView *bv = [SUPERVIEW viewWithTag:101];
220 | bv.alpha = 0.0f;
221 | } completion:^(BOOL finished) {
222 | [self removeFromSuperview];
223 | [self.displayLink invalidate];
224 | self.displayLink = nil;
225 | }];
226 | }
227 |
228 |
229 |
230 | @end
231 |
--------------------------------------------------------------------------------
/KYVoiceCurve/KYVoiceCurve.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 5FCD1F431AD18C23000082C2 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FCD1F421AD18C23000082C2 /* main.m */; };
11 | 5FCD1F461AD18C23000082C2 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FCD1F451AD18C23000082C2 /* AppDelegate.m */; };
12 | 5FCD1F491AD18C23000082C2 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FCD1F481AD18C23000082C2 /* ViewController.m */; };
13 | 5FCD1F4C1AD18C23000082C2 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5FCD1F4A1AD18C23000082C2 /* Main.storyboard */; };
14 | 5FCD1F4E1AD18C23000082C2 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5FCD1F4D1AD18C23000082C2 /* Images.xcassets */; };
15 | 5FCD1F511AD18C23000082C2 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5FCD1F4F1AD18C23000082C2 /* LaunchScreen.xib */; };
16 | 5FCD1F5D1AD18C23000082C2 /* KYVoiceCurveTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FCD1F5C1AD18C23000082C2 /* KYVoiceCurveTests.m */; };
17 | 5FCD1F681AD1AD84000082C2 /* VoiceCurveView.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FCD1F671AD1AD84000082C2 /* VoiceCurveView.m */; };
18 | 5FCD1F6B1AD27AE3000082C2 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5FCD1F6A1AD27AE3000082C2 /* AVFoundation.framework */; };
19 | 5FCD1F6D1AD2FD7B000082C2 /* record.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 5FCD1F6C1AD2FD7B000082C2 /* record.mp3 */; };
20 | /* End PBXBuildFile section */
21 |
22 | /* Begin PBXContainerItemProxy section */
23 | 5FCD1F571AD18C23000082C2 /* PBXContainerItemProxy */ = {
24 | isa = PBXContainerItemProxy;
25 | containerPortal = 5FCD1F351AD18C22000082C2 /* Project object */;
26 | proxyType = 1;
27 | remoteGlobalIDString = 5FCD1F3C1AD18C22000082C2;
28 | remoteInfo = KYVoiceCurve;
29 | };
30 | /* End PBXContainerItemProxy section */
31 |
32 | /* Begin PBXFileReference section */
33 | 5FCD1F3D1AD18C23000082C2 /* KYVoiceCurve.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = KYVoiceCurve.app; sourceTree = BUILT_PRODUCTS_DIR; };
34 | 5FCD1F411AD18C23000082C2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
35 | 5FCD1F421AD18C23000082C2 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
36 | 5FCD1F441AD18C23000082C2 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
37 | 5FCD1F451AD18C23000082C2 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
38 | 5FCD1F471AD18C23000082C2 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
39 | 5FCD1F481AD18C23000082C2 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
40 | 5FCD1F4B1AD18C23000082C2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
41 | 5FCD1F4D1AD18C23000082C2 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
42 | 5FCD1F501AD18C23000082C2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; };
43 | 5FCD1F561AD18C23000082C2 /* KYVoiceCurveTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = KYVoiceCurveTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
44 | 5FCD1F5B1AD18C23000082C2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
45 | 5FCD1F5C1AD18C23000082C2 /* KYVoiceCurveTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KYVoiceCurveTests.m; sourceTree = ""; };
46 | 5FCD1F661AD1AD84000082C2 /* VoiceCurveView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VoiceCurveView.h; sourceTree = ""; };
47 | 5FCD1F671AD1AD84000082C2 /* VoiceCurveView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VoiceCurveView.m; sourceTree = ""; };
48 | 5FCD1F6A1AD27AE3000082C2 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
49 | 5FCD1F6C1AD2FD7B000082C2 /* record.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = record.mp3; sourceTree = ""; };
50 | /* End PBXFileReference section */
51 |
52 | /* Begin PBXFrameworksBuildPhase section */
53 | 5FCD1F3A1AD18C22000082C2 /* Frameworks */ = {
54 | isa = PBXFrameworksBuildPhase;
55 | buildActionMask = 2147483647;
56 | files = (
57 | 5FCD1F6B1AD27AE3000082C2 /* AVFoundation.framework in Frameworks */,
58 | );
59 | runOnlyForDeploymentPostprocessing = 0;
60 | };
61 | 5FCD1F531AD18C23000082C2 /* Frameworks */ = {
62 | isa = PBXFrameworksBuildPhase;
63 | buildActionMask = 2147483647;
64 | files = (
65 | );
66 | runOnlyForDeploymentPostprocessing = 0;
67 | };
68 | /* End PBXFrameworksBuildPhase section */
69 |
70 | /* Begin PBXGroup section */
71 | 5FCD1F341AD18C22000082C2 = {
72 | isa = PBXGroup;
73 | children = (
74 | 5FCD1F6A1AD27AE3000082C2 /* AVFoundation.framework */,
75 | 5FCD1F3F1AD18C23000082C2 /* KYVoiceCurve */,
76 | 5FCD1F591AD18C23000082C2 /* KYVoiceCurveTests */,
77 | 5FCD1F3E1AD18C23000082C2 /* Products */,
78 | );
79 | sourceTree = "";
80 | };
81 | 5FCD1F3E1AD18C23000082C2 /* Products */ = {
82 | isa = PBXGroup;
83 | children = (
84 | 5FCD1F3D1AD18C23000082C2 /* KYVoiceCurve.app */,
85 | 5FCD1F561AD18C23000082C2 /* KYVoiceCurveTests.xctest */,
86 | );
87 | name = Products;
88 | sourceTree = "";
89 | };
90 | 5FCD1F3F1AD18C23000082C2 /* KYVoiceCurve */ = {
91 | isa = PBXGroup;
92 | children = (
93 | 5FCD1F441AD18C23000082C2 /* AppDelegate.h */,
94 | 5FCD1F451AD18C23000082C2 /* AppDelegate.m */,
95 | 5FCD1F471AD18C23000082C2 /* ViewController.h */,
96 | 5FCD1F481AD18C23000082C2 /* ViewController.m */,
97 | 5FCD1F4A1AD18C23000082C2 /* Main.storyboard */,
98 | 5FCD1F691AD1AD8C000082C2 /* VoiceCurveView */,
99 | 5FCD1F4D1AD18C23000082C2 /* Images.xcassets */,
100 | 5FCD1F4F1AD18C23000082C2 /* LaunchScreen.xib */,
101 | 5FCD1F6C1AD2FD7B000082C2 /* record.mp3 */,
102 | 5FCD1F401AD18C23000082C2 /* Supporting Files */,
103 | );
104 | path = KYVoiceCurve;
105 | sourceTree = "";
106 | };
107 | 5FCD1F401AD18C23000082C2 /* Supporting Files */ = {
108 | isa = PBXGroup;
109 | children = (
110 | 5FCD1F411AD18C23000082C2 /* Info.plist */,
111 | 5FCD1F421AD18C23000082C2 /* main.m */,
112 | );
113 | name = "Supporting Files";
114 | sourceTree = "";
115 | };
116 | 5FCD1F591AD18C23000082C2 /* KYVoiceCurveTests */ = {
117 | isa = PBXGroup;
118 | children = (
119 | 5FCD1F5C1AD18C23000082C2 /* KYVoiceCurveTests.m */,
120 | 5FCD1F5A1AD18C23000082C2 /* Supporting Files */,
121 | );
122 | path = KYVoiceCurveTests;
123 | sourceTree = "";
124 | };
125 | 5FCD1F5A1AD18C23000082C2 /* Supporting Files */ = {
126 | isa = PBXGroup;
127 | children = (
128 | 5FCD1F5B1AD18C23000082C2 /* Info.plist */,
129 | );
130 | name = "Supporting Files";
131 | sourceTree = "";
132 | };
133 | 5FCD1F691AD1AD8C000082C2 /* VoiceCurveView */ = {
134 | isa = PBXGroup;
135 | children = (
136 | 5FCD1F661AD1AD84000082C2 /* VoiceCurveView.h */,
137 | 5FCD1F671AD1AD84000082C2 /* VoiceCurveView.m */,
138 | );
139 | name = VoiceCurveView;
140 | sourceTree = "";
141 | };
142 | /* End PBXGroup section */
143 |
144 | /* Begin PBXNativeTarget section */
145 | 5FCD1F3C1AD18C22000082C2 /* KYVoiceCurve */ = {
146 | isa = PBXNativeTarget;
147 | buildConfigurationList = 5FCD1F601AD18C23000082C2 /* Build configuration list for PBXNativeTarget "KYVoiceCurve" */;
148 | buildPhases = (
149 | 5FCD1F391AD18C22000082C2 /* Sources */,
150 | 5FCD1F3A1AD18C22000082C2 /* Frameworks */,
151 | 5FCD1F3B1AD18C22000082C2 /* Resources */,
152 | );
153 | buildRules = (
154 | );
155 | dependencies = (
156 | );
157 | name = KYVoiceCurve;
158 | productName = KYVoiceCurve;
159 | productReference = 5FCD1F3D1AD18C23000082C2 /* KYVoiceCurve.app */;
160 | productType = "com.apple.product-type.application";
161 | };
162 | 5FCD1F551AD18C23000082C2 /* KYVoiceCurveTests */ = {
163 | isa = PBXNativeTarget;
164 | buildConfigurationList = 5FCD1F631AD18C23000082C2 /* Build configuration list for PBXNativeTarget "KYVoiceCurveTests" */;
165 | buildPhases = (
166 | 5FCD1F521AD18C23000082C2 /* Sources */,
167 | 5FCD1F531AD18C23000082C2 /* Frameworks */,
168 | 5FCD1F541AD18C23000082C2 /* Resources */,
169 | );
170 | buildRules = (
171 | );
172 | dependencies = (
173 | 5FCD1F581AD18C23000082C2 /* PBXTargetDependency */,
174 | );
175 | name = KYVoiceCurveTests;
176 | productName = KYVoiceCurveTests;
177 | productReference = 5FCD1F561AD18C23000082C2 /* KYVoiceCurveTests.xctest */;
178 | productType = "com.apple.product-type.bundle.unit-test";
179 | };
180 | /* End PBXNativeTarget section */
181 |
182 | /* Begin PBXProject section */
183 | 5FCD1F351AD18C22000082C2 /* Project object */ = {
184 | isa = PBXProject;
185 | attributes = {
186 | LastUpgradeCheck = 0620;
187 | ORGANIZATIONNAME = "Kitten Yang";
188 | TargetAttributes = {
189 | 5FCD1F3C1AD18C22000082C2 = {
190 | CreatedOnToolsVersion = 6.2;
191 | };
192 | 5FCD1F551AD18C23000082C2 = {
193 | CreatedOnToolsVersion = 6.2;
194 | TestTargetID = 5FCD1F3C1AD18C22000082C2;
195 | };
196 | };
197 | };
198 | buildConfigurationList = 5FCD1F381AD18C22000082C2 /* Build configuration list for PBXProject "KYVoiceCurve" */;
199 | compatibilityVersion = "Xcode 3.2";
200 | developmentRegion = English;
201 | hasScannedForEncodings = 0;
202 | knownRegions = (
203 | en,
204 | Base,
205 | );
206 | mainGroup = 5FCD1F341AD18C22000082C2;
207 | productRefGroup = 5FCD1F3E1AD18C23000082C2 /* Products */;
208 | projectDirPath = "";
209 | projectRoot = "";
210 | targets = (
211 | 5FCD1F3C1AD18C22000082C2 /* KYVoiceCurve */,
212 | 5FCD1F551AD18C23000082C2 /* KYVoiceCurveTests */,
213 | );
214 | };
215 | /* End PBXProject section */
216 |
217 | /* Begin PBXResourcesBuildPhase section */
218 | 5FCD1F3B1AD18C22000082C2 /* Resources */ = {
219 | isa = PBXResourcesBuildPhase;
220 | buildActionMask = 2147483647;
221 | files = (
222 | 5FCD1F4C1AD18C23000082C2 /* Main.storyboard in Resources */,
223 | 5FCD1F511AD18C23000082C2 /* LaunchScreen.xib in Resources */,
224 | 5FCD1F4E1AD18C23000082C2 /* Images.xcassets in Resources */,
225 | 5FCD1F6D1AD2FD7B000082C2 /* record.mp3 in Resources */,
226 | );
227 | runOnlyForDeploymentPostprocessing = 0;
228 | };
229 | 5FCD1F541AD18C23000082C2 /* Resources */ = {
230 | isa = PBXResourcesBuildPhase;
231 | buildActionMask = 2147483647;
232 | files = (
233 | );
234 | runOnlyForDeploymentPostprocessing = 0;
235 | };
236 | /* End PBXResourcesBuildPhase section */
237 |
238 | /* Begin PBXSourcesBuildPhase section */
239 | 5FCD1F391AD18C22000082C2 /* Sources */ = {
240 | isa = PBXSourcesBuildPhase;
241 | buildActionMask = 2147483647;
242 | files = (
243 | 5FCD1F491AD18C23000082C2 /* ViewController.m in Sources */,
244 | 5FCD1F681AD1AD84000082C2 /* VoiceCurveView.m in Sources */,
245 | 5FCD1F461AD18C23000082C2 /* AppDelegate.m in Sources */,
246 | 5FCD1F431AD18C23000082C2 /* main.m in Sources */,
247 | );
248 | runOnlyForDeploymentPostprocessing = 0;
249 | };
250 | 5FCD1F521AD18C23000082C2 /* Sources */ = {
251 | isa = PBXSourcesBuildPhase;
252 | buildActionMask = 2147483647;
253 | files = (
254 | 5FCD1F5D1AD18C23000082C2 /* KYVoiceCurveTests.m in Sources */,
255 | );
256 | runOnlyForDeploymentPostprocessing = 0;
257 | };
258 | /* End PBXSourcesBuildPhase section */
259 |
260 | /* Begin PBXTargetDependency section */
261 | 5FCD1F581AD18C23000082C2 /* PBXTargetDependency */ = {
262 | isa = PBXTargetDependency;
263 | target = 5FCD1F3C1AD18C22000082C2 /* KYVoiceCurve */;
264 | targetProxy = 5FCD1F571AD18C23000082C2 /* PBXContainerItemProxy */;
265 | };
266 | /* End PBXTargetDependency section */
267 |
268 | /* Begin PBXVariantGroup section */
269 | 5FCD1F4A1AD18C23000082C2 /* Main.storyboard */ = {
270 | isa = PBXVariantGroup;
271 | children = (
272 | 5FCD1F4B1AD18C23000082C2 /* Base */,
273 | );
274 | name = Main.storyboard;
275 | sourceTree = "";
276 | };
277 | 5FCD1F4F1AD18C23000082C2 /* LaunchScreen.xib */ = {
278 | isa = PBXVariantGroup;
279 | children = (
280 | 5FCD1F501AD18C23000082C2 /* Base */,
281 | );
282 | name = LaunchScreen.xib;
283 | sourceTree = "";
284 | };
285 | /* End PBXVariantGroup section */
286 |
287 | /* Begin XCBuildConfiguration section */
288 | 5FCD1F5E1AD18C23000082C2 /* Debug */ = {
289 | isa = XCBuildConfiguration;
290 | buildSettings = {
291 | ALWAYS_SEARCH_USER_PATHS = NO;
292 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
293 | CLANG_CXX_LIBRARY = "libc++";
294 | CLANG_ENABLE_MODULES = YES;
295 | CLANG_ENABLE_OBJC_ARC = YES;
296 | CLANG_WARN_BOOL_CONVERSION = YES;
297 | CLANG_WARN_CONSTANT_CONVERSION = YES;
298 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
299 | CLANG_WARN_EMPTY_BODY = YES;
300 | CLANG_WARN_ENUM_CONVERSION = YES;
301 | CLANG_WARN_INT_CONVERSION = YES;
302 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
303 | CLANG_WARN_UNREACHABLE_CODE = YES;
304 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
305 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
306 | COPY_PHASE_STRIP = NO;
307 | ENABLE_STRICT_OBJC_MSGSEND = YES;
308 | GCC_C_LANGUAGE_STANDARD = gnu99;
309 | GCC_DYNAMIC_NO_PIC = NO;
310 | GCC_OPTIMIZATION_LEVEL = 0;
311 | GCC_PREPROCESSOR_DEFINITIONS = (
312 | "DEBUG=1",
313 | "$(inherited)",
314 | );
315 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
316 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
317 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
318 | GCC_WARN_UNDECLARED_SELECTOR = YES;
319 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
320 | GCC_WARN_UNUSED_FUNCTION = YES;
321 | GCC_WARN_UNUSED_VARIABLE = YES;
322 | IPHONEOS_DEPLOYMENT_TARGET = 8.2;
323 | MTL_ENABLE_DEBUG_INFO = YES;
324 | ONLY_ACTIVE_ARCH = YES;
325 | SDKROOT = iphoneos;
326 | TARGETED_DEVICE_FAMILY = "1,2";
327 | };
328 | name = Debug;
329 | };
330 | 5FCD1F5F1AD18C23000082C2 /* Release */ = {
331 | isa = XCBuildConfiguration;
332 | buildSettings = {
333 | ALWAYS_SEARCH_USER_PATHS = NO;
334 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
335 | CLANG_CXX_LIBRARY = "libc++";
336 | CLANG_ENABLE_MODULES = YES;
337 | CLANG_ENABLE_OBJC_ARC = YES;
338 | CLANG_WARN_BOOL_CONVERSION = YES;
339 | CLANG_WARN_CONSTANT_CONVERSION = YES;
340 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
341 | CLANG_WARN_EMPTY_BODY = YES;
342 | CLANG_WARN_ENUM_CONVERSION = YES;
343 | CLANG_WARN_INT_CONVERSION = YES;
344 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
345 | CLANG_WARN_UNREACHABLE_CODE = YES;
346 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
347 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
348 | COPY_PHASE_STRIP = NO;
349 | ENABLE_NS_ASSERTIONS = NO;
350 | ENABLE_STRICT_OBJC_MSGSEND = YES;
351 | GCC_C_LANGUAGE_STANDARD = gnu99;
352 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
353 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
354 | GCC_WARN_UNDECLARED_SELECTOR = YES;
355 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
356 | GCC_WARN_UNUSED_FUNCTION = YES;
357 | GCC_WARN_UNUSED_VARIABLE = YES;
358 | IPHONEOS_DEPLOYMENT_TARGET = 8.2;
359 | MTL_ENABLE_DEBUG_INFO = NO;
360 | SDKROOT = iphoneos;
361 | TARGETED_DEVICE_FAMILY = "1,2";
362 | VALIDATE_PRODUCT = YES;
363 | };
364 | name = Release;
365 | };
366 | 5FCD1F611AD18C23000082C2 /* Debug */ = {
367 | isa = XCBuildConfiguration;
368 | buildSettings = {
369 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
370 | CODE_SIGN_IDENTITY = "iPhone Developer: Xinyu Li (XWYND9KE57)";
371 | INFOPLIST_FILE = KYVoiceCurve/Info.plist;
372 | IPHONEOS_DEPLOYMENT_TARGET = 7.1;
373 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
374 | PRODUCT_NAME = "$(TARGET_NAME)";
375 | };
376 | name = Debug;
377 | };
378 | 5FCD1F621AD18C23000082C2 /* Release */ = {
379 | isa = XCBuildConfiguration;
380 | buildSettings = {
381 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
382 | INFOPLIST_FILE = KYVoiceCurve/Info.plist;
383 | IPHONEOS_DEPLOYMENT_TARGET = 7.1;
384 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
385 | PRODUCT_NAME = "$(TARGET_NAME)";
386 | };
387 | name = Release;
388 | };
389 | 5FCD1F641AD18C23000082C2 /* Debug */ = {
390 | isa = XCBuildConfiguration;
391 | buildSettings = {
392 | BUNDLE_LOADER = "$(TEST_HOST)";
393 | FRAMEWORK_SEARCH_PATHS = (
394 | "$(SDKROOT)/Developer/Library/Frameworks",
395 | "$(inherited)",
396 | );
397 | GCC_PREPROCESSOR_DEFINITIONS = (
398 | "DEBUG=1",
399 | "$(inherited)",
400 | );
401 | INFOPLIST_FILE = KYVoiceCurveTests/Info.plist;
402 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
403 | PRODUCT_NAME = "$(TARGET_NAME)";
404 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/KYVoiceCurve.app/KYVoiceCurve";
405 | };
406 | name = Debug;
407 | };
408 | 5FCD1F651AD18C23000082C2 /* Release */ = {
409 | isa = XCBuildConfiguration;
410 | buildSettings = {
411 | BUNDLE_LOADER = "$(TEST_HOST)";
412 | FRAMEWORK_SEARCH_PATHS = (
413 | "$(SDKROOT)/Developer/Library/Frameworks",
414 | "$(inherited)",
415 | );
416 | INFOPLIST_FILE = KYVoiceCurveTests/Info.plist;
417 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
418 | PRODUCT_NAME = "$(TARGET_NAME)";
419 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/KYVoiceCurve.app/KYVoiceCurve";
420 | };
421 | name = Release;
422 | };
423 | /* End XCBuildConfiguration section */
424 |
425 | /* Begin XCConfigurationList section */
426 | 5FCD1F381AD18C22000082C2 /* Build configuration list for PBXProject "KYVoiceCurve" */ = {
427 | isa = XCConfigurationList;
428 | buildConfigurations = (
429 | 5FCD1F5E1AD18C23000082C2 /* Debug */,
430 | 5FCD1F5F1AD18C23000082C2 /* Release */,
431 | );
432 | defaultConfigurationIsVisible = 0;
433 | defaultConfigurationName = Release;
434 | };
435 | 5FCD1F601AD18C23000082C2 /* Build configuration list for PBXNativeTarget "KYVoiceCurve" */ = {
436 | isa = XCConfigurationList;
437 | buildConfigurations = (
438 | 5FCD1F611AD18C23000082C2 /* Debug */,
439 | 5FCD1F621AD18C23000082C2 /* Release */,
440 | );
441 | defaultConfigurationIsVisible = 0;
442 | };
443 | 5FCD1F631AD18C23000082C2 /* Build configuration list for PBXNativeTarget "KYVoiceCurveTests" */ = {
444 | isa = XCConfigurationList;
445 | buildConfigurations = (
446 | 5FCD1F641AD18C23000082C2 /* Debug */,
447 | 5FCD1F651AD18C23000082C2 /* Release */,
448 | );
449 | defaultConfigurationIsVisible = 0;
450 | };
451 | /* End XCConfigurationList section */
452 | };
453 | rootObject = 5FCD1F351AD18C22000082C2 /* Project object */;
454 | }
455 |
--------------------------------------------------------------------------------