自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

翻译 Initializing View Controllers 通过代码或者storyBoard

1. Initializing a View Controller//   初始化一个视图控制器时 系统只会默认初始化它需要的组建,这样有利于内存的利用,(有点像最小系统,如果还需要其他组建,可以通过后续的添加及分配内存When a view controller is first instantiated, it creates or loads objects it needs

2015-05-10 23:07:33 412

原创 CGColorRef & CGGradientRef

linear Gradient:    // get context    CGContextRef context =UIGraphicsGetCurrentContext();    // 颜色    CGColorSpaceRef colorSpace =CGColorSpaceCreateDeviceCMYK();   /*   

2015-05-04 20:44:18 666 1

原创 2D画图 & CGContextRef 常用的函数和方法

// 获取上下文    CGContextRef context =UIGraphicsGetCurrentContext();    //保存当前上下文状态    CGContextSaveGState(context);    // 得到笔触    CGContextMoveToPoint(context,200, 100);

2015-04-28 21:26:24 527

原创 Categories Add Methods to Existing Classes

If you need to add a method to an existing class, perhaps to add functionality to make it easier to do something in your own application, the easiest way is to use a category.The syntax to declare a

2015-04-08 21:00:51 433

原创 二分查找_递归版_while版

#include int binary_search(constint arr[],int low,int high,int key);int main(int argc,char **argv){        int arr[] = {4,8,20,30,50,60};        int len =

2015-03-27 17:10:11 472

原创 C库函数_malloc calloc & realloc

一. malloc函数原型: void* malloc( size_t size ); //Defined in header   返回任意类型值地址,可以强转Parameters:size -- number of bytes to allocate      Return value:Pointer to the beginning of newly alloc

2015-03-24 21:50:32 439

原创 Divein _ Trim函数的实现,去除字符串前后空格

#include<stdio.h>#include<string.h>char *myTrim(char *p);int main(int argc, char **argv){ char arr[] = " dfaf fd adf d "; char *a = myTrim(arr); printf("-%s-\n",a); return 0;}char

2015-03-24 15:30:59 427

原创 Cocoa and Cocoa Touch 一个是用于开发OS X的app 一个是用于开发iPhone的app

Cocoa (Touch)Cocoa and Cocoa Touch are the application development environments for OS X and iOS, respectively. Both Cocoa and Cocoa Touch include the Objective-C runtime and two core frameworks:

2015-03-14 15:43:17 486

原创 Divein_day04 vi 下了解代码解析过程

vi main.c // 生成一个 main.c 的源文件clang -E main.c // 预编译 main.c 中的预处理指令 #clang -S main.c // 生成 main.s 的汇编文件 汇编是由简单的英文 单词组成的语言 像 MOV 等这些英文clang -c main.s // 生成 main.o 的目标文件 即计算机识别的机器语言clang mian.

2015-03-12 20:04:09 293

原创 Divein_day03_进制转换 十进制到其他进制的转换

////  main.c//  binaryTo0x////  Created by apple on 15/3/11.//  Copyright (c) 2015年 diveinedu. All rights reserved.//#include #include "string.h"#include "Hea

2015-03-11 21:37:47 389

原创 Divein_day02_shell总结

Mac终端编辑器: vimtutor (vim mac 自带的编辑器, 详细内容去terminal 输入vimtutor)                        大概操作方式: 进入 vim xxx 按下esc进入nomal模式,之后便是指令的学习/Users/apple : 家目录。shell : 是用户与系统交互的工具查看shell版本: ech

2015-03-10 21:31:03 356

原创 OC类的本质

1、类的本质    其实类也是一个对象,是class

2014-10-29 15:29:25 552

原创 OC新语法-Category分类定义及用途

一、分类的基本用途

2014-10-23 23:21:07 685

原创 重写 - init 方法总结

/*1、*/- (id)intit

2014-10-22 00:47:53 409

原创 OC简单程序框架总结

/*OC 程序总体框架1、定义类2、实现类 */ #import @interface Person : NSObject        // 类的定义  冒号表示继承的意思  @是语法规则 {           int _age;                // 大括号里是成员变量            //NSString *_name;

2014-10-21 00:14:23 508

原创 struct与enum定义及用法的总结

#includeint main(){    struct person           //定义格式; struct 结构名(属性说明) {成员名1,成员名2};     {           int age;                   char name[100];           float height;

2014-10-17 22:40:06 942

原创 struct和strlen的相关问题总结--个人盲点的分析及理解

/*  strlen使用方法及注意事项*/#include //#include   int main(){   char name1[] = "itcast";                                 //栈:先入后出,程序从main开始走,变量name1[]、name[]依次入栈并分配存储空间  char name[] = {'0','6'}

2014-10-16 00:41:28 484

原创 基于for循环的几个常用排序方法

/* 选择排序。 */#include int main(){  int arr[]={34,12,55,53,23,3,43}; // 当然自己也可以手动输入  int len = sizeof(arr)/sizeof(int);  //求数组长度  int x,y,z;  for(x=0; x  {   for(y=x+1; y

2014-10-14 12:00:56 3529

原创 2014年10月12日 苹果终端 Unix常用指令及clang指令的总结

Unix常用指令:pwd----

2014-10-12 20:19:00 523 1

空空如也

空空如也

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

TA关注的人

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