摘要:Delete .svn folders on your Mac Sometimes you need to get rid of .svn hidden folders on your Mac. In my case it was about resyncing my local working copy with client subversion repository. Everything was broken at both ends. A couple of terminal commands to get rid of unneeded svn tracks: cd /some/o
阅读全文
摘要:UIImageView *imageview = [[UIImageView alloc] initWithFrame:CGRectMake(1, 1, 66.0f, 76.0f)]; imageview.tag=1; [imageview setImage:img]; imageview.layer.shadowColor=[UIColor blackColor].CGColor; imageview.userInteractionEnabled=YES; imageview.layer.shadowOpacity=0.5; imageview.layer.shadowOffset = CG
阅读全文
摘要:NSDecimalNumber 是NSNumber的子类。
使用 [NSNumber numberWithDouble:]方法来格式我的NSNumber,但是,由于一些值比较大,我想要用科学计数法来表示。
NSDecimalNumber就提供了科学计数法的表示方法。
什么是科学计数法? 将一个数字表示成 (a×10的n次幂的形式),其中1≤a<10,n表示整数,这种记数方法叫科学记数法。 用幂的形式,有时可以方便的表示日常生活中遇到的一些较大的数,如:光的速度大约是300 000 000米/秒;全世界人口数大约是:6 100 000 000 这样的大数,读、写都很不方便,考虑到10的
阅读全文
摘要:iPhone下的图形框架并不是很多。其中比较知名的就两个s7graphview和Core Plot。巧的是两个都是Google的。前者使用简单,但功能单一,只能画曲线图。后者是开源项目,项目仍在不断更新中,用起来可就复杂多了,而且各个版本会有差异,包括属性、方法,甚至是类名都有改变。 关于Core Plot使用的中文网上资料,不是缺乏,而是根本没有。唯一的一篇介绍得比较详细的文章是“Using Core Plot in an iPhone Application”, 原文是英文的:http://www.switchonthecode.com/tutorials/using-core-plot-
阅读全文
摘要:http://blog.carbonfive.com/2011/04/04/using-open-source-static-libraries-in-xcode-4/
阅读全文
摘要:为了代码保密或者代码重用等等原因需要把现有的代码打包放入静态库中,这也是静态库的好处,所以今天一天都在研究如何用xcode 4创建静态库,也是为了我们的项目需要。QQ发布的微博SDK会报错,也是因为没有把静态库打包为unniver static libraries的原因,至于是什么是unniver static libraries,大家可以google一下。(http://blog.boreal-kiss.net/2011/03/15/how-to-create-universal-static-libraries-on-xcode-4/)下面是创建静态库的方法1.xcode-create p
阅读全文
摘要:在程序中关闭iPhone JUL 首先在程序中引用 #include 然后使用 reboot(RB_HALT); 就可以直接将iPhone关机。
阅读全文
摘要:iPhone的特殊URL JUL 在iPhone中,可以直接用UIApp打开URL地址。如下所示: [ UIApp openURL: [ NSURL URLWithString:@"http://www.apple.com" ] ]; 或者: [ UIApp openURL: [ NSURL URLWithString:@"mailto:apple@mac.com?Subject=hello" ] ]; 与此同时,iPhone还包含一些其他除了http://或者mailto:之外的URL: sms:// 可以调用短信程序 tel:// 可以拨打电话 it
阅读全文
摘要:[[UIApplication sharedApplication] setStatusBarStyle: UIStatusBarStyleBlackOpaque];self.navigationController.navigationBar.translucent = YES;[self.navigationController.view setNeedsLayout];self.wantsFullScreenLayout = YES;
阅读全文
摘要:UIAlertView的动画效果实现代码首先要加入QuartzCore.frameworkp.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #ce3124}p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px}p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo}p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font:
阅读全文
摘要:Instagram 代码背后的免费午餐(续)我之前的一篇博客详细介绍了 Instagram 代码使用过的所有开源项目。巧的是,昨晚Hacker News热榜也出现了篇类似的博文。看来全世界的 iOS 开发者都挺关心这些开源项目的。结合 Hacker News 这篇博文的内容,我继续来作些补充。1. MBProgressHUD , ASIHttpRequest , JSON Framework , 这三个太有名了,上篇博客里也介绍过。4.Flurry – Detailed Usage Statistics (免费 SDK 下载) ,针对 iOS 平台的 Analytics 工具。一般来说,国内开
阅读全文
摘要:UIScrollView UITableView 上拉 上提 刷新 代码下面是.h文件的代码////EGORefreshTableHeaderView.h//Demo////Created by Devin Doty on 10/14/09October14.//Copyright 2009 enormego. All rights reserved.////修改人:禚来强 iphone开发qq群:79190809 邮箱:zhuolaiqiang@gmail.com//原文地址:http://blog.csdn.net/diyagoanyhacker/archive/2011/05/24/64
阅读全文
摘要:controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; [self presentModalViewController:controller animated:animated];
阅读全文
摘要:p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 20.0px; font: 14.0px Consolas; color: #ff605d}p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 20.0px; font: 14.0px Consolas; color: #101010}p.p3 {margin: 0.0px 0.0px 17.0px 0.0px; line-height: 23.0px; font: 17.0px 'Helvetica Neue Light'
阅读全文