自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(145)
  • 收藏
  • 关注

原创 mac eclipse 出现java.lang.NullPointerException问题的解决方法

打开proj.android目下的.cproject,将下面的这段section删除掉。<cconfigurationid="0.1230402123.1377291156"><storageModulebuildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider"id="0.123...

2014-12-09 15:29:12 621

原创 Mac eclipse android编译cocos1.0preview遇到问题解决。

http://blog.csdn.net/kafeidev/article/details/407395251、编译遇到下面问题 [plain] view plaincopyprint? **** Build of configuration Release for project test3 ****    python /Users/yange...

2014-12-09 09:16:46 217

原创 总结Cocos2d-x 3.x版本的一些变化

http://cn.cocos2d-x.org/tutorial/show?id=1569

2014-11-14 23:44:23 215

原创 C++ 11 Lambda表达式

http://www.cnblogs.com/hujian/archive/2012/02/14/2350306.html

2014-11-14 23:43:46 134

原创 IOS7 获取字符串在指定宽度内所需的高度。

    UIFont* font = [UIFontiOS7SystemFontOfSize:17weight:UI7FontWeightLight];    CGRect rect = [self.introStringboundingRectWithSize:CGSizeMake(self.view.$width-20, 1000)                          ...

2014-10-04 17:43:22 162

原创 XCode工程内多Targets教程

原帖地址  http://www.cocoachina.com/bbs/read.php?tid-10972-fpage-0-toread--page-1.html    相信很多人都注意到XCode中, 有个Target的概念. 这在很多地方都有所体现, 比如打开一个工程后, 左侧的列表中有Targets一项, 而在工程界面的顶部菜单中, project里面也有多个涉及到Target的项目, ...

2014-08-11 09:20:52 105

原创 ios google map sdk 移动google logo方法

    UIEdgeInsets mapInsets = UIEdgeInsetsMake(0.0, 160.0, 0.0, 0);     mapView.padding = mapInsets;

2014-07-03 10:06:00 153

原创 iOS7 Custom UITabBarController

http://blog.csdn.net/u014084081/article/details/21539087,iPhone不能分类的

2014-07-02 16:57:31 98

原创 [CALayer release]: message sent to deallocated instance iOS内存过度释放问题

http://www.cnblogs.com/cocoajin/p/3534771.html  http://www.cnblogs.com/cocoajin/p/3534771.html  

2014-06-24 16:30:34 160

原创 Determine device (iPhone, iPod Touch) with iPhone SDK

- (NSString *) platformString{ NSString *platform = [self platform]; if ([platform isEqualToString:@"iPhone1,1"]) return @"iPhone 1G"; if ([platform isEqualToString:@"iPhone1,2"]...

2014-05-01 19:57:42 147

原创 how-to-detect-and-handle-http-status-codes-in-uiwebviews

@interface ViewController () <UIWebViewDelegate, NSURLConnectionDataDelegate>@property (nonatomic) BOOL validatedRequest;@property (nonatomic, strong) NSURL *originalUrl;@end@impl...

2014-04-16 00:03:11 116

原创 appstore 网址 相关

获取某个app的网址,格式:https://itunes.apple.com/app/id812668884 获取开发者的所有app:itms-apps://itunes.com/apps/developerName, 如果develperName有空格,e(e.g. Development Company, LLC),那格式:itms-apps://itunes.com/apps/D...

2014-04-06 15:57:49 255

原创 ios7更改导航条颜色

Set UIViewControllerBasedStatusBarAppearance to NO.Call [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];

2014-03-24 11:14:29 142

原创 在Xcode项目中导入自定义的字体-

1. 将你的font的ttf文件导入到项目里。2. 找到项目的info.plist文件。 如果你没有手动修改过上述的文件,它的默认名字应该是[项目名]-info.plist3. 在该plist里添加一个新的项:Fonts provided by application4. 在里面的Item项里添加你的font文件的名字 使用的方法如下: [theLabel setFont:[UIFo...

2014-03-14 21:33:24 271

原创 how to use beginBackgroundTaskWithExpirationHandler

- (void) doUpdate { dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ [self beginBackgroundUpdateTask]; NSURLResponse * response = nil; ...

2013-12-21 16:05:58 98

原创 How to wait for iOS methods with completion-blocks to finish

http://omegadelta.net/2011/05/10/how-to-wait-for-ios-methods-with-completion-blocks-to-finish/    

2013-12-12 14:51:42 143

原创 检测文件属性(图片,视频或文本)

    NSString *file = @"http://192.168.119.222:8090/shzhserver/media/dcb289f1-d5d8-4fcd-a8eb-5ec10838d38f.mp4";    DLog(@"%@", [file pathExtension]);    CFStringRef fileExtension = (CFStringRef) [...

2013-12-10 17:17:51 227

原创 Cocos2d-x 缓存机制:预加载与重复使用

缓存在软硬件设计中是一个十分常见的优化方法,多用于高性能软硬件的设计。简单地说,缓存就是利用存储器的速度等级差异,将低速存储中使用频率高的内容加载到高速存储中,这样可以有效提高访问速度。比如将常用的图片资源从磁盘读到内存,将常用的程序段从内存搬到CPU的高速缓存中。 移动设备比较常用的是外存到内存的缓存。尽管大部分手机使用闪存作为外部存储已经比PC上磁盘的速度快得多,但相比内存而言还是差...

2013-11-26 11:38:42 249

原创 xcode 的project.pbxproj 的合并问题

打开project.pbxproj 手工删除了里面>>>head,===,<<<branch-name  

2013-11-19 17:10:32 137

原创 anchorPoint详解

http://ideveloper.co/understanding-the-anchor-point/     彻底理解position与anchorPointhttp://wonderffee.github.io/blog/2013/10/13/understand-anchorpoint-and-position/  eg fjfxt_ii typhoon mod...

2013-11-15 15:03:33 305

原创 NSAttributedString.h

*/UIKIT_EXTERN NSString *const NSFontAttributeName NS_AVAILABLE_IOS(6_0); // UIFont, default Helvetica(Neue) 12UIKIT_EXTERN NSString *const NSParagraphStyleAttributeName NS_AVAILA...

2013-10-30 14:25:40 107

原创 xcode5 Icon already includes gloss effects doesnot work解决方法

  如上图

2013-10-17 18:48:47 146

原创 iOS7 barTintColor & tintColor

        navBar.barTintColor = [UIColor blackColor];        navBar.tintColor = [UIColor blueColor]; IOS7 中barTintColor改变UINavigationBar导航条的颜色,tintColor改变左右按钮的字的颜色...

2013-10-07 22:08:41 174

原创 IOS7更改navbarcontroller后退按钮的颜色

-(BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions{[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];}

2013-09-22 15:23:56 100

原创 UITableViewStyleGrouped下自定义selectedBackgroundView

+(void)roundCorners:(UIRectCorner)corners forView:(UIView *)view { UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:view.bounds ...

2013-07-18 08:27:40 191

原创 使cocopods管理开源库编译出现Library not found for -lPods问题的解决方法

If Xcode complains when linking, e.g. Library not found for -lPods, it doesn't detect the implicit dependencies:Go to Product > Edit SchemeClick on BuildAdd the Pods static library, and m...

2013-07-08 17:23:26 207

原创 定位unrecognized selector sent to instance异常

 Unrecognized selector is an exception, and you can set a breakpoint on exceptions.In Xcode 4, go to the breakpoint navigator, click the +, and choose "Add Exception Breakpoint". Under Exception, ...

2013-06-13 09:13:15 98

原创 解决找不到msvcr100d.dll的问题

检查软件版本运行时提示丢失 msvcr100d.dll安装vc++ 2010 redistribution,还是提示丢失这个dll文件,拷贝也无用在网上查找后原来是********************************************************************************************** 在VC里面找设置,Prope...

2013-06-08 14:58:08 7082

原创 方便设置view的frame

Useview.x = 15;view.width = 167;instead ofCGRect newFrame = view.frame;newFrame.origin.x = 15;newFrame.size.width = 167;view.frame = newFrame;

2013-06-04 08:25:59 131

原创 IOS 如何获取当前设置的语言

NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSArray *languages = [defaults objectForKey:@"AppleLanguages"]; NSString *currentLanguage = [languages objectAtIndex:0];取得设置好的语言。。日语是j...

2013-05-27 14:20:29 159

原创 用私有framework监测手机使用的哪种类型的网络

用Class-dump工具dump目录/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/System/Library/PrivateFrameworks下的SoftwareUpdateServices.framework,发现有SUNetwor...

2013-05-27 10:31:52 95

原创 CString转wchar_t

CString str; wsprintf(wRes,L"%s". str.GetBuffer()) 

2013-05-08 09:44:34 1174

原创 vc获取程序的当前目录

wchar_t wpath_buffer[_MAX_PATH]; char drive[_MAX_DRIVE]; char dir[_MAX_DIR]; char fname[_MAX_FNAME]; char ext[_MAX_EXT]; GetModuleFileName(NULL, wpath_buffer, _MAX_PATH); char path_buf...

2013-05-07 17:19:16 122

原创 copying files from main bundle to documents folder

NSArray* resContents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:copyItemAtPath:sourcePath error:NULL];[resContents enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop)...

2013-04-23 16:20:30 130

原创 Building a Universal Framework for iOS

http://spin.atomicobject.com/2011/12/13/building-a-universal-framework-for-ios/    

2013-04-19 14:19:17 92

原创 利用xCode自动生成文档

http://kevin-wu.net/how-to-create-documentation-with-xcode/

2013-04-19 09:14:35 151

原创 将NSString类型的浮点数用 doubleValue方法转成浮点数有偏差的解决方法

NSNumberFormatter *formatter = [[[NSNumberFormatter alloc] init] autorelease]; [formatter setNumberStyle: NSNumberFormatterDecimalStyle]; double value = [[format...

2013-03-20 16:05:41 309

原创 统计代码函数

 find . "(" -name "*.m" -or -name "*.c" -or -name "*.cc" -name "*.cpp" -or -name "*.mm" -or -name "*.h"  -or -name "*.strings" ")" -print | xargs wc -l

2013-01-06 09:31:05 261

原创 用UIBezierPath给view添加阴影

        bgForListView.layer.shadowOffset = CGSizeZero;        bgForListView.layer.shadowRadius = 10.0f;        bgForListView.layer.shadowOpacity = 1.0f;        bgForListView.layer.shadowPath ...

2012-12-17 10:55:05 1001

原创 @dynamic 和@synthesize区别,@encode

 @dynamic 是相对于 @synthesize的,它们用样用于修饰 @property,用于生成对应的的getter和setter方法。但是@ dynamic表示这个成员变量的getter和setter方法并不是直接由编译器生成,而是手工生成或者运行时生成。示例如下:@implementation ClassName@synthesize aProperty, bProper...

2012-12-06 09:56:53 89

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除