Oct
                
                
                14
            iOS 小知识: 忽略编译器警告
            
                Published 12:10 Oct 14, 2014 by @ezra.
            
            
                #Programming# 介绍一些 iOS 小知识。
忽略警告
废弃
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdepre...
            
            
            
        
            
            Oct
                
                
                14
            iOS 小知识: 模拟 Home 键点击
            
                Published 12:10 Oct 14, 2014 by @ezra.
            
            
                #Programming# 介绍一些 iOS 小知识。
模拟 Home 键单击
[[UIApplication sharedApplication] performSelector:@selector(suspend)];
注意...
            
            
            
        
            
            Oct
                
                
                14
            iOS 小知识: 汉字转拼音
            
                Published 12:10 Oct 14, 2014 by @ezra.
            
            
                #Programming# 介绍一些 iOS 小知识。
汉字转拼音
@interface NSString (MandarinLatin)
- (NSString *)stringByReplacingMandarinToLat...
            
            
            
        
            
            Oct
                
                
                14
            iOS 小知识: 生成随机浮点数
            
                Published 12:10 Oct 14, 2014 by @ezra.
            
            
                #Programming# 介绍一些 iOS 小知识。
生成随机浮点数
定义宏 #define ARC4RANDOM_MAX 0x100000000。
使用 arc4random() 来获取 0 ~ 100 的浮点数了: dou...
            
            
            
        
            
            Oct
                
                
                14
            iOS 小知识: 获取网页内容高度
            
                Published 12:10 Oct 14, 2014 by @ezra.
            
            
                #Programming# 介绍一些 iOS 小知识。
获取 Web 页面内容高度
利用 JavaScript 来实现,一般写在 UIWebView 代理中。
- (void)webViewDidFinishLoad:(UIWe...
            
            
            
        
            
            Oct
                
                
                14
            iOS 小知识: 防止锁屏
            
                Published 12:10 Oct 14, 2014 by @ezra.
            
            
                #Programming# 介绍一些 iOS 小知识。
防止锁屏
[[UIApplication sharedApplication] setIdleTimerDisabled:YES];...
            
            
            
        
            
            Oct
                
                
                09
            iOS apps and the Open Source they use
            
                Published 12:10 Oct 09, 2014 by @ezra.
            
            
                #Programming# I've compiled a list of six popular iPhone apps and the iOS Open Source Software they use.
I've also...
            
            
            
        
            
            Sep
                
                
                20
            iOS: 获取应用版本
            
                Published 12:09 Sep 20, 2014 by @ezra.
            
            
                #Programming# 获取 iOS 应用版本信息:
- (NSString *)applicationVersion {
    return [[[NSBundle mainBundle] infoDictionary]...
            
            
            
        
            
            Sep
                
                
                12
            Cocoa/Cocoa Touch: Hex Color
            
                Published 12:09 Sep 12, 2014 by @ezra.
            
            
                #Programming# 将 Hex 颜色 (例如 #ffffff) 转换为 UIColor/NSColor, 以 UIColor 举例:
我们通过分类方式实现:
@implementation UIColor (MXColo...
            
            
            
        
            
            Sep
                
                
                12
            iOS: Copy UIColor
            
                Published 12:09 Sep 12, 2014 by @ezra.
            
            
                #Programming# UIColor 实例默认是不支持 copy 操作的, 但有时候我们还是需要这样的操作, 怎么实现呢?
// @implementation UIImage (Copying)
+ (UIImage *...
            
            
            
        
            
            Sep
                
                
                11
            iOS : lldb 浅析
            
                Published 12:09 Sep 11, 2014 by @ezra.
            
            
                #Programming# 做 iOS 开发的小伙伴们肯定对 gdb 和 lldb 不陌生,即便你不知道它是什么。
概念
lldb 都是 Xcode 中的调试器工具,如果你使用的是 Xcode 5 (或是 4.3,记不清了)以后...
            
            
            
        
            
            Sep
                
                
                08
            Swift 学习资源
            
                Published 12:09 Sep 08, 2014 by @ezra.
            
            
                #Programming# 本文罗列了一些比较好的 Swift 学习资源。
苹果公司在WWDC 2014上宣布了他们将会推出一款新的编程语言,面向iOS和OS X系统的开发人员,这个新的语言被命名为Swift。
Swift在i...