使用AFN,服务端返回的结果看看哪里错了. 因为后台返回的不是一个有效的JSON string 所以库里面转化的时候一个error就抛出了.所以这时候,就自己做解析好了.NSLog ( @"operation: %@" , operation. responseString );
分类:
Web程序 时间:
2015-11-09 12:43:27
阅读次数:
169
前两天的项目中[[AlipaySDK defaultService] payOrder:orderString fromScheme:appScheme callback:^(NSDictionary *resultDic) { NSLog(@"reslut = %@",res...
分类:
移动开发 时间:
2015-11-08 15:11:18
阅读次数:
646
实例方法的创建 NSDictionary *wukong = [[NSDictionary alloc] initWithObjectsAndKeys:@"悟空", @"name", @"男", @"gender", @"500", @"age", nil ]; NSLog(@"%@",...
分类:
移动开发 时间:
2015-11-07 20:36:39
阅读次数:
273
NSString *urlString = [NSString stringWithFormat:@"http://www.apple.com"]; // 获取字符串长度 NSLog(@"长度:%lu", [urlString length]);// 求子字符串 NSLog(@"%@", [url....
分类:
移动开发 时间:
2015-11-07 20:26:44
阅读次数:
255
新建一个singleView代码如下: #import?"ViewController.h"
@interface?ViewController?()
@end
@implementation?ViewController
-?(void)viewDidLoad?{
????[super?viewDidLoad];
????NSLog(@...
分类:
移动开发 时间:
2015-11-06 18:09:31
阅读次数:
498
block引用外部变量时,如果是这种形式,则只会造成对i的copy,不会造成引用。 int i = 0;brush.getCardInfo=^(NSDictionary*info){ NSLog("%d",i); }; 如果在int前加__block则在block中实现修改i的数值,这时...
分类:
其他好文 时间:
2015-11-06 16:15:30
阅读次数:
217
1.打电话 ?NSMutableString * str=[[NSMutableString alloc] initWithFormat:@"telprompt://%@",@"40009***65"]; ? ? //? ? ? ? ? ? NSLog(@"str======%@",str); [[UIApplication sharedApplication] op...
分类:
移动开发 时间:
2015-11-05 17:02:15
阅读次数:
137
NSDictionary *dictionary=[NSDictionary dictionaryWithObject:@"aa" forKey:@"1" ]; NSLog(@"%@",dictionary); NSDictionary *dictionary1=[NSDicti...
分类:
其他好文 时间:
2015-11-04 21:02:59
阅读次数:
234
[self.usernameTextField.rac_textSignal subscribeNext:^(id x) { NSLog(@"%@", x);}];打印结果2013-12-24 14:48:50.359 RWReactivePlayground[9193:a0b] i2013-12....
分类:
其他好文 时间:
2015-11-03 17:49:53
阅读次数:
248
NSDate常用方法 NSDate *date=[NSDate date];//获取当前的时间 NSLog(@"%@",date); NSDate *date1=[NSDate dateWithTimeIntervalSinceNow:-60];/...
分类:
其他好文 时间:
2015-11-03 17:39:27
阅读次数:
255