2014年9月28日
摘要:
if (isiOS8) {//ios8的远程推送注册 NSSet *set = nil;#if 1 //1.创建消息上面要添加的动作(按钮的形式显示出来) UIMutableUserNotificationAction *action = [[UIMutableUserNotif...
阅读全文
posted @ 2014-09-28 18:03
助金
阅读(352)
推荐(0)
摘要:
+ (void)animateWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay options:(UIViewAnimationOptions)options animations:(void(^)(void))ani...
阅读全文
posted @ 2014-09-28 10:48
助金
阅读(1049)
推荐(0)
2014年9月22日
摘要:
//IOS8新系统需要使用新的代码注册推送if([[[UIDevicecurrentDevice]systemVersion]floatValue]>=8.0){[[UIApplicationsharedApplication]registerUserNotificationSettings:[UI...
阅读全文
posted @ 2014-09-22 14:50
助金
阅读(320)
推荐(0)
2014年9月12日
摘要:
#pragma mark -#pragma mark - UIWebView Delegate Methods- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigat...
阅读全文
posted @ 2014-09-12 13:25
助金
阅读(456)
推荐(0)
2014年9月4日
摘要:
1.网上搜索字体文件(后缀名为.ttf,或.odf)2.把字体库导入到工程的resouce中3.在程序添加以下代码 输出所有字体NSArray *familyNames = [UIFont familyNames];for( NSString *familyName in familyNames )...
阅读全文
posted @ 2014-09-04 10:56
助金
阅读(188)
推荐(0)
2014年8月28日
摘要:
利用dispatch_once创建单例使用Objective-C实现单例模式的最佳方式向来有很多争论,开发者(包括Apple在内)似乎每几年就会改变他们的想法。当Apple引入了Grand Central Dispatch (GCD)(Mac OS 10.6和iOS4.0),他们也引入了一个很适合用...
阅读全文
posted @ 2014-08-28 17:23
助金
阅读(199)
推荐(0)
摘要:
目前临时的解决办法是1.把1.选中Targets—>Build Settings—>Architectures。把build active architectures only 改为 NO。2. 把最下面的Valid Architectures中的arm64参数删掉就可以了或者: 双击Archite...
阅读全文
posted @ 2014-08-28 17:18
助金
阅读(4456)
推荐(0)
摘要:
//rightBar button UIButton *rightButton = [[UIButton alloc]initWithFrame:CGRectMake(0, 0, 34, 34)]; [rightButton setImage:[UIImage imageNamed:@"shar...
阅读全文
posted @ 2014-08-28 11:20
助金
阅读(105)
推荐(0)
2014年8月26日
摘要:
ios7测试ok[CTSIMSupportGetSIMStatus() isEqualToString:kCTSIMSupportSIMStatusNotInserted]可以判断是否插入了sim卡。前提是把下面的代码随便复制到一个头文件里面,然后引入CoreTelephony.framework即...
阅读全文
posted @ 2014-08-26 21:20
助金
阅读(723)
推荐(0)
摘要:
IOS 中的 AppDelegate.m/h 文件是很重要的呢,因为它是对 Application 的整个生命周期进行管理的。先明白,每个iPhone应用程序都有一个UIApplication,UIApplication是iPhone应用程序的开始并且负责初始化并显 示 UIWindow,并负责加载...
阅读全文
posted @ 2014-08-26 15:13
助金
阅读(778)
推荐(0)