[关闭]
@yangjiandong 2014-04-23T03:02:32.000000Z 字数 3110 阅读 1360

ios tools

ios tool


目录

开发库常用库索引

CocoaPods

使用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

xctool

facebook 开发的自动构建工具

nomad

nomad world-class command line utilities for iOS development

Alcatraz

Alcatraz The package manager for Xcode

ObjectiveSugar

ObjectiveSugar ObjectiveC additions for humans. Ruby style.

AFNetworking

AFNetworking 是 iOS 一个使用很方便的网络开发框架。示例代码:

  1. NSURL *url = [NSURL URLWithString:@"https://gowalla.com/users/mattt.json"];
  2. NSURLRequest *request = [NSURLRequest requestWithURL:url];
  3. AFJSONRequestOperation *operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) {
  4. NSLog(@"Name: %@ %@", [JSON valueForKeyPath:@"first_name"], [JSON valueForKeyPath:@"last_name"]);
  5. } failure:nil];

JSONModel

JSONModel 是一个 iOS 库可以让你快速创建智能的 JSON 数据模型,可在 iOS 和 OSX 应用中使用

Basic usage

Consider you have a JSON like this:

  1. {"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:

  1. #import "JSONModel.h"
  2. @interface CountryModel : JSONModel
  3. @property (assign, nonatomic) int id;
  4. @property (strong, nonatomic) NSString* country;
  5. @property (strong, nonatomic) NSString* dialCode;
  6. @property (assign, nonatomic) BOOL isInEurope;
  7. @end

There's no need to do anything in the .m file.
Initialize your model with data:

  1. #import "CountryModel.h"
  2. ...
  3. NSString* json = (fetch here JSON from Internet) ...
  4. NSError* err = nil;
  5. CountryModel* country = [[CountryModel alloc] initWithString:json error:&err];

RFUI

SVProgressHUD

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):

  1. [SVProgressHUD show];
  2. dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
  3. // time-consuming task
  4. dispatch_async(dispatch_get_main_queue(), ^{
  5. [SVProgressHUD dismiss];
  6. });
  7. });

Nimbus

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

YToolkit includes a base64 lib, a handy cocoa categories lib, and an oauth 1.0 & 2.0 lib

ytoolkit 是 Objective-C 的一个常用开发工具包,包括:

PinYin4Objc

PinYin4Objc 是一个流行的汉字(支持简体和繁体)转拼音的objc库

other

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注