@yangjiandong
2014-04-23T03:02:32.000000Z
字数 3110
阅读 1360
ios
tool
使用CocoaPods来做iOS程序的包依赖管理
You specify the dependencies for your project in one easy text file. CocoaPods resolves dependencies between libraries, fetches source code for the dependencies, and creates and maintains an Xcode workspace to build your project.
install
vim .gemrc
:sources:
- https://rubygems.org/
sudo gem install cocoapods
facebook 开发的自动构建工具
nomad world-class command line utilities for iOS development
Alcatraz The package manager for Xcode
ObjectiveSugar ObjectiveC additions for humans. Ruby style.
AFNetworking 是 iOS 一个使用很方便的网络开发框架。示例代码:
NSURL *url = [NSURL URLWithString:@"https://gowalla.com/users/mattt.json"];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
AFJSONRequestOperation *operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) {
NSLog(@"Name: %@ %@", [JSON valueForKeyPath:@"first_name"], [JSON valueForKeyPath:@"last_name"]);
} failure:nil];
JSONModel 是一个 iOS 库可以让你快速创建智能的 JSON 数据模型,可在 iOS 和 OSX 应用中使用
Basic usage
Consider you have a JSON like this:
{"id":"10", "country":"Germany", "dialCode": 49, "isInEurope":true}
Create a new Objective-C class for your data model and make it inherit the JSONModel class.
Declare properties in your header file with the name of the JSON keys:
#import "JSONModel.h"
@interface CountryModel : JSONModel
@property (assign, nonatomic) int id;
@property (strong, nonatomic) NSString* country;
@property (strong, nonatomic) NSString* dialCode;
@property (assign, nonatomic) BOOL isInEurope;
@end
There's no need to do anything in the .m file.
Initialize your model with data:
#import "CountryModel.h"
...
NSString* json = (fetch here JSON from Internet) ...
NSError* err = nil;
CountryModel* country = [[CountryModel alloc] initWithString:json error:&err];
A clean and lightweight progress HUD for your iOS app
https://github.com/samvermette/SVProgressHUD
Using SVProgressHUD in your app will usually look as simple as this (using Grand Central Dispatch):
[SVProgressHUD show];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
// time-consuming task
dispatch_async(dispatch_get_main_queue(), ^{
[SVProgressHUD dismiss];
});
});
Nimbus是一个网站的iOS应用程序开发类库,它封装了众多iOS的控件,包括:实现丰富字体效果以及加上链接的label(rich text label with hyperlinks),完整的网页浏览视图(web view controller), 多选框(radio groups),丰富的列表交互,以及强大的debug工具等等其他各种控件效果。难能可贵的是,Nimbus的文档十分详细,十分有利于开发者参考,用他们的话说是:Nimbus is an iOS framework whose feature set grows only as fast as its documentation。这也是Nimbus最大的特点
YToolkit includes a base64 lib, a handy cocoa categories lib, and an oauth 1.0 & 2.0 lib
ytoolkit 是 Objective-C 的一个常用开发工具包,包括:
PinYin4Objc 是一个流行的汉字(支持简体和繁体)转拼音的objc库