![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
iOS
SEEKERDZJ
这个作者很懒,什么都没留下…
展开
-
UIKit Dynamics入门
什么是UIKit动力学(UIKit Dynamics)其实就是UIKit的一套动画和交互体系。我们现在进行UI动画基本都是使用CoreAnimation或者UIView animations。而UIKit动力学最大的特点是将现实世界动力驱动的动画引入了UIKit,比如重力,铰链连接,碰撞,悬挂等效果。一言蔽之,即是,将2D物理引擎引入了人UIKit。需要注意,UIKit动力学的引入,并不是转载 2014-04-16 22:57:55 · 553 阅读 · 0 评论 -
Enter The Matrix
Enter The Matrixhttps://github.com/mpospese/EnterTheMatrixThe sample application to accompany my conference talk "Enter The Matrix" on matrix transformations.Slides can be downloaded from转载 2014-04-16 23:01:44 · 650 阅读 · 0 评论 -
修改后无警告全面支持non-ARC以及ARC的OpenUDID
OpenUDIDOpen source initiative for a universal and persistent UDID solution for iOS.首创的给iOS提供设备唯一标示符的一个开源代码.https://github.com/ylechelle/OpenUDID使用很简单,引入头文件后执行下面一句话即可:由于原版O转载 2014-04-16 23:04:25 · 911 阅读 · 0 评论 -
将 MRC 项目转换为 ARC 项目
其实很简单,直接使用系统工具转换即可,以下是步骤:1. 你之前的项目是MRC的 2. 里面有 release, dealloc 等. 3. 开始转化 4. 点击save转化完后,记得把工程重新设置成arc的.转载 2014-04-16 23:09:12 · 504 阅读 · 0 评论 -
iOS中alloc与init
面向对象的3大特性,封装继承和多态.我遇到过封装相关的问题,因为初级封装简单,常常暴露出被你封装的接口,进一步进行高级封装隐藏接口的时候才发现,封装是一门学问,而这门学问得从最基础的alloc与init讲起. FatherModel.h#import @interface FatherModel : NSObject@endFatherModel转载 2014-04-16 23:13:57 · 478 阅读 · 0 评论 -
Haneke(处理图片缓存问题)
Hanekehttps://github.com/hpique/HanekeA lightweight zero-config image cache for iOS.轻量级0配置图片缓存。Haneke resizes images and caches the result on memory and disk. Everything is done in转载 2014-04-16 23:15:29 · 865 阅读 · 0 评论 -
Fast Image Cache
https://github.com/path/FastImageCache Fast Image Cache is an efficient, persistent, and—above all—fast way to store and retrieve images in your iOS application. Part of any good iOS applicati转载 2014-04-16 23:17:04 · 1185 阅读 · 0 评论 -
FMDB
FMDBhttps://github.com/ccgus/fmdbThis is an Objective-C wrapper around SQLite: http://sqlite.org/这是对 SQLite 的封装:http://sqlite.org/Read the SQLite FAQ:http://www.sqlite.org/faq.html转载 2014-04-16 23:19:23 · 580 阅读 · 0 评论 -
[runtime] MAObjCRuntime
MAObjCRuntime 源码地址:(引入头文件MARTNSObject.h即可,非arc环境下)http://pan.baidu.com/s/1eQ6776Uhttps://github.com/mikeash/MAObjCRuntimeMAObjCRuntime is an ObjC wrapper around the Objective-C run转载 2014-04-16 23:20:23 · 417 阅读 · 0 评论 -
较老版本 AFNetworking 使用心得
较老版本的 AFNetworking 下载链接 http://pan.baidu.com/s/14Cxga将压缩包中的文件夹拖入xcode工程项目中并引入如下的框架 简单的 JOSN 解析例子 static NSString *serverAddress = @"http://m.weather.com.cn/data/101110101.html"; // 1.创转载 2014-04-17 00:37:22 · 443 阅读 · 0 评论 -
用 iOS-System-Services 框架获取iOS设备所用的设备信息
参考资料地址https://github.com/Shmoopi/iOS-System-Services百度云盘下载地址http://pan.baidu.com/s/1c05ot1m This is a singleton class to gather all available information about a device. It gives y转载 2014-04-17 00:38:31 · 761 阅读 · 0 评论 -
IOS的唯一标识符问题(转)
引用地址http://www.zhihu.com/question/22599526/answer/21938878 网上搜了下IOS手机标志的种类,直接引用过来。UDID[[UIDevice currentDevice] uniqueIdentfier]iOS官方最早提供的UDID方案,根据某一公式,使用设备序列号、网卡地址等信息作为参数计算而来转载 2014-04-17 00:38:59 · 637 阅读 · 0 评论 -
使用系统自带的 UIRefreshControl 实现下拉刷新
UIRefreshControl 为 UITableViewController 中的一个属性,从以下可以看出, IOS6.0 以上才支持.@property (nonatomic,retain) UIRefreshControl *refreshControl NS_AVAILABLE_IOS(6_0);RootViewController.h// Copy转载 2014-04-17 00:39:45 · 463 阅读 · 0 评论 -
如何在 Xcode 中修改应用的名字
找到 TARGETS 中的 Build Setting ,下拉找到 Packaging ,修改 Product Name 即可.转载 2014-04-17 00:40:23 · 410 阅读 · 0 评论 -
使用开源库 MagicalRecord 操作 CoreData
MagicalRecord https://github.com/magicalpanda/MagicalRecord注意: MagicalRecord 在 ARC 下运作,Core Data 是 ORM 方案,据说带来的麻烦比好处多,且 Core Data 建立的表没有主键,但对于对数据库没有性能要求,进行简单的数据操作完全够用,能简化无数的代码量.MagicalRe转载 2014-04-17 00:41:26 · 484 阅读 · 0 评论 -
使用开源库 SDWebImage 异步下载缓存图片(持续更新)
source https://github.com/rs/SDWebImageAPIdoc http://hackemist.com/SDWebImage/docAsynchronous image downloader with cache support with an UIImageView categoryUIImageView的类目,支持异步图片下载,支持缓存转载 2014-04-17 00:42:41 · 563 阅读 · 0 评论 -
使用 Reachability 获取网络状态
Reachabilitysource https://developer.apple.com/library/ios/samplecode/Reachability/Introduction/Intro.htmlreachability 为苹果官方demo提供的一个检测网络状态的代码,下载源码后本人对其进行了修改,修改后源码:reachability.h + reach转载 2014-04-17 00:43:06 · 1632 阅读 · 0 评论 -
使用 SQLiteManager 操作 sqlite3 数据库
SQLiteManager https://github.com/misato/SQLiteManager4iOS 本人以前从事过嵌入式开发,后来转职为iOS开发,即使如此,也绝不想去碰C语言级别的面向过程的 sqlite3 来操作数据库,做高级语言开发还去折腾面向过程的东西,一个小小的nil没判断好就导致程序崩溃, 这就是 sqlite3 APIs 给你带来的问题,只转载 2014-04-17 00:43:34 · 940 阅读 · 0 评论 -
使用 CoreTelephony 框架获取当前网络运营商
CoreTelephony获取运营商信息,需通过 CoreTelephony.Framework 中的 CTTelephonyNetworkInfo 和 CTCarrier 对象获取,这些都在iOS 4.0后就有了。现提供源码,支持arc与非arc编译,使用时请引入 CoreTelephony.Framework 框架MobileCountryCode.h + Mobile转载 2014-04-17 00:44:22 · 593 阅读 · 0 评论 -
JSONString 与 JSONData 与字典或者数组互相转化
JSONJSON相关的,数据彼此间的转化进行了简单地封装,源码如下,支持arc与非arcYXJSON.h + YXJSON.m//// YXJSON.h//// JSONString 与 JSONData 与 字典或者数组互相转化//// Copyright (c) 2014年 YouXian. All rights reserved.//#imp转载 2014-04-17 10:18:24 · 452 阅读 · 0 评论 -
使用开源库 MBProgressHUD 等待指示器
source https://github.com/jdg/MBProgressHUDMBProgressHUD is an iOS drop-in class that displays a translucent HUD with an indicator and/or labels while work is being done in a background thread. Th转载 2014-04-17 10:18:52 · 551 阅读 · 0 评论 -
学习iOS开发的建议:如何从菜鸟到专家
http://mobile.tutsplus.com/tutorials/iphone/ios-quick-tip-from-novice-to-expert/翻译有误之处请勿见笑,本人将在文章的部分地方添加注释,并根据需求增减文章内容,在此对原作者辛勤劳作表示感谢 iOS Quick Tip: From Novice to ExpertBart Jacobs on转载 2014-04-17 10:20:19 · 610 阅读 · 0 评论 -
使用开源库 JGDownloadAcceleration 控制下载队列,断点下载,加速下载
JGDownloadAcceleration本人对原文进行了翻译,凑合看看,使用心得以后补上https://github.com/JonasGessner/JGDownloadAcceleration © 2013 Jonas GessnerJGDownloadAcceleration is a Networking library for iOS targ转载 2014-04-17 10:20:52 · 941 阅读 · 0 评论 -
使用线程安全的 MSWeakTimer ,它不会对目标进行retain操作,避免循环引用
MSWeakTimer简易翻译:该timer没有runloop概念,线程安全,没有循环引用现象。https://github.com/mindsnacks/MSWeakTimerDescriptionThread-safe NSTimer drop-in alternative that doesn't retain the target and supports转载 2014-04-17 10:21:15 · 710 阅读 · 0 评论 -
用 ObjectiveSugar 扩展NSArray NSDictionary NSSet NSNumber
source - https://github.com/supermarin/ObjectiveSugarLook like a girl, act like a lady, think like a man, work like a boss.外表如萝莉,举止赛淑女,思想堪汉子,工作比老板。 A set of functional additions for Fo转载 2014-04-17 10:21:46 · 1072 阅读 · 0 评论 -
极具动感的 FRDLivelyButton
FRDLivelyButtonhttps://github.com/sebastienwindal/FRDLivelyButtonFRDLivelyButton is a simple UIButton subclass intended to be used inside a UIBarButtonItem, even though it can be used anywhere转载 2014-04-17 10:23:29 · 454 阅读 · 0 评论 -
KVC中setValuesForKeysWithDictionary:
从字典映射到一个对象,这是KVC中的一个方法所提供的,这个方法就是 setValuesForKeysWithDictionary: ,非常好用,不需要你来一一的给对象赋值而直接从字典初始化即可,但用的不好会经常崩溃,本教程就来讨论这些使用的细节.首先,先初始化一个字典,如下所示:----------------------------------------------------转载 2014-04-17 10:24:59 · 715 阅读 · 2 评论 -
使用开源库 EasyTimeline 操作定时器 NSTimer
EasyTimelinehttps://github.com/mmislam101/EasyTimelineSometimes you need things to happen at specific times and things.When it's just an event 2.0 seconds later, a performSelector:withObje转载 2014-04-17 10:18:37 · 433 阅读 · 0 评论 -
iOS开发中的 ARC
1. weak属性(弱引用)被weak修饰的对象叫弱引用,不算对象持有者,一个方法执行完后会导致这个对象自动释放掉,并将对象的指针设置成nil,我使用GCD延时1000ms来验证,1000ms之后,其对象是否还在.#import "RootViewController.h"@interface RootViewController ()@property (no转载 2014-04-17 10:22:53 · 479 阅读 · 0 评论 -
iOS 6 Auto Layout NSLayoutConstraint 界面布局
终于ios 6推出了正式版本,同时也随之iphone5的面试,对于ios开发者来说,也许会感觉到一些苦恼。那就是原本开发的程序,需要大量的修改了。为了适应最新的iphone5的屏幕。在WWDC2012里苹果推出了,Auto Layout的概念。我们可以通过Auto Layout来适应屏幕的改变。比如我们要做一个如下的界面。如果按照以前的frame的方式的话,大概转载 2014-04-16 22:49:38 · 464 阅读 · 0 评论 -
利用UIWebView获取userAgent需要注意的地方
网络通信有时候需要传递参数userAgent,iOS中获取userAgent很简单. UIWebView* webView = [[UIWebView alloc] initWithFrame:CGRectZero]; NSString *userAgentString = [webView stringByEvaluatingJavaScriptFromString:转载 2014-04-16 23:02:47 · 748 阅读 · 0 评论 -
适配iOS6与iOS7
适配屏幕其实很简单,但为了保持兼容性以及写的代码的通用性,以及最小的改动代码,本人按照如下的一种方式来适配,可以一劳永逸.1. 先定义几个宏,分辨表示应用可以使用区域的高度,屏幕可用区域的高度,屏幕的宽度2. 再看看如下图的一些描述3. 接下来看看适配的代码如何写#import "RootViewController.h"#defin转载 2014-04-16 23:06:35 · 568 阅读 · 0 评论 -
利用 FastCoding 将对象进行本地持久化
FastCodinghttps://github.com/nicklockwood/FastCodingA faster and more flexible binary file format replacement for NSCoding, Property Lists and JSON一个用来替换 NSCoding , Property Lists 以及 JSON转载 2014-04-16 23:07:52 · 844 阅读 · 0 评论 -
FreeStreamer 在线流媒体播放
FreeStreamerhttps://github.com/muhku/FreeStreamerIntroductionFreeStreamer is an audio player engine for iOS and OS X, designed for playing audio streams. The engine has a minimal UI fo转载 2014-04-16 23:10:16 · 3896 阅读 · 0 评论 -
iOS7以下设备获取mac地址
注意,是iOS7以下的设备,直接上源码,获取mac地址都是为了唯一标识一个设备的,但iOS7设备的mac地址为 020000000000MacAddress.h#include #include #include if.h>#include NSString * macaddress();MacAddress.m#import "MacAddr转载 2014-04-16 23:11:13 · 705 阅读 · 0 评论 -
FlatUIKit
FlatUIKitFlatUIKit is a collection of iOS components styled with the "Flat UI" aesthetic that we created while buildingGrouper for iPhone. Its design inspiration comes from Flat UI and Kyle Mi转载 2014-04-16 23:18:04 · 709 阅读 · 0 评论 -
[runtime] iOS-Runtime-Headers
Dynamically Generated iOS Headershttps://github.com/nst/iOS-Runtime-Headers Here are iOS Objective-C headers as derived from runtime introspection.The headers were generated using Runt转载 2014-04-16 23:21:48 · 1127 阅读 · 0 评论 -
封装GCD以及介绍如何使用
源码地址 http://pan.baidu.com/s/1zTUR8研究GCD有一段时间,翻译了多篇文章,找了很多的资料,看了很多官方文档,看起来很难,实际上很简单,本人一一进行讲解怎么使用.支持ARC以及非ARC,无论在ARC环境还是在非ARC环境,都需要调用dispatchRelease方法来释放init出的GCDGroup,GCDQueue,GCDSemaphore,以及GC转载 2014-04-16 23:23:43 · 608 阅读 · 0 评论 -
HTTP请求 GET POST 网络编程实现(转)
尊重原作者收集的资料,复制粘贴只为了避免作者文章出处哪天抽风了访问不了了导致资料消失。原文地址 http://bbs.neworigin.net/forum.php?mod=viewthread&tid=488 在开发网络相关的应用,比如微博应用时,就必然需要使用到HTTP请求来发送或者接收数据。最主要的就是使用GET方法或者POST方法。本文将详细介绍HTTP请求在iOS转载 2014-04-17 00:37:55 · 600 阅读 · 0 评论 -
使用 STHTTPRequest 框架解析 Soap1.2 教程
1.STHTTPRequest框架地址https://github.com/nst/STHTTPRequest将 STHTTPRequest .h STHTTPRequest.m 文件拖入工程中引入头文件即可 2.Ono框架(解析XML用)https://github.com/mattt/Ono将 Ono 文件夹拖入到工程中引入头文件,链接到 li转载 2014-04-17 00:39:26 · 616 阅读 · 0 评论