资源简介

这个是高德地图的demo,里面代码写的很清晰,可以用来做导航类app或者运动类app!

资源截图

代码片段和文件信息

//
//  MAAppDelegate.m
//  officialDemoNavi
//
//  Created by 刘博 on 14-7-24.
//  Copyright (c) 2014年 AutoNavi. All rights reserved.
//

#import “MAAppDelegate.h“
#import “MainViewController.h“
#import “iflyMSC/IFlySpeechSynthesizer.h“
#import “iflyMSC/IFlySpeechSynthesizerDelegate.h“
#import “iflyMSC/IFlySpeechConstant.h“
#import “iflyMSC/IFlySpeechUtility.h“
#import “iflyMSC/IFlySetting.h“
#import 
#import “APIKey.h“

@implementation MAAppDelegate

- (void)configureAPIKey
{
    if ([APIKey length] == 0)
    {
        UIAlertView *alert = [[UIAlertView alloc] initWithtitle:@“提示“ message:@“apiKey为空,请检查key是否正确设置“ delegate:nil cancelButtontitle:@“OK“ otherButtontitles:nil nil];
        
        [alert show];
    }
    
    [AMapNaviServices sharedServices].apiKey = (NSString *)APIKey;
    [MAMapServices sharedServices].apiKey = (NSString *)APIKey;
}


- (void)configIFlySpeech
{
    NSString *initString = [[NSString alloc] initWithFormat:@“appid=%@timeout=%@“@“53c35b10“@“20000“];
    
    [IFlySpeechUtility createUtility:initString];
    
    [IFlySetting setLogFile:LVL_NONE];
    [IFlySetting showLogcat:NO];
    
    // 设置语音合成的参数
    [[IFlySpeechSynthesizer sharedInstance] setParameter:@“50“ forKey:[IFlySpeechConstant SPEED]];//合成的语速取值范围 0~100
    [[IFlySpeechSynthesizer sharedInstance] setParameter:@“50“ forKey:[IFlySpeechConstant VOLUME]];//合成的音量;取值范围 0~100
    
    // 发音人默认为”xiaoyan”;可以设置的参数列表可参考个 性化发音人列表;
    [[IFlySpeechSynthesizer sharedInstance] setParameter:@“xiaoyan“ forKey:[IFlySpeechConstant VOICE_NAME]];
    
    // 音频采样率目前支持的采样率有 16000 和 8000;
    [[IFlySpeechSynthesizer sharedInstance] setParameter:@“8000“ forKey:[IFlySpeechConstant SAMPLE_RATE]];
    
    // 当你再不需要保存音频时,请在必要的地方加上这行。
    [[IFlySpeechSynthesizer sharedInstance] setParameter:nil forKey:[IFlySpeechConstant TTS_AUDIO_PATH]];
}


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    self.window = [[UIWindow alloc] initWithframe:[[UIScreen mainScreen] bounds]];
    
    [self configureAPIKey];
    
    [self configIFlySpeech];
    
    self.viewController = [[MainViewController alloc] init];
    
    self.window.rootViewController = [[UINavigationController alloc] initWithRootViewController:self.viewController];
    
    self.window.backgroundColor = [UIColor whiteColor];
    [self.window makeKeyAndVisible];
    return YES;
}

- (void)applicationWillResignActive:(UIApplication *)application
{
    // 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.
    // 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.
}

- (void)applicationDidEnterBackground:(UIApplication *

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2014-12-10 08:41  navigation_demo-master\
     文件         495  2014-12-10 08:41  navigation_demo-master\.gitignore
     文件        1079  2014-12-10 08:41  navigation_demo-master\LICENSE
     文件          59  2014-12-10 08:41  navigation_demo-master\README.md
     目录           0  2014-12-10 08:41  navigation_demo-master\officialDemoNavi\
     文件       12292  2014-12-10 08:41  navigation_demo-master\officialDemoNavi\.DS_Store
     文件       13659  2014-12-10 08:41  navigation_demo-master\officialDemoNavi\icon-72.png
     文件       35439  2014-12-10 08:41  navigation_demo-master\officialDemoNavi\icon-72@2x.png
     文件       10222  2014-12-10 08:41  navigation_demo-master\officialDemoNavi\icon.png
     文件       25535  2014-12-10 08:41  navigation_demo-master\officialDemoNavi\icon@2x.png
     目录           0  2014-12-10 08:41  navigation_demo-master\officialDemoNavi\officialDemoNavi.xcodeproj\
     文件       39607  2014-12-10 08:41  navigation_demo-master\officialDemoNavi\officialDemoNavi.xcodeproj\project.pbxproj
     目录           0  2014-12-10 08:41  navigation_demo-master\officialDemoNavi\officialDemoNavi.xcodeproj\project.xcworkspace\
     文件         161  2014-12-10 08:41  navigation_demo-master\officialDemoNavi\officialDemoNavi.xcodeproj\project.xcworkspace\contents.xcworkspacedata
     目录           0  2014-12-10 08:41  navigation_demo-master\officialDemoNavi\officialDemoNavi\
     文件       15364  2014-12-10 08:41  navigation_demo-master\officialDemoNavi\officialDemoNavi\.DS_Store
     目录           0  2014-12-10 08:41  navigation_demo-master\officialDemoNavi\officialDemoNavi\Annotation\
     文件         443  2014-12-10 08:41  navigation_demo-master\officialDemoNavi\officialDemoNavi\Annotation\NavPointAnnotation.h
     文件         218  2014-12-10 08:41  navigation_demo-master\officialDemoNavi\officialDemoNavi\Annotation\NavPointAnnotation.m
     目录           0  2014-12-10 08:41  navigation_demo-master\officialDemoNavi\officialDemoNavi\Category\
     文件         531  2014-12-10 08:41  navigation_demo-master\officialDemoNavi\officialDemoNavi\Category\UIView+Geometry.h
     文件         817  2014-12-10 08:41  navigation_demo-master\officialDemoNavi\officialDemoNavi\Category\UIView+Geometry.m
     目录           0  2014-12-10 08:41  navigation_demo-master\officialDemoNavi\officialDemoNavi\Configuration\
     文件         382  2014-12-10 08:41  navigation_demo-master\officialDemoNavi\officialDemoNavi\Configuration\APIKey.h
     目录           0  2014-12-10 08:41  navigation_demo-master\officialDemoNavi\officialDemoNavi\Controllers\
     文件        6148  2014-12-10 08:41  navigation_demo-master\officialDemoNavi\officialDemoNavi\Controllers\.DS_Store
     文件         979  2014-12-10 08:41  navigation_demo-master\officialDemoNavi\officialDemoNavi\Controllers\baseNaviViewController.h
     文件        4997  2014-12-10 08:41  navigation_demo-master\officialDemoNavi\officialDemoNavi\Controllers\baseNaviViewController.m
     文件         222  2014-12-10 08:41  navigation_demo-master\officialDemoNavi\officialDemoNavi\Controllers\MainViewController.h
     文件        4076  2014-12-10 08:41  navigation_demo-master\officialDemoNavi\officialDemoNavi\Controllers\MainViewController.m
     目录           0  2014-12-10 08:41  navigation_demo-master\officialDemoNavi\officialDemoNavi\Controllers\NaviViewControllers\
............此处省略383个文件信息

评论

共有 条评论