12 2014 档案
UIAlertView 左对齐 iOS7及iOS6不同处理
摘要:之前看到很多通过-(void)willPresentAlertView:(UIAlertView*)alertView来修改alertView的subview的代码,但是在iOS7以上的系统没有作用,查了很久的资料也没有说明,有想过自己重写一个,但是后来在csdn闪下到一段代码http://down... 阅读全文
posted @ 2014-12-23 22:42 Jelly_L 阅读(595) 评论(0) 推荐(0)
iOS 判断当前是否连接到网络和网络类型
摘要:之前有判断过是否连接到网络,没有使用apple的示例中的Reachability。#import #import #import #import -(BOOL)isConnectToNewtwork{ struct sockaddr_in zeroAddress; bzero(&zeroAddr... 阅读全文
posted @ 2014-12-16 16:31 Jelly_L 阅读(553) 评论(0) 推荐(0)
iOS使用qq登录
摘要:问题1:我在使用v2.3版本的sdk进行qq登录时,总是提示我没有安装最新版本的qq,但是我已经安装了最新版本的了解决方法:xcode6.0中 bundle display name的配置系统默认不加上了 这项配置之前的版本就是你的应用的显示名称,xcode中这项配置和bundle name合一了,... 阅读全文
posted @ 2014-12-11 15:54 Jelly_L 阅读(618) 评论(0) 推荐(0)
iOS7系统 视图高度一直为480(上下部分黑屏)
摘要:今天遇到一个奇葩的问题,就是在iOS7以上的系统运行时,通过UIScreen *screen = [UIScreen mainScreen]; CGRect rect = [screen bounds];获得的屏幕高度竟然为480。纠结了好久,上网查了下,http://blog.csdn.ne... 阅读全文
posted @ 2014-12-10 15:23 Jelly_L 阅读(195) 评论(0) 推荐(0)
IOS应用程序生命周期[转]
摘要:http://www.jcsample.com/archives_103.htmlIOS应用程序生命周期—程序的生命周期a.程序的生命周期是指应用程序启动到应用程序结束整个阶段的全过程b.每一个IOS应用程序都包含一个UIApplication对象,IOS系统通过该UIApplication对象监控... 阅读全文
posted @ 2014-12-09 09:39 Jelly_L 阅读(232) 评论(0) 推荐(0)
NSTimer retain了它的target
摘要:今天一直在释放一个类对象B(这个类中有一个timer),根据arc的原理来说, B的retainCount为0时,就会调用dealloc。但是当为我把B=nil,没有进入dealloc。-(void)dealloc{ [timer invalidate]; timer = nil;}后来经过朋... 阅读全文
posted @ 2014-12-04 20:46 Jelly_L 阅读(372) 评论(0) 推荐(0)
通过类名和方法名,实现对函数得调用
摘要:1.BaseClass是基类,SubClass继承BaseClass,并且重写基类的manageMethod方法,通过类名@"SubClass"获取类,并通过基类调用manageMethod方法,实现工厂模式。NSString *className = @"SubClass"; NSStrin... 阅读全文
posted @ 2014-12-03 15:01 Jelly_L 阅读(333) 评论(0) 推荐(0)