技术宅,fat-man

增加语言的了解程度可以避免写出愚蠢的代码

导航

2014年10月8日 #

iOS:等待控件

摘要: 定义:@interface ViewController (){ UIActivityIndicatorView *testActivityIndicator;}实例化,开始旋转:-(void) showWaitStatus{ NSLog(@"wait..."); testActi... 阅读全文

posted @ 2014-10-08 20:19 codestyle 阅读(341) 评论(0) 推荐(0) 编辑

异步请求HTTP

摘要: 代码:@interface HttpProcessor : NSObject { NSMutableData *buffer;}@property BOOL finished;@property (strong, nonatomic) NSString *html;@end@implement... 阅读全文

posted @ 2014-10-08 18:05 codestyle 阅读(496) 评论(0) 推荐(0) 编辑

同步的HTTP请求

摘要: 代码:#import void request(NSString *urlString){ NSLog(@"BEGIN"); // make request object NSURL *url = [[NSURL alloc]initWithString:urlString]; ... 阅读全文

posted @ 2014-10-08 17:30 codestyle 阅读(650) 评论(0) 推荐(0) 编辑

解析JSON字符串

摘要: 代码:#import void parseJSON(NSString *text){ NSError *error = nil; NSData *data = [text dataUsingEncoding:NSUTF8StringEncoding]; NSArray *array... 阅读全文

posted @ 2014-10-08 15:41 codestyle 阅读(275) 评论(0) 推荐(0) 编辑

切换view的动画

摘要: 代码:#import "MainViewController.h"@interface MainViewController ()@end@implementation MainViewController- (void)viewDidLoad{ [super viewDidLoad]; ... 阅读全文

posted @ 2014-10-08 10:27 codestyle 阅读(164) 评论(0) 推荐(0) 编辑