随笔分类 -  iphone开发必知点

开发中常见的其他知识点
摘要:1.在自定Resources目录的localizables右键,选New file,然后选Resource想的Strings File文件点next,文件名定义为“Localizable.strings”,选择自己要保存的目录,创建2.选中Localizable.strings文件在右侧的工具面板点击“+”号键,分别添加English和Chinese,如图此时左侧的目录结构会变成系统对应的目录会生成两个对应的英文en.lproj和中文zh-Hans.lproj目录,以及对应的Localizable.strings文件如下:3.本地化Localizable.strings采用键值对列表的方式,本 阅读全文
posted @ 2012-09-29 13:00 月光的尽头 阅读(4831) 评论(0) 推荐(0)
摘要:一、应用图标ios3.2之前不支持在Info.plist文件里指定图标,需要遵循苹果图标命名规范,如下Icon.png 57x57 iphone 应用图标Icon@2x.png 114x114 iphone(Retina显示屏) 应用图标Icon-72.png 72x72 ipad 应用图标Icon-72@2x.png 144x144 ipad(Retina显示屏) 应用图标Icon-Small.png 29x29 iphone 系统设置和搜索结果图标I... 阅读全文
posted @ 2012-09-28 19:14 月光的尽头 阅读(11872) 评论(0) 推荐(0)
摘要:纹理填充只要几个像素的小图UIView *testView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 200, 50)];testView.backgroundColor = [UIColor colorWithPatternImage: [UIImage imageNamed:@"纹理图片.png"]]; 阅读全文
posted @ 2012-08-18 00:00 月光的尽头 阅读(489) 评论(0) 推荐(0)
摘要:前提是调试或发布时,证书已经启动了push服务1.注册远程通知类型UIRemoteNotificationType apn_type = (UIRemoteNotificationType)(UIRemoteNotificationTypeAlert|UIRemoteNotificationTypeSound|UIRemoteNotificationTypeBadge);[[UIApplication sharedApplication] registerForRemoteNotificationTypes:apn_type]; 2.实现appDelegate的委托方法- (void)appl 阅读全文
posted @ 2012-07-12 14:54 月光的尽头 阅读(3608) 评论(0) 推荐(0)
摘要:当app重新打开或切换到前台时,在app委托applicationWillEnterForeground:方法里实现清除泡泡计数- (void)applicationWillEnterForeground:(UIApplication *)application{ // clear badage [[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];}在app被激活时,设置泡泡计数- (void)applicationDidBecomeActive:(UIApplication *)applicati... 阅读全文
posted @ 2012-07-12 13:06 月光的尽头 阅读(526) 评论(0) 推荐(0)
摘要:1.开发平台路径:/Developer/Platforms此路径下一般有三个目录,分别是mac电脑、模拟器、iphone真机MacOSX.platform iPhoneSimulator.platformiPhoneOS.platform每个目录下都有一个/Developer/usr/bin目录,放置开发中需要的程序总的目录比如:/Developer/Platforms/*/Developer/usr/bin/注意:*代表上面上个目录中的一个,具体是哪个看目标平台的需求2.模拟器路径:/Developer/Platforms/iPhoneSimulator.platform/De... 阅读全文
posted @ 2012-03-02 12:29 月光的尽头