03 2014 档案
摘要:ObjectAL for iPhone and Machttps://github.com/kstenerud/ObjectAL-for-iPhone以后补上使用教程Mac and iOS Audio, minus the headache.Mac 和 iOS 的的音频框架,真心让人蛋疼。So you want to add audio to your app. Usually your audio needs are something like:即使是这样你还是得把音频添加进的app中,你的老板说的算。通常情况下,你会用到下面的功能:Play, Pause, Stop, LoopVolum
阅读全文
摘要:FRDLivelyButtonhttps://github.com/sebastienwindal/FRDLivelyButtonFRDLivelyButtonis a simple UIButton subclass intended to be used inside a UIBarButtonItem, even though it can be used anywhere you can use a UIButton. It is entirely Core Graphics driven, supports 5 common button types (menu, close, ad
阅读全文
摘要:SVWebViewController简单翻译https://github.com/samvermette/SVWebViewControllerSVWebViewController is a simple inline browser for your iOS 7 app.SVWebViewController是一个简单别致且易用的浏览器控制器,为iOS7应用而设计.SVWebViewController features:iPhone and iPad distinct UIsfull landscape orientation supportback, forward, stop/re
阅读全文
摘要:1. weak属性(弱引用)被weak修饰的对象叫弱引用,不算对象持有者,一个方法执行完后会导致这个对象自动释放掉,并将对象的指针设置成nil,我使用GCD延时1000ms来验证,1000ms之后,其对象是否还在.#import "RootViewController.h"@interface RootViewController ()@property (nonatomic, weak) NSString *str;@end@implementation RootViewController/** 延时多少毫秒 @param microseconds 毫秒 @param
阅读全文
摘要: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 Foundation you wish you've had at the first place. 这是一个关于Foundation框架的一系列的扩展,让你魂牵梦断的东东。UsageInstall viaCocoaPodspod
阅读全文
摘要:TWMessageBarManager简单翻译https://github.com/terryworona/TWMessageBarManagerAn iOS manager for presenting system-wide notifications via a dropdown message bar.一个iOS的管理类,用来展示系统级别的通知,通过一个下拉的信息条。RequirementsRequires iOS 6.0 or laterRequires Automatic Reference Counting (ARC)需要iOS6.0或以上需要ARCFeaturesDrop-in
阅读全文
摘要:MSWeakTimer简易翻译:该timer没有runloop概念,线程安全,没有循环引用现象。https://github.com/mindsnacks/MSWeakTimerDescriptionThread-safeNSTimerdrop-in alternative that doesn't retain the target and supports being used withGCDqueues.这是个线程安全的 NSTimer,他不会对目标进行retain操作,而且,他还支持GCDqueues。MotivationThe first motivation for thi
阅读全文
摘要:JGDownloadAcceleration本人对原文进行了翻译,凑合看看,使用心得以后补上https://github.com/JonasGessner/JGDownloadAcceleration© 2013 Jonas GessnerJGDownloadAcceleration is a Networking library for iOS targeted at downloading large files on to the device's hard disk.JGDownloadAcceleration's main part is a concurr
阅读全文
摘要:LASIImageView – download image with progress indicator翻译原网址:http://lukagabric.com/lasiimageview-download-image-with-progress-indicator/#more-797LASIImageView is a UIImageView subclass that supports asynchronous image download with different progress indicators.It is possible to choose among three di
阅读全文
摘要:[文章原地址]http://mobile.tutsplus.com/tutorials/iphone/ios-quick-tip-from-novice-to-expert/翻译有误之处请勿见笑,本人将在文章的部分地方添加注释,并根据需求增减文章内容,在此对原作者辛勤劳作表示感谢iOS Quick Tip: From Novice to ExpertBart Jacobson Jul 29th 2013 with5 commentsEven though it’s possible to learn the essentials of iOS Development in a weekend,
阅读全文
摘要:[文章原地址]http://funwithobjc.tumblr.com/个人翻译,难免会有错误,请各位看官海涵,翻译在末尾本人将在文章的部分地方添加注释,并根据需求增减文章内容,在此对原作者辛勤劳作表示感谢How to learn CocoaThis is something any experienced Cocoa developer has been asked at least half a dozen times:"What’s the best way to learn Objective-C/Cocoa?"I have two answers to this
阅读全文
摘要:开发过程中用不到一元一次方程吗?非也,iOS开发中经常会遇到根据某个ScrollView动态偏移量的值来实时设置一个View的透明度,你敢说你不用一元一次方程你能搞定?想把一个动画效果做好,经常会遇到实时设置的问题,本人遇到过多次,总结出经验,提供方法来专门计算一元一次方程的K值以及b值,方便开发.BinaryLinearEquation.h + BinaryLinearEquation.m 提供内联函数以及类方法// Copyright (c) 2014年 Y.X. All rights reserved.//#import NS_INLINE CGFloat calculateSlope.
阅读全文
摘要:UITableView的一些常用操作--------------------------------------------------------------------------------------------// 隐藏TableView中cell之间的分割线tableView.separatorStyle = UITableViewCellSeparatorStyleNone;// 隔行显示不同的颜色if (indexPath.row % 2 == 1){ cell.backgroundColor = ......;}else{ cell.backgroundColor = ...
阅读全文
摘要:KVOKVO属于设计模式中的观察者模式,在观察者模式中,一个对象任何状态的变更都会通知另外的对改变感兴趣的对象。这些对象之间不需要知道彼此的存在,这其实是一种松耦合的设计。当某个属性变化的时候,我们通常使用这个模式去通知其它对象。本人用3种方式来讲述KVO的使用,开始前新建一个对象Student类,用以监控Student类中name属性,源码如下Student.h + Student.m#import @interface Student : NSObject@property (nonatomic, strong) NSString *name;@end#import "Stude
阅读全文
摘要: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. The HUD is meant as a replacement for the undocumented, private UIKit UIProgressHUD with some additional f
阅读全文
摘要: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:withObject:afterDelay: is perfect.If it gets a little more complex where you need something happening ever 3.0 secon
阅读全文
摘要:JSONJSON相关的,数据彼此间的转化进行了简单地封装,源码如下,支持arc与非arcYXJSON.h + YXJSON.m//// YXJSON.h//// JSONString 与 JSONData 与 字典或者数组互相转化//// Copyright (c) 2014年 YouXian. All rights reserved.//#import @interface YXJSON : NSObject/** 将字典或者数组转换为JSON格式字符串 @return JSON格式字符串 */+ (NSString *)JSONStringWithDictionaryOrArray...
阅读全文
摘要:CoreTelephony获取运营商信息,需通过 CoreTelephony.Framework 中的 CTTelephonyNetworkInfo 和 CTCarrier 对象获取,这些都在iOS 4.0后就有了。现提供源码,支持arc与非arc编译,使用时请引入 CoreTelephony.Framework 框架MobileCountryCode.h + MobileCountryCode.m//// MobileCountryCode.h//// http://en.wikipedia.org/wiki/Mobile_Network_Code//// Created by You...
阅读全文
摘要:UINavigationController导航栏控制器的左侧返回按钮如果需要设置成图片,仅使用系统的是无法实现的,需要重载系统的导航栏控制器,在控制器推出之前替换掉leftBarButtonItem才行.注:以下链接的这个哥们对NavigationViewController所有能做的定制都解说了http://beyondvincent.com/blog/2013/11/03/120-customize-navigation-status-bar-ios-7/#5源码如下:CustomNavigationViewController.h + CustomNavigationViewContr
阅读全文
摘要:SQLiteManager https://github.com/misato/SQLiteManager4iOS 本人以前从事过嵌入式开发,后来转职为iOS开发,即使如此,也绝不想去碰C语言级别的面向过程的 sqlite3 来操作数据库,做高级语言开发还去折腾面向过程的东西,一个小小的nil没判断好就导致程序崩溃, 这就是 sqlite3 APIs 给你带来的问题,只有封装成面向对象的接口才有可能会去用.有一个封装得挺好的 FMDB 是不二的选择,但这个 SQLiteManager 属于轻量级封装,满足了最最基本的需求,但是,他是在开了ARC的情形下使用的,也就是说,没开ARC后会各种泄露.
阅读全文
摘要:DES算法☆提供高质量的数据保护,防止数据未经授权的泄露和未被察觉的修改☆具有相当高的复杂性,使得破译的开销超过可能获得的利益,同时又要便于理解和掌握☆DES密码体制的安全性应该不依赖于算法的保密,其安全性仅以加密密钥的保密为基础☆实现经济,运行有效,并且适用于多种完全不同的应用苹果本身支持DES加密,在项目中引入头文件 CommonCrypto/CommonCryptor.h 即可使用相关函数.我自己对其进行了封装,支持ARC与非ARCYXCrypto.h//// YXCrypto.h// 用秘钥给字符串加密或者解密//// Created by YouXian on 14-3-18....
阅读全文
摘要:Reachabilitysource https://developer.apple.com/library/ios/samplecode/Reachability/Introduction/Intro.htmlreachability 为苹果官方demo提供的一个检测网络状态的代码,下载源码后本人对其进行了修改,修改后源码:reachability.h + reachability.m#import #import #import typedef enum : NSInteger { NotReachable = 0, ReachableViaWiFi, Reachable...
阅读全文
摘要:NSPredicate谓词工具一般用于过滤数组数据,也可用来过滤CoreData查询出的数据.1). 支持keypath2). 支持正则表达式在使用之前先新建3个类 Teacher Info Address,详细代码如下Info.h#import @interface Info : NSObject@property (nonatomic, strong) NSString *classNum;@endInfo.m#import "Info.h"@implementation Info@endAddress.h#import @interface Address : NSO
阅读全文
摘要:source https://github.com/rs/SDWebImageAPIdoc http://hackemist.com/SDWebImage/docAsynchronous image downloader with cache support with an UIImageView categoryUIImageView的类目,支持异步图片下载,支持缓存机制This library provides a category for UIImageVIew with support for remote images coming from the web.这个库给UIImageV
阅读全文
摘要:Grand Central Dispatch (GCD) ReferenceGrand Central Dispatch (GCD) comprises language features, runtime libraries, and system enhancements that provid...
阅读全文
摘要:[文章原地址]http://mobile.tutsplus.com/tutorials/iphone/ios-quick-tip-5-tips-to-increase-app-performance/人翻胜于机翻,本着练习英语的目的翻译iOS相关的文章,看官切勿见笑。本人将在文章的部分地方添加注释,...
阅读全文
摘要:MagicalRecord https://github.com/magicalpanda/MagicalRecord注意: MagicalRecord 在 ARC 下运作,Core Data 是 ORM 方案,据说带来的麻烦比好处多,且 Core Data 建立的表没有主键,但对于对数据库没有性能...
阅读全文
摘要:Xcode 5.1.dmg 下载地址http://pan.baidu.com/s/1jGJpKm61.新建 Framework & Library 工程我起名叫ShowInfo,下面为其源码showInfo.h=========================#import @interface S...
阅读全文
摘要:Objective-C RegEx Categorieshttps://github.com/bendytree/Objective-C-RegEx-Categories使用说明:将 RegExCategories.h RegExCategories.m 文件拖入工程中引入头文件即可.========================================================================== //匹配电话号码(手机号以13, 15,18开头,八个 \d 数字字符) BOOL isMatch = [@"15910514636" isMa
阅读全文
摘要:找到 TARGETS 中的 Build Setting ,下拉找到 Packaging ,修改 Product Name 即可.
阅读全文
摘要:SVPullToRefresh开源库地址https://github.com/samvermette/SVPullToRefresh将整个文件夹SVPullToRefresh拖入工程中并引入头文件即可注意编译时有一个方法快被弃用了- (CGSize)sizeWithFont:(UIFont *)font constrainedToSize:(CGSize)size lineBreakMode:(NSLineBreakMode)lineBreakMode工程源码RootViewController.h1 // Copyright (c) 2014年 YouXian. All rights re.
阅读全文
摘要:UIRefreshControl 为 UITableViewController 中的一个属性,从以下可以看出, IOS6.0 以上才支持.@property (nonatomic,retain) UIRefreshControl *refreshControl NS_AVAILABLE_IOS(6_0);RootViewController.h// Copyright (c) 2014年 YouXian. All rights reserved.//#import @interface RootViewController : UITableViewController@endRootVi.
阅读全文
摘要:1.STHTTPRequest框架地址https://github.com/nst/STHTTPRequest将 STHTTPRequest .h STHTTPRequest.m 文件拖入工程中引入头文件即可2.Ono框架(解析XML用)https://github.com/mattt/Ono将 Ono 文件夹拖入到工程中引入头文件,链接到 libxml2.dylib ,在 Header Search Path 中 添加 /usr/include/libxml2 ------------------------------------------------------------------
阅读全文