上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 20 下一页

改变和恢复view的方向

摘要: self.navigationController.view.transform = CGAffineTransformMakeRotation(M_PI/2); self.navigationController.view.frame = CGRectMake(0, 0, 320, 480); //设置应用程序的状态栏到指定的方向 [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight];self.navigationController.... 阅读全文
posted @ 2013-10-22 16:44 jack_yan 阅读(368) 评论(0) 推荐(0)

app被Rejected 的各种原因翻译。这个绝对有用。

摘要: 1. Terms and conditions(法律与条款)1.1As a developer of applications for the App Store you are bound by the terms of theProgram License Agreement(PLA), Human Interface Guidelines (HIG), and any other licenses or contracts between you and Apple. The following rules and examples are intended to assist you 阅读全文
posted @ 2013-10-21 13:59 jack_yan 阅读(720) 评论(0) 推荐(0)

更改navigationController push和pop界面切换动画

摘要: For Push:MainView *nextView=[[MainView alloc] init];[UIView beginAnimations:nil context:NULL];[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];[UIView setAnimationDuration:0.75];[self.navigationController pushViewController:nextView animated:NO];[UIView setAnimationTransition:UIViewAnimatio. 阅读全文
posted @ 2013-10-21 13:56 jack_yan 阅读(373) 评论(0) 推荐(0)

线程访问外部数据

摘要: NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; initData(); __block int sum = 0; // Create a semaphore with 0 resource __block dispatch_semaphore_t sem = dispatch_semaphore_create(0); __blockdispatch_semaphore_t taskSem =dispatch_semaphore_create(0); // create dispatch semaphore d... 阅读全文
posted @ 2013-10-10 15:06 jack_yan 阅读(269) 评论(0) 推荐(0)

一步一步教你做ios推送

摘要: 最近在研究ios的推送问题,遇到了一些问题,最终整理了一下。放在这里和大家分享APNS的推送机制首先我们看一下苹果官方给出的对ios推送机制的解释。如下图Provider就是我们自己程序的后台服务器,APNS是Apple Push Notification Service的缩写,也就是苹果的推送服务器。上图可以分为三个阶段:第一阶段:应用程序的服务器端把要发送的消息、目的iPhone的标识打包,发给APNS。第二阶段:APNS在自身的已注册Push服务的iPhone列表中,查找有相应标识的iPhone,并把消息发送到iPhone。第三阶段:iPhone把发来的消息传递给相应的应用程序,并且按照 阅读全文
posted @ 2013-09-27 15:23 jack_yan 阅读(407) 评论(0) 推荐(0)

iPhone应用程序间传递数据

摘要: 前一篇简单的介绍了iPhone应用程序间通信,主要是通过在被调用应用的Info.plist中加入URL方案,在应用中通过openUrl来实现程序的调用。而应用程序间的数据传递则可以更具url来实现,例如我要在test应用中输入一个参数,将其传递给URLSchemeDemo中。则可以按照下面方法实现: NSString *temp = [NSString stringWithFormat:@"URLSchemeDemoapp:message=%@",self.message.text]; NSURL *url = [NSURL URLWithString:temp]; [[U 阅读全文
posted @ 2013-09-23 15:42 jack_yan 阅读(562) 评论(0) 推荐(1)

二、UITableView和它的亲戚们

摘要: 1. UITableView 参考:https://developer.apple.com/library/ios/#documentation/UIKit/Reference/UITableView_Class/Reference/Reference.html1) 初始化 UITableView对象– initWithFrame:style: // 代码生成方式,如果你在nib里加的tableview不需要使用这个方法2)配置TableView– dequeueReusableCellWithIdentifier: // 必须要实现的方法,与TableView同生同死style proper 阅读全文
posted @ 2013-09-10 09:27 jack_yan 阅读(332) 评论(0) 推荐(0)

创建和发布

摘要: http://www.adobe.com/cn/devnet/flash/articles/ios_tutorial_4_itunes.html 阅读全文
posted @ 2013-08-22 15:51 jack_yan 阅读(134) 评论(0) 推荐(0)

获取当前位置信息-ios

摘要: locationManager= [[CLLocationManager alloc] init];//位置管理器 locationManager.desiredAccuracy = kCLLocationAccuracyBest;//精度,设可而止 locationManager.delegate = self;//设置委托 locationManager.distanceFilter = 100.0f;//距离删选器 [locationManager startUpdatingLocation]; //启动位置管理器#pragma m... 阅读全文
posted @ 2013-08-15 13:47 jack_yan 阅读(273) 评论(0) 推荐(0)

将16进制颜色转换成UIColor-ios

摘要: -(UIColor *) hexStringToColor: (NSString *) stringToConvert{ NSString *cString = [[stringToConvert stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] uppercaseString]; // String should be 6 or 8 characters if ([cString length] < 6) return [UIColor blackCo... 阅读全文
posted @ 2013-08-13 16:07 jack_yan 阅读(198) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 20 下一页