2015年8月10日
摘要:
1、不要直接在UIWindow里面直接使用UIView,而是加载根试图控制器(UIViewController)然后使用控制器改变UIView,这也是Apple官方推荐的方式 [self beginAppearanceTransition:YES animated:NO]; [parentV...
阅读全文
posted @ 2015-08-10 17:41
MGY007
阅读(371)
推荐(0)
2015年7月10日
摘要:
文章不错http://www.cnblogs.com/kenshincui/p/4186022.html
阅读全文
posted @ 2015-07-10 16:29
MGY007
阅读(94)
推荐(0)
摘要:
+ (instancetype)captureWithView:(UIView *)view{ // 1.开启上下文 UIGraphicsBeginImageContextWithOptions(view.frame.size, NO, 0.0); // 2.将控制器vi...
阅读全文
posted @ 2015-07-10 16:27
MGY007
阅读(119)
推荐(0)
2015年6月12日
摘要:
@implementation NSString (Emoji)+ (BOOL)stringContainsEmoji:(NSString *)string{ __block BOOL returnValue = NO; [string enumerateSubstringsInRang...
阅读全文
posted @ 2015-06-12 14:44
MGY007
阅读(258)
推荐(0)
2015年6月9日
摘要:
1利用GCD方式实现单例(ARC)#import "People.h"@implementation Peoplestatic id _instace;+(id)allocWithZone:(struct _NSZone *)zone{ //为防止用alloc创建对象 stat...
阅读全文
posted @ 2015-06-09 23:52
MGY007
阅读(662)
推荐(0)
2015年5月5日
摘要:
在init时候注册notification:[[NSNotificationCenterdefaultCenter]addObserver:selfselector:@selector(textFiledEditChanged:)name:@"UITextFieldTextDidChangeNoti...
阅读全文
posted @ 2015-05-05 12:27
MGY007
阅读(323)
推荐(0)
2015年4月23日
摘要:
AFNetworking 2.0当Deployment Target低于6.0时,AFURLConnectionOperation.h,AFURLSessionManager.h@property(nonatomic, strong) dispatch_queue_t completionQueue...
阅读全文
posted @ 2015-04-23 17:15
MGY007
阅读(458)
推荐(0)
2015年2月10日
摘要:
NSDate *datenow = [NSDate date]; NSTimeZone *zone = [NSTimeZone systemTimeZone]; NSInteger interval = [zone secondsFromGMTForDate:datenow]; NSDate ...
阅读全文
posted @ 2015-02-10 20:33
MGY007
阅读(145)
推荐(0)
2015年1月10日
摘要:
打电话:第一种:利用私有API,appStore不合法[[UIApplicationsharedApplication]openURL:[NSURLURLWithString:@"tel://10010"]]第二种:UIWebView加载电话,这种是合法的,可以上App Store的UIWebVie...
阅读全文
posted @ 2015-01-10 16:59
MGY007
阅读(160)
推荐(0)
2014年12月11日
摘要:
//取得导航控制器的某一个控制器 UIViewController *VC=[[self.navigationController viewControllers]objectAtIndex:self.navigationController.viewControllers.count...
阅读全文
posted @ 2014-12-11 15:38
MGY007
阅读(139)
推荐(0)