This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
q 要发音的中文或英文词语、句子 | |
tl 发音语言 | |
http://translate.google.com/translate_tts?ie=UTF-8&q=你好&tl=zh-CN&total=1&idx=0&textlen=11&prev=input | |
*/ | |
NSString* userAgent = @"Mozilla/5.0"; | |
NSURL *url = [NSURL URLWithString:[@"http://translate.google.com/translate_tts?ie=UTF-8&q=你好&tl=zh-CN&total=1&idx=0&textlen=11&prev=input" | |
stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; | |
NSMutableURLRequest* request = [[NSMutableURLRequest alloc] initWithURL:url]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright © 2012 Scott Perry (http://numist.net) | |
* | |
* Released under the MIT License; its terms are at the end of this file. | |
*/ | |
#import <objc/runtime.h> | |
/** | |
* `selector_belongsToProtocol` solves a common problem in proxy objects for delegates where selectors that are not part of the protocol may be unintentionally forwarded to the actual delegate. |