自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

liuxing8807_的专栏

在走向好的路上,我深深的体会到所做的第一件事就应该是不去做明知道是错而去做的事

  • 博客(29)
  • 资源 (10)
  • 收藏
  • 关注

原创 汉诺塔--递归经典

//// main.cpp// 递归2_汉诺塔//// Created by WeiZhen_Liu on 1/26/14.// Copyright (c) 2014 WeiZhen_Liu. All rights reserved.//#include using namespace std;void hanio(int n, char a, char b, cha

2014-01-26 15:37:01 584

原创 some url for learn

打印特殊字符问题:    http://stackoverflow.com/questions/14766169/codes-to-display-a-smiley-and-sad-face-in-c-console点击打开链接

2014-01-24 11:16:09 690

原创

#import #define TARGET_MY_TEST_2 6000int main(int argc, const char * argv[]){ @autoreleasepool { #if TARGET_MY_TEST_1 NSLog(@"1"); // no output #if TARGET_MY_TEST_2

2013-08-08 15:09:25 856

原创 iOS文件管理 NSFileManager NSFileHandle

http://liuxing8807.blog.163.com/blog/static/9703530520133413353291/http://www.cnblogs.com/jay-dong/archive/2013/01/21/2870414.html

2013-08-08 09:11:44 1185

原创 NSOperation/NSOperationQueue small demo

// ImageLoadOperation.h#import @interface ImageLoadOperation : NSOperation{ NSURL *_imageURL; id _target; SEL _action;}- (id)initWithImageURL:(NSURL *)imageURL target:(id)target ac

2013-08-06 16:19:08 1120

原创 沙盒目录下创建文件夹

查看沙盒方法:前往 -->  (按住option键) 资源库 --> Application Support --> iPhone Simulator --> ...在沙盒目录下创建文夹,可以用 - (BOOL)createDirectoryAtPath:(NSString *)path withIntermediateDirectories:(BOOL)createIntermedi

2013-08-06 16:02:29 1164

原创 removeObjectIdenticalTo

removeObjectIdenticalTo函数会移除数组中所有地址相同的元素//// main.m#import int main(int argc, const char * argv[]){ @autoreleasepool { NSNumber *num_1 = @1; NSNumber *num_2 = @2;

2013-08-06 15:25:42 1333

原创 UITableView代理方法的执行流程

just explain it with code:// ViewController.m#import "ViewController.h"@implementation ViewController- (void)viewDidLoad{ [super viewDidLoad]; _items = [[NSMutableArray alloc] in

2013-08-06 08:38:46 2169

原创 MD5 Hash NSURL

// ViewController.m#import "ViewController.h"#import // use MD5 Hash URL @implementation ViewController- (void)viewDidLoad{ [super viewDidLoad]; NSURL *url = [NSURL URLWithString:@"

2013-08-05 17:10:04 957

原创 NSDate

NSDate 比较:NSDate *date = [NSDate date];NSDate *laterDate = [date dateByAddingTimeInterval:1000];if ([date compare:laterDate] == NSOrderedAscending) { NSLog(@"NSOrderedAscending"); // output}

2013-08-05 09:47:11 906

原创 [[UIScreen mainScreen] applicationFrame]

Just explain it with code:// ViewController.m#import "ViewController.h"#define kMainScreenFrame [[UIScreen mainScreen] bounds]#define kMainScreenWidth kMainScreenFrame.size.width#define kMainSc

2013-08-05 08:22:45 1028

原创 Some hyperlinks

http://www.56.com/u84/v_OTM0ODE0MTc.html/1030_chaojiyoumo.html

2013-08-04 19:38:43 563

原创 dispatch_once

dispatch_once的意思是程序在执行期间只执行一次dispatch_once包含的代码:建一单视图应用程序:‘// TestClass.h#import @interface TestClass : NSObject- (void)test;@end// TestClass.m#import "TestClass.h"@implementation Te

2013-08-03 15:35:48 770

原创 id

//// main.m// Created by WeiZhen_Liu on 13-8-1.//#import int main(int argc, const char * argv[]){ @autoreleasepool { id i = (id)90; printf("%d", (int)i);

2013-08-03 14:05:58 550

原创 self and super

Just explain it with Code:// A.h#import @interface A : NSObject- (void)test;@end// A.m#import "A.h"@implementation A- (void)test{ NSLog(@"A test"); [self go];}- (void)go{

2013-08-03 10:21:38 747

原创 NSNull nil Nil

//// ViewController.m// NULL nil Test Demo//// Created by WeiZhen_Liu on 13-7-29.// // http://nshipster.com/nil////** NSNull is used throughout Foundation and other frameworks to skirt ar

2013-08-03 10:14:13 733

原创 cancelPreviousPerformRequestsWithTarget

from stackoverflow: http://stackoverflow.com/questions/7589644/why-doesnt-cancelpreviousrequestswithtarget-cancel-an-nstimer#import "ViewController.h"@interface ViewController ()@end@implement

2013-07-29 13:58:41 1081

原创 Some good URL for iOS

NSDateFormatter_1    NSDateFormatterDetail

2013-07-25 08:56:50 554

原创 UITextField/UITextView 选中时改变边框颜色

#import "ViewController.h"// first import QuartCore.framework and then add this line#import @interface ViewController () @end@implementation ViewController- (void)viewDidLoad{ [supe

2013-07-24 15:58:55 2582

原创 NSLog中文问题

// main.m// Created by WeiZhen_Liu on 13-7-22.#import int main(int argc, const char * argv[]){ @autoreleasepool { char *pStr_1 = "hello world!"; char *pStr_2 = "hello 世界!";

2013-07-22 14:04:16 738

原创 解决键盘遮挡UITextField问题

//// ViewController.m// UITextFieldScrollDemo//// Created by WeiZhen_Liu on 13-7-19.// Copyright (c) 2013年 WeiZhen_Liu. All rights reserved.//#import "ViewController.h"@interface ViewCon

2013-07-19 23:30:35 649

原创 UILable sizeToFit

UILable的sizeToFit方法很不错,可以直接通过调用它改变label的frame- (void)viewDidLoad{ [super viewDidLoad]; // 对于多行文字的label,必湏指定宽度 // UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 0,

2013-07-18 11:27:44 1498

原创 UIButton setShowsTouchWhenHighlighted

- (void)viewDidLoad{ [super viewDidLoad]; UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; [button setFrame:CGRectMake(20, 20, 280, 30)]; [button setTitle:@"TestS

2013-07-18 11:03:54 1107

原创 画倒三角

- (void)viewDidLoad{ [super viewDidLoad]; CustomView *customView = [[CustomView alloc] initWithFrame:CGRectMake(20, 20, 280, 200)]; UILabel *label = [[UILabel alloc] initWithFrame:CGRectM

2013-07-18 08:55:02 1034

原创 Some good hyperlink for learn iOS

OC自我翻译

2013-07-17 17:44:34 808

原创 私有属性

如果类的属性不直接通过点语法赋值可以写成私有的- (IBAction)testPropertyButtonClick:(id)sender { TestObject *testObj = [[TestObject alloc] init]; testObj.name = @"name"; NSLog(@"testObj.name: %@", testObj.name);

2013-07-17 10:49:52 539

原创 UILabel 显示null

- (void)viewDidLoad{ [super viewDidLoad]; UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(20, 20, 280, 40)]; // label.text = [NSString stringWithFormat:@"%@, %@", @"Hi", nil];

2013-07-16 09:09:42 1569

原创 UITabBarItem文字的设置

设置位置:[tab.tabBarItem setTitlePositionAdjustment:UIOffsetMake(0, -10)]设置高亮时文字颜色:NSDictionary *highlightedAttributes = [NSDictionary dictionaryWithObject:[UIColor orangeColor] forKey:UITextAttribu

2013-07-15 17:23:45 2688

原创 NSNotification+extern

// Child.hNSString *notificationName;#import @interface Child : NSObject{ NSInteger _sleepTime;}@property (nonatomic) NSInteger sleepTime;@end// Child.m#import "Child.h"@implemen

2013-07-12 15:03:18 543

Objective-C开发范例代码大全 (完整版)

Objective-C开发范例代码大全,完整版,非常值得学习,不仅讲述了IOS的范例代码,而且可以了解MAC下的东东。不错。

2014-10-23

CFNetwork编程指南

CFNetworking编程指南讲述了OC底层的网络知识,有必要学一下。

2014-10-17

HTTP权威指南中文版

HTTP权威指南,太好了,只是没有翻译完

2013-08-04

iOS开发多线程编程指南

iOS多线程编程指南,多线程开发还是相当重要的,有必要系统的学习一下

2013-06-14

Pro Core Data for iOS

学习Core Data必读之书: Pro Core Data for iOS (最新版:第二版)

2012-12-23

iPhone 源代码: 飘落的雪花

iPhone 源代码: 飘落的雪花,纯代码写成,实现简单的动画效果

2012-10-23

Learn C on mac

learn c on mac, 这本书是在mac平台下学习c的经典好书,开发mac下的软件和ios上的软件入门前提。

2012-10-23

空空如也

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

TA关注的人

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