随笔分类 -  移动开发系列

1 2 3 4 5 ··· 10 下一页
Windows Phone开发, Windows Mobile开发, Wince(Windows Embedded CE)开发, .NET Compact Framework开发, Native C++开发
摘要:使用了LLVM以后,终于可以定义私有的成员变量了。@interface RadioViewController (){@private UIBackgroundTaskIdentifier task;}@property (strong, nonatomic) AVPlayer *audioPlayer;@end请注意,在m文件的categories需要使用花括号({})@property还是需要定义在花括号的外面。这样在@implementation RadioViewController@end中间就可以自由的使用这个成员变量(field)task了。 阅读全文
posted @ 2013-03-03 12:18 Jake Lin 阅读(3817) 评论(0) 推荐(1) 编辑
摘要:讲述Android开发的一些个人想法。 阅读全文
posted @ 2013-01-25 10:28 Jake Lin 阅读(4512) 评论(11) 推荐(2) 编辑
摘要:之前使用TableView的时候都是继承UIViewController,然后继承两个delegate,如下面的代码。@interface SomeViewController : UIViewController <UITableViewDelegate, UITableViewDataSource>这篇文章《如何使用UITableView》讲述了我怎样使用TableView。最近想使用iOS6的 UIRefreshControl,不幸的是这个UIRefreshControl 只能使用在UITableViewController里面,不能支持UIViewController。Th 阅读全文
posted @ 2013-01-24 06:29 Jake Lin 阅读(6813) 评论(0) 推荐(1) 编辑
摘要:http://cocoapods.org/ 是一个用来管理Objective-C库的工具。可以通过http://cocoapods.org/看到如何安装和使用,只需要3步就可以开始使用,使用了cocoapods,我们就不用从github上分别下载不同的库。只需要在Podfile文件上编写需要使用的库就可以了。例如以下的文件。platform :iospod 'JSONKit', '~> 1.4'pod 'Reachability', '~> 3.0.0'但有时候会发现有些Pods的版本会低于github上的最新版本,可 阅读全文
posted @ 2013-01-15 06:16 Jake Lin 阅读(6421) 评论(0) 推荐(0) 编辑
摘要:在iOS5或者以上修改Navigation bar的颜色在AppDelegate.m里面的didFinishLaunchingWithOptions:方法加入以下的语句。- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ // Override point for customization after application launch. [[UINavigationBar appearance] setTint... 阅读全文
posted @ 2013-01-13 13:04 Jake Lin 阅读(1176) 评论(0) 推荐(0) 编辑
摘要:如果使用Xcode 4.5来新建项目,默认是支持AutoLayout的,但是AutoLayout是iOS 6的新特性,如果在iOS 5的simulator上运行程序,会出现Could not instantiate class named NSLayoutConstraint问题。解决方法是打开storyboard文件,去掉AutoLayout的选择。rob mayoff的神图一目了然。 阅读全文
posted @ 2013-01-13 08:43 Jake Lin 阅读(5054) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2013-01-07 18:35 Jake Lin 阅读(1838) 评论(2) 推荐(0) 编辑
摘要:在Xcode4.4和Xcode4.5里面如果使用@property定义属性,可以不需要在m文件里面写@synthesize,编译器会帮忙自动生成。http://raptureinvenice.com/an-open-letter-to-apple-please-kill-synthesize-in-ios-6/描述了一封至Apple的公开信,Apple还是在聆听社区的声音,Good。 阅读全文
posted @ 2013-01-05 20:49 Jake Lin 阅读(1346) 评论(0) 推荐(0) 编辑
摘要:在iOS6以后Orientation可以在plist文件里面进行设置。设置项是“Supported interface orientations”。如果在iOS5或者一下版本UIViewController类默认支持Portrait only,要支持其他Orientation,需要重写shouldAutorotateToInterfaceOrientation:方法。- (BOOL) shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation) orientation{ return UIInterfaceOrientati. 阅读全文
posted @ 2013-01-03 19:28 Jake Lin 阅读(1103) 评论(0) 推荐(0) 编辑
摘要:显示图片也有点绕,代码如下://生成一个NSURLnextDraw.imageUrl=[NSURLURLWithString:@"ddddd.png"relativeToURL:[NSURLURLWithString:@"http://ggggggggg.com/"]];//获取UIImage控件,可以是IBOutletUIImageView * imageNextDraw = (UIImageView *)[cell viewWithTag:103];//同步下载到NSDataNSData* data = [NSData dataWithContent 阅读全文
posted @ 2013-01-03 13:47 Jake Lin 阅读(4039) 评论(0) 推荐(0) 编辑
摘要:使用UITableView,可以直接拖动Table View Controller,这样会生成一堆模板代码,往你们填就行了,但是有时候不能直接这样拉,例如已经有一个UIView(可能在Navigation View或者Tabbed View里面)想在上面添加Table View。下面是步骤。1.先把Table View控件拉到UIView中。2.做一个connection绑定,把这个Table View绑定到UIOutlet。确认h文件包含了@property,而m文件包含@synthesize。3.把tableview的dataSource和delegate绑定(connections)到U 阅读全文
posted @ 2013-01-01 18:36 Jake Lin 阅读(1598) 评论(0) 推荐(0) 编辑
摘要:iOS的程序是通过MVC来解耦的,因此界面(nib或者storyboard)与Controller直接是通过connection来进行连接,例如一个按钮连接IBAction,一个Label连接IBOutlet等等,但是这样导致修改(或者说重构的改名)不方便,最后还是把connection删掉重写再建一个,步骤很简单,但是没有人告诉的情况下还是找了一阵子,记下来免得以后不记得。1.打开storyboard,然后在connection inspector,点击删除X按钮删掉。2.删掉相关Controller.h的property的定义。3.删除相关Controller.m的@synthesize( 阅读全文
posted @ 2013-01-01 12:13 Jake Lin 阅读(2745) 评论(0) 推荐(0) 编辑
摘要:为不同的列设置间隔颜色(alternate color),可以方便用户观看app的内容,在UTTableView中设置间隔颜色需要重写下面的willDisplayCell:forRowAtIndexPath方法- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { if( [indexPath row] % 2) { [cell setBackgroundColor:[UIColorwhi... 阅读全文
posted @ 2012-12-29 13:20 Jake Lin 阅读(823) 评论(0) 推荐(0) 编辑
摘要:下面是三种语言的写法,Objective-C和JavaScript是一样的,与C#不一样。JSfor(var property in object) object[property];C#foreach(var o in dictionary) o.Value, o.Key;Objective-Cfor(id key in dictionary) dictionary[key];Objective-C与C#的区别是一个是key,一个是pair;其实了解了以后操作都非常简单,但是一开始有点绕。 阅读全文
posted @ 2012-12-26 12:52 Jake Lin 阅读(754) 评论(1) 推荐(0) 编辑
摘要:尝试Agile的方式来写博客。本文主要覆盖以下两个故事。故事一:作为一个没有开发过云计算平台的读者,我希望通过阅读本文可以了解云计算的概况。故事二:作为没有开发过Azure的读者,我希望通过阅读本文可以创建第一个Azure Web Role应用。 阅读全文
posted @ 2012-04-08 10:45 Jake Lin 阅读(3950) 评论(13) 推荐(9) 编辑
摘要:之前做了一个MSDN中文Webcast app。当时是为了参加Windows Phone Mango大赛而编写的,因此设想很多Mango的新功能,后来给炮灰了。第一个版本大概花了10到15天的业余时间进行开发。后来又用了大概2,3周业余时间更新,完成了基本功能。这个app提交了以后一直没有怎么维护,也没有做推广。这里的推广是指连论坛发贴神马的,不是指刷榜什么的。如果对app store有了解,中国区好多app都是靠刷榜什么的,国外的app dev聚会的时候一般聊聊创意,开发的问题什么的。国内的app开发者大会,有些演讲者直言不讳的说要了解app store的排名算法,花多少钱推广神马的。当然国外的app也推广,而且刷榜这事绝非中国人发明的,但在中国发挥到极致。我当时做这个app是想借参赛的机会学习和大量应用mango的新功能,后来发现还是能帮到别人,也有一些人下载使用的。 阅读全文
posted @ 2012-04-05 15:04 Jake Lin 阅读(3989) 评论(20) 推荐(8) 编辑
摘要:本文讲述本人在开发Windows 8 Metro app过程中的一些想法与经验。C#, XAML, C++, HTML5神马的。 阅读全文
posted @ 2012-03-27 09:43 Jake Lin 阅读(28571) 评论(42) 推荐(24) 编辑
摘要:在我看来数据绑定是XAML类程序(WPF,Silverlight,WP7,Windows8)最最关键的概念,也是MVVM模式的基础,如果一位开发者在开发XAML类程序时并没有用上数据绑定,那么我觉得他/她还没有掌握开发XAML类程序的能力。数据绑定可以说每个XAML类程序开发者必须掌握的基本技能之一。下面是《数据绑定》样章的一部分,如果觉得翻译的不错而且条件许可,请购买正版书,谢谢您为中国文化事业的贡献。如果觉得有问题请指出,我们会总结堪错列表,谢谢! 阅读全文
posted @ 2012-01-06 15:21 Jake Lin 阅读(4613) 评论(22) 推荐(8) 编辑
摘要:本文讲述Windows Phone在空闲状态下是否保持网络链接,有哪些情况会保持链接。 阅读全文
posted @ 2011-10-28 16:21 Jake Lin 阅读(4740) 评论(13) 推荐(9) 编辑
摘要:期待已久的Windows Phone 7.1 Mango ROM 终于有了developer测试版。本文讲述安装方法。 阅读全文
posted @ 2011-06-30 12:49 Jake Lin 阅读(6688) 评论(64) 推荐(3) 编辑

1 2 3 4 5 ··· 10 下一页