如果你一名开发iOS项目的程序员,而且正在学习Swift或开发新项目,那就看看我这篇文章,分享一些我觉得做得不错的Github依赖库。
IQKeyboardManagerSwift
https://github.com/hackiftekhar/IQKeyboardManager
只要配置一句代码,就可以使整个App的软键盘弹出时自动滚动界面布局不让输入框被挡住
import IQKeyboardManagerSwift
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
IQKeyboardManager.sharedManager().enable = true
return true
}
}
SCLAlertView
https://github.com/vikmeup/SCLAlertView-Swift
一款非常精美的警告框控件,使用简单,自定义也简单
// Get started
SCLAlertView().showInfo("Important info", subTitle: "You are great")
Alamofire
https://github.com/Alamofire/Alamofire
AFNetworking作者使用swift写的网络请求库,用法与AFNetworking差不多
import Alamofire
Alamofire.request(.GET, "https://httpbin.org/get")
to be continue...