博客园 - Jake Linuuid:24b78886-0ed1-41c2-8670-e3f31dcf42c4;id=1831752013-03-03T04:18:21ZJake Linhttps://www.cnblogs.com/procoder/feed.cnblogs.comhttps://www.cnblogs.com/procoder/archive/2013/03/03/private_field_in_Objective_C.html在Objective C中定义私有的成员变量 - Jake Lin使用了LLVM以后,终于可以定义私有的成员变量了。@interface RadioViewController (){@private UIBackgroundTaskIdentifier task;}@property (strong, nonatomic) AVPlayer *audioPlayer;@end请注意,在m文件的categories需要使用花括号({})@property还是需要定义在花括号的外面。这样在@implementation RadioViewController@end中间就可以自由的使用这个成员变量(field)task了。2013-03-03T04:18:00Z2013-03-03T04:18:00ZJake Linhttps://www.cnblogs.com/procoder/【摘要】使用了LLVM以后,终于可以定义私有的成员变量了。@interface RadioViewController (){@private UIBackgroundTaskIdentifier task;}@property (strong, nonatomic) AVPlayer *audioPlayer;@end请注意,在m文件的categories需要使用花括号({})@property还是需要定义在花括号的外面。这样在@implementation RadioViewController@end中间就可以自由的使用这个成员变量(field)task了。 <a href="https://www.cnblogs.com/procoder/archive/2013/03/03/private_field_in_Objective_C.html" target="_blank">阅读全文</a>https://www.cnblogs.com/procoder/archive/2013/02/04/2891297.html解决Azure “Failed to start Storage Emulator: the SQL Server instance `.\' could not be found.” - Jake Lin由于Windows 8不支持SQL Server 2008R2.(严格来说是通过.NET程序在连接SQL Server 2008R2数据库是有错误) 那我不得不安装SQL Server 2012. 当安装完毕以后,Azure Storage Emulator启动不了,提示以下错误。 The storage emulator had an unexpected error: Unable...2013-02-03T22:18:00Z2013-02-03T22:18:00ZJake Linhttps://www.cnblogs.com/procoder/【摘要】由于Windows 8不支持SQL Server 2008R2.(严格来说是通过.NET程序在连接SQL Server 2008R2数据库是有错误) 那我不得不安装SQL Server 2012. 当安装完毕以后,Azure Storage Emulator启动不了,提示以下错误。 The storage emulator had an unexpected error: Unable... <a href="https://www.cnblogs.com/procoder/archive/2013/02/04/2891297.html" target="_blank">阅读全文</a>https://www.cnblogs.com/procoder/archive/2013/01/25/from-Windows-To-Android-dev.html从Windows到Android开发 - Jake Lin讲述Android开发的一些个人想法。2013-01-25T02:28:00Z2013-01-25T02:28:00ZJake Linhttps://www.cnblogs.com/procoder/【摘要】讲述Android开发的一些个人想法。 <a href="https://www.cnblogs.com/procoder/archive/2013/01/25/from-Windows-To-Android-dev.html" target="_blank">阅读全文</a>https://www.cnblogs.com/procoder/archive/2013/01/24/UITableViewController_vs_UIViewController_with_UITableView.htmlUITableViewController与UIViewController中使用UITableView - Jake Lin之前使用TableView的时候都是继承UIViewController,然后继承两个delegate,如下面的代码。@interface SomeViewController : UIViewController <UITableViewDelegate, UITableViewDataSource>这篇文章《如何使用UITableView》讲述了我怎样使用TableView。最近想使用iOS6的 UIRefreshControl,不幸的是这个UIRefreshControl 只能使用在UITableViewController里面,不能支持UIViewController。Th2013-01-23T22:29:00Z2013-01-23T22:29:00ZJake Linhttps://www.cnblogs.com/procoder/【摘要】之前使用TableView的时候都是继承UIViewController,然后继承两个delegate,如下面的代码。@interface SomeViewController : UIViewController <UITableViewDelegate, UITableViewDataSource>这篇文章《如何使用UITableView》讲述了我怎样使用TableView。最近想使用iOS6的 UIRefreshControl,不幸的是这个UIRefreshControl 只能使用在UITableViewController里面,不能支持UIViewController。Th <a href="https://www.cnblogs.com/procoder/archive/2013/01/24/UITableViewController_vs_UIViewController_with_UITableView.html" target="_blank">阅读全文</a>https://www.cnblogs.com/procoder/archive/2013/01/15/2860894.html解决An attempt was made to load a program with an incorrect format.问题 - Jake Lin有一个项目使用到Oracle Client,然后部署的时候出现以下问题。 Could not load file or assembly '*******' or one of its dependencies. An attempt was made to load a program with an incorrect format.由于Oracle Client提供的DLL是32位的,因此...2013-01-15T03:43:00Z2013-01-15T03:43:00ZJake Linhttps://www.cnblogs.com/procoder/【摘要】有一个项目使用到Oracle Client,然后部署的时候出现以下问题。 Could not load file or assembly '*******' or one of its dependencies. An attempt was made to load a program with an incorrect format.由于Oracle Client提供的DLL是32位的,因此... <a href="https://www.cnblogs.com/procoder/archive/2013/01/15/2860894.html" target="_blank">阅读全文</a>https://www.cnblogs.com/procoder/archive/2013/01/15/2860771.html在Heroku上部署Node.js - Jake Linhttps://devcenter.heroku.com/articles/nodejs 这篇文章讲述很清楚,只需要几步就可以建立一个node.js项目,并部署到Heroku上面.2013-01-15T02:55:00Z2013-01-15T02:55:00ZJake Linhttps://www.cnblogs.com/procoder/【摘要】https://devcenter.heroku.com/articles/nodejs 这篇文章讲述很清楚,只需要几步就可以建立一个node.js项目,并部署到Heroku上面. <a href="https://www.cnblogs.com/procoder/archive/2013/01/15/2860771.html" target="_blank">阅读全文</a>https://www.cnblogs.com/procoder/archive/2013/01/15/2860733.html重命名Heroku的app - Jake Lin如果在Heroku.com的网站上重命名app,不会自动同步到开发机的*.git文件中,需要手工重命名。 $ git remote rm heroku$ heroku git:remote -a newnamenewname是新的app名字。可以参考https://devcenter.heroku.com/articles/renaming-apps2013-01-15T02:36:00Z2013-01-15T02:36:00ZJake Linhttps://www.cnblogs.com/procoder/【摘要】如果在Heroku.com的网站上重命名app,不会自动同步到开发机的*.git文件中,需要手工重命名。 $ git remote rm heroku$ heroku git:remote -a newnamenewname是新的app名字。可以参考https://devcenter.heroku.com/articles/renaming-apps <a href="https://www.cnblogs.com/procoder/archive/2013/01/15/2860733.html" target="_blank">阅读全文</a>https://www.cnblogs.com/procoder/archive/2013/01/15/how-to-get-updated-version-of-pods-on-cocoapods.html如何在cocoapods中使用更新版本的pod - Jake Linhttp://cocoapods.org/ 是一个用来管理Objective-C库的工具。可以通过http://cocoapods.org/看到如何安装和使用,只需要3步就可以开始使用,使用了cocoapods,我们就不用从github上分别下载不同的库。只需要在Podfile文件上编写需要使用的库就可以了。例如以下的文件。platform :iospod 'JSONKit', '~> 1.4'pod 'Reachability', '~> 3.0.0'但有时候会发现有些Pods的版本会低于github上的最新版本,可2013-01-14T22:16:00Z2013-01-14T22:16:00ZJake Linhttps://www.cnblogs.com/procoder/【摘要】http://cocoapods.org/ 是一个用来管理Objective-C库的工具。可以通过http://cocoapods.org/看到如何安装和使用,只需要3步就可以开始使用,使用了cocoapods,我们就不用从github上分别下载不同的库。只需要在Podfile文件上编写需要使用的库就可以了。例如以下的文件。platform :iospod 'JSONKit', '~> 1.4'pod 'Reachability', '~> 3.0.0'但有时候会发现有些Pods的版本会低于github上的最新版本,可 <a href="https://www.cnblogs.com/procoder/archive/2013/01/15/how-to-get-updated-version-of-pods-on-cocoapods.html" target="_blank">阅读全文</a>https://www.cnblogs.com/procoder/archive/2013/01/13/ios5-Change-Navigation-bar-color.html在iOS5或者以上修改Navigation bar的颜色 - Jake Lin在iOS5或者以上修改Navigation bar的颜色在AppDelegate.m里面的didFinishLaunchingWithOptions:方法加入以下的语句。- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ // Override point for customization after application launch. [[UINavigationBar appearance] setTint...2013-01-13T05:04:00Z2013-01-13T05:04:00ZJake Linhttps://www.cnblogs.com/procoder/【摘要】在iOS5或者以上修改Navigation bar的颜色在AppDelegate.m里面的didFinishLaunchingWithOptions:方法加入以下的语句。- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ // Override point for customization after application launch. [[UINavigationBar appearance] setTint... <a href="https://www.cnblogs.com/procoder/archive/2013/01/13/ios5-Change-Navigation-bar-color.html" target="_blank">阅读全文</a>https://www.cnblogs.com/procoder/archive/2013/01/13/Could-not-instantiate-class-named-NSLayoutConstraint.htmliOS 5解决Could not instantiate class named NSLayoutConstraint问题 - Jake Lin如果使用Xcode 4.5来新建项目,默认是支持AutoLayout的,但是AutoLayout是iOS 6的新特性,如果在iOS 5的simulator上运行程序,会出现Could not instantiate class named NSLayoutConstraint问题。解决方法是打开storyboard文件,去掉AutoLayout的选择。rob mayoff的神图一目了然。2013-01-13T00:43:00Z2013-01-13T00:43:00ZJake Linhttps://www.cnblogs.com/procoder/【摘要】如果使用Xcode 4.5来新建项目,默认是支持AutoLayout的,但是AutoLayout是iOS 6的新特性,如果在iOS 5的simulator上运行程序,会出现Could not instantiate class named NSLayoutConstraint问题。解决方法是打开storyboard文件,去掉AutoLayout的选择。rob mayoff的神图一目了然。 <a href="https://www.cnblogs.com/procoder/archive/2013/01/13/Could-not-instantiate-class-named-NSLayoutConstraint.html" target="_blank">阅读全文</a>https://www.cnblogs.com/procoder/archive/2013/01/11/heroku-quick-start.html四步开始使用Heroku - Jake Lin这篇文章讲述很清楚https://devcenter.heroku.com/articles/quickstart只需要四步:1.注册Sign up for a Heroku account。2.下载安装Heroku Toolbelt,其包含了git客户端(如果是windows的话,其他版本不清楚,例如Mac本身就有git了)。3.登录$ heroku loginEnter your Heroku credentials.Email: adam@example.comPassword: Could not find an existing public key.Would you like t2013-01-11T02:27:00Z2013-01-11T02:27:00ZJake Linhttps://www.cnblogs.com/procoder/【摘要】这篇文章讲述很清楚https://devcenter.heroku.com/articles/quickstart只需要四步:1.注册Sign up for a Heroku account。2.下载安装Heroku Toolbelt,其包含了git客户端(如果是windows的话,其他版本不清楚,例如Mac本身就有git了)。3.登录$ heroku loginEnter your Heroku credentials.Email: adam@example.comPassword: Could not find an existing public key.Would you like t <a href="https://www.cnblogs.com/procoder/archive/2013/01/11/heroku-quick-start.html" target="_blank">阅读全文</a>https://www.cnblogs.com/procoder/archive/2013/01/10/Azure-COULD-NOT-LOAD-FILE-OR-ASSEMBLY.html解决Azure中COULD NOT LOAD FILE OR ASSEMBLY问题 - Jake Lin当把Web项目部署到Azure的时候,有时候会出现COULD NOT LOAD FILE OR ASSEMBLY的问题。这样问题一般是由于某些依赖的Assembly的版本不对导致的,例如在开发机上可能同时安装了MVC 3和MVC4。那么开发机不会出现问题,因为可以找到相应的Assembly。但是部署到Azure后就出现了依赖文件的问题。例如问题如下: "COULD NOT LOAD FILE O...2013-01-10T04:08:00Z2013-01-10T04:08:00ZJake Linhttps://www.cnblogs.com/procoder/【摘要】当把Web项目部署到Azure的时候,有时候会出现COULD NOT LOAD FILE OR ASSEMBLY的问题。这样问题一般是由于某些依赖的Assembly的版本不对导致的,例如在开发机上可能同时安装了MVC 3和MVC4。那么开发机不会出现问题,因为可以找到相应的Assembly。但是部署到Azure后就出现了依赖文件的问题。例如问题如下: "COULD NOT LOAD FILE O... <a href="https://www.cnblogs.com/procoder/archive/2013/01/10/Azure-COULD-NOT-LOAD-FILE-OR-ASSEMBLY.html" target="_blank">阅读全文</a>https://www.cnblogs.com/procoder/archive/2013/01/09/Azure-The-copy-of-Windows-is-not-genuine.htmlThe copy of Windows is not genuine-微软自己用盗版 - Jake LinThe copy of Windows is not genuine.别以为我在用盗版,这是微软自己的Azure平台,我远程登录进去,发现这么有趣的一件事。2013-01-09T03:48:00Z2013-01-09T03:48:00ZJake Linhttps://www.cnblogs.com/procoder/【摘要】The copy of Windows is not genuine.别以为我在用盗版,这是微软自己的Azure平台,我远程登录进去,发现这么有趣的一件事。 <a href="https://www.cnblogs.com/procoder/archive/2013/01/09/Azure-The-copy-of-Windows-is-not-genuine.html" target="_blank">阅读全文</a>https://www.cnblogs.com/procoder/archive/2013/01/09/Azure-RDP-certificate.htmlAzure:不能把同一个certificate同时用于Azure Management和RDP - Jake Lin当我尝试deploy Azure pakeage的时候,我得到The certificate with thumbprint was not found错误信息。 为了偷懒,我使用了同一个certificate来做RDP。 解决这个问题,在设置RDP的时候需要新建一个证书, 一, Management Authenticate证书 在Create or select an exist...2013-01-09T00:04:00Z2013-01-09T00:04:00ZJake Linhttps://www.cnblogs.com/procoder/【摘要】当我尝试deploy Azure pakeage的时候,我得到The certificate with thumbprint was not found错误信息。 为了偷懒,我使用了同一个certificate来做RDP。 解决这个问题,在设置RDP的时候需要新建一个证书, 一, Management Authenticate证书 在Create or select an exist... <a href="https://www.cnblogs.com/procoder/archive/2013/01/09/Azure-RDP-certificate.html" target="_blank">阅读全文</a>https://www.cnblogs.com/procoder/archive/2013/01/09/azure-configuration-files.html解决Azure publish “the remote desktop configuration was not generated by windows azure Tools”问题 - Jake Lin在publish的时候,如果想使用Remote Desktop有时候会出现“the remote desktop configuration was not generated by windows azure Tools”问题。这是因为我们曾经手动的改动配置文件导致的。但是由于做CI Build,因此配置文件是根据环境来生成的,所以必须面对手工修改(其实也是程序生成)文件的问题。对于这个问题,可以通过下面的步骤来解决:1. 打开ServiceDefinition.csdef文件,把下面的代码全部删除。 <Import moduleName="RemoteAccess"2013-01-08T22:31:00Z2013-01-08T22:31:00ZJake Linhttps://www.cnblogs.com/procoder/【摘要】在publish的时候,如果想使用Remote Desktop有时候会出现“the remote desktop configuration was not generated by windows azure Tools”问题。这是因为我们曾经手动的改动配置文件导致的。但是由于做CI Build,因此配置文件是根据环境来生成的,所以必须面对手工修改(其实也是程序生成)文件的问题。对于这个问题,可以通过下面的步骤来解决:1. 打开ServiceDefinition.csdef文件,把下面的代码全部删除。 <Import moduleName="RemoteAccess" <a href="https://www.cnblogs.com/procoder/archive/2013/01/09/azure-configuration-files.html" target="_blank">阅读全文</a>https://www.cnblogs.com/procoder/archive/2013/01/08/Storyboards-are-unavailable-on-iOS-43-and-prior.htmlXcode 4.5解决Storyboards are unavailable on iOS 4.3 and prior问题 - Jake Lin如果在使用Xcode 4.5,刚刚碰到Storyboards are unavailable on iOS 4.3 and prior问题,可以通过以下简单的步骤进行解决。右键****.storyboard文件,选择Open As -> Source Code找出并删除<deploymentversion>,在我的文件中是<deploymentversion="4500"identifier="xcode"/>shift + cmd + K来clean projectcmd + B 来Build project问题解决。2013-01-08T10:25:00Z2013-01-08T10:25:00ZJake Linhttps://www.cnblogs.com/procoder/【摘要】如果在使用Xcode 4.5,刚刚碰到Storyboards are unavailable on iOS 4.3 and prior问题,可以通过以下简单的步骤进行解决。右键****.storyboard文件,选择Open As -> Source Code找出并删除<deploymentversion>,在我的文件中是<deploymentversion="4500"identifier="xcode"/>shift + cmd + K来clean projectcmd + B 来Build project问题解决。 <a href="https://www.cnblogs.com/procoder/archive/2013/01/08/Storyboards-are-unavailable-on-iOS-43-and-prior.html" target="_blank">阅读全文</a>https://www.cnblogs.com/procoder/archive/2013/01/08/parse-com.html一个跨设备的云数据平台parse.com - Jake Lin这是一个云数据平台,其包含了几个产品,Parse Data,Parse Push,Parse Social和Cloud Code。顾名思义,Parse Data用于存储数据,其支持把不同设备的数据同步存储到Cloud中。目前基本支持所有主流的设备。使用也非常方便,例如下面的代码:iOSOS XPFObject *testObject = [PFObject objectWithClassName:@"TestObject"];[testObject setObject:@"bar" forKey:@"foo"];[testObject2013-01-08T01:38:00Z2013-01-08T01:38:00ZJake Linhttps://www.cnblogs.com/procoder/【摘要】这是一个云数据平台,其包含了几个产品,Parse Data,Parse Push,Parse Social和Cloud Code。顾名思义,Parse Data用于存储数据,其支持把不同设备的数据同步存储到Cloud中。目前基本支持所有主流的设备。使用也非常方便,例如下面的代码:iOSOS XPFObject *testObject = [PFObject objectWithClassName:@"TestObject"];[testObject setObject:@"bar" forKey:@"foo"];[testObject <a href="https://www.cnblogs.com/procoder/archive/2013/01/08/parse-com.html" target="_blank">阅读全文</a>https://www.cnblogs.com/procoder/archive/2013/01/07/iOS-storyboard.htmlStoryboard只支持iOS5.0或者以上的版本 - Jake LinApple的文档表明storyboard只支持iOS5.0或者以上的版本,网上有好多关于如何在iOS4.3或者以下的版本上使用storyboard的提问,反正看了这个文档可以死心了。Do you want your app to use storyboards?Storyboards simplify the design process by showing both the views and view controllers of your user interface and the transitions between them. Storyboards are supported2013-01-07T10:35:00Z2013-01-07T10:35:00ZJake Linhttps://www.cnblogs.com/procoder/【摘要】Apple的文档表明storyboard只支持iOS5.0或者以上的版本,网上有好多关于如何在iOS4.3或者以下的版本上使用storyboard的提问,反正看了这个文档可以死心了。Do you want your app to use storyboards?Storyboards simplify the design process by showing both the views and view controllers of your user interface and the transitions between them. Storyboards are supported <a href="https://www.cnblogs.com/procoder/archive/2013/01/07/iOS-storyboard.html" target="_blank">阅读全文</a>https://www.cnblogs.com/procoder/archive/2013/01/05/Xcode-sythesize.htmlXcode4.4以后定义@property时可以省去@synthesize - Jake Lin在Xcode4.4和Xcode4.5里面如果使用@property定义属性,可以不需要在m文件里面写@synthesize,编译器会帮忙自动生成。http://raptureinvenice.com/an-open-letter-to-apple-please-kill-synthesize-in-ios-6/描述了一封至Apple的公开信,Apple还是在聆听社区的声音,Good。2013-01-05T12:49:00Z2013-01-05T12:49:00ZJake Linhttps://www.cnblogs.com/procoder/【摘要】在Xcode4.4和Xcode4.5里面如果使用@property定义属性,可以不需要在m文件里面写@synthesize,编译器会帮忙自动生成。http://raptureinvenice.com/an-open-letter-to-apple-please-kill-synthesize-in-ios-6/描述了一封至Apple的公开信,Apple还是在聆听社区的声音,Good。 <a href="https://www.cnblogs.com/procoder/archive/2013/01/05/Xcode-sythesize.html" target="_blank">阅读全文</a>https://www.cnblogs.com/procoder/archive/2013/01/03/ios-orientations.htmliOS处理Orientation - Jake Lin在iOS6以后Orientation可以在plist文件里面进行设置。设置项是“Supported interface orientations”。如果在iOS5或者一下版本UIViewController类默认支持Portrait only,要支持其他Orientation,需要重写shouldAutorotateToInterfaceOrientation:方法。- (BOOL) shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation) orientation{ return UIInterfaceOrientati.2013-01-03T11:28:00Z2013-01-03T11:28:00ZJake Linhttps://www.cnblogs.com/procoder/【摘要】在iOS6以后Orientation可以在plist文件里面进行设置。设置项是“Supported interface orientations”。如果在iOS5或者一下版本UIViewController类默认支持Portrait only,要支持其他Orientation,需要重写shouldAutorotateToInterfaceOrientation:方法。- (BOOL) shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation) orientation{ return UIInterfaceOrientati. <a href="https://www.cnblogs.com/procoder/archive/2013/01/03/ios-orientations.html" target="_blank">阅读全文</a>