自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 视图

#import "ViewController.h"#define CRM(x, y, width, height) CGRectMake(x, y, width, height)#define CPM(x, y) CGPointMake(x, y)#import "DataiViewController.h"@interface ViewController ()@end

2016-05-12 16:01:16 238

原创 UI UILabel Button UITextField

#define Tag 200#define CRM(x, y, width, height) CGRectMake(x, y, width, height)@interface ViewController ()@property(nonatomic,strong)UILabel *label;//标签@property(nonatomic,strong)UITextField

2016-05-12 15:07:49 235

原创 Swift UI

class ViewController: UIViewController {var label : UILabel?var textField : UITextField?override func viewDidLoad() {super.viewDidLoad()label = UILabel(frame: CGRect(x: 0, y: 0, width: 300

2016-05-05 16:09:05 277

原创 Swift5

//定义协议protocol SomeprotocolOne{func printSomething()}protocol SomeprotocolTwo{}class SomeClass{}//采纳协议class SomeClassOne:SomeClass,SomeprotocolOne,SomeprotocolTwo{func printS

2016-05-05 16:07:52 389

原创 Swift4

//1.定义一个类和结构体//定义一个结构体struct Resolution {var width = 0var height = 0}//定义一个类class ViewMode {var resolution = Resolution()var name: String?var frameRate = 0.0var interlace = fal

2016-05-05 16:06:22 294

原创 Swift3

/*数组:有序的数据集集:无序且无重复的数据集 字典:无序且无重复的键值对的集*///集合的可变性,集合类型的数据一旦设定为不可变(let)就不能对值进行修改,反之(var)就可以//数组var inlist = [1,2,4,6]print(inlist)let stringList = ["A","B","C"]print(stringLis

2016-05-05 16:04:55 231

原创 Swift 2

//1.常量和变量//a. 用var来定义一个变量 ,let定义一个常量 常量一旦设定就不可以更改,变量可以更改//编译器可以自动推断类型var mayVarible = 43mayVarible = 78print(mayVarible)let myCount = 76//b. 可以用任意字符作为常量 变量名包括Unicode字符串 不能以数字开头,不能使用数

2016-05-05 15:44:29 160

原创 Swift 1

//print("Hello, World!")//类型安全//定义常量(oc的常量前const表示修饰符只读)//let 定义常量 var定义变量let str="hello world!"//Int Double Float Bool String Set Array Dictionary//元祖 可选//显示申明let score1: Int = 10

2016-05-05 15:33:48 209

原创 OC6(小东西)

成员变量的作用范围:@public:在任何地方都能直接访问对象的成员变量@private:只能在当前类的对象方法中直接访问,如果子类要访问需要调用父类的get/set方法@protected:可以在当前类及其子类对象方法中直接访问(系统默认下是用它来修饰的)@package:在同一个包下就可以直接访问,比如说在同一个框架在@implementation中成员变量的修饰符为@pr

2016-05-04 20:20:34 329

原创 OC5

#import int main(int argc, const char * argv[]) {@autoreleasepool {#pragma mark - 数组// 实例方法初始化NSArray *array = [[NSArray alloc]initWithObjects:@"1",@"2",@"3", nil];NSArray *array1 = [[NS

2016-05-04 17:21:04 281

原创 OC4

#import #import "Human.h"int main(int argc, const char * argv[]) {@autoreleasepool {// 属性自动生成setter、getter方法Human *human = [[Human alloc]init];human.name = @"nishabi";human.age = 28;//存

2016-05-04 16:47:26 245

原创 OC3

int main(int argc, const char * argv[]) {@autoreleasepool {#pragma mark - 结构体类型 NSPoint.../*NSPoint point = NSMakePoint(1.2, 1.3); //点NSLog(@"point = %@",NSStringFromPoint(point));NSRect

2016-05-04 16:39:25 465

原创 OC2

#import #import "Human.h"#import "Person.h"#import "Student.h"int main(int argc, const char * argv[]) {@autoreleasepool {// Human *human = [[Human alloc]init];/*-:实例方法1、调用方法[对象 方

2016-05-04 16:23:49 212

原创 C语言(结构体)

C语言(结构体)#include #include "Coustom.h"int main(int argc, const char * argv[]) {#pragma mark -- 1、有3个学生,定义一个结构体包含每个学生信息(编号、姓名、性别、分数),借助条件表达式,编程找出分数最高者;// typedef struct Student {// int c

2016-05-04 16:12:58 263

原创 oc(1)

oc  1  #import #import "Hera.h"#define NUMBER 2int main(int argc, const char * argv[]) {@autoreleasepool {#if NUMBER == 1/*@:1、作为oc标识,关键字的开始 2、打印对象NSlog:1、自动换行2、增加时间等日志信息#impor

2016-05-04 15:51:32 286

原创 C语言(链表)

C语言(链表)#include #include typedef struct _Student{int number;//数据域struct _Student *next;//指针域}Student;int main(int argc, const char * argv[]) {//数据结构:计算机存储和组织数据的一种方式//常用

2016-05-04 15:15:21 461

原创 C语言(算法)

C语言(算法)#include typedef enum _Workday{monday,tuesday,wednesday,thurday,friday} Workday;typedef struct _Student{int number;char *name;} Student;struct Stud

2016-05-04 15:03:13 213

原创 C语言6(指针)

C语言6(指针)#include #include void exchange1(int a){        a = 10;}void exchange(int *a){        *a = 10;}void exchangeOfPosition(int *a, int *b){        int temp =

2016-05-04 14:56:12 297

原创 C语言5(函数)

C语言5(函数)#pragma mark - 定义函数//调用函数//无返回值,无参数// greeting();// greeting();// greeting();// greeting();//无返回值,有一个参数// sumOfNumber(100);//有返回值,有一个参数int a = 0;printf("inp

2016-05-04 14:32:36 383

原创 C语言4(数组)

C语言4(数组)添加头文件#include //#pragma mark - 一维数组// 存储同种数据类型// 数组定义的格式:数据类型 数组名[元素个数]// // // int age[5] = {19,27,44,66,88};// printf("%p\n",age);// printf("%p\n",&age[0]);// for (in

2016-05-04 14:04:01 438

原创 C语言3(复杂程序结构)

C语言3(复杂程序结构)添加头文件#include#pragma mark - 简单语句的嵌套// int a = 10;// {// int b= 3;// int c = 6;// a = 40;// }//printf("c = %d\n",c);#pragma mark - if// int a = 4;// int b = 8;

2016-05-04 13:58:01 1279

原创 C语言2(程序结构)

C语言2(程序结构)#pragma mark-printf// int a = 10;// int b = 20;// printf("a = %d,b = %d\n",a,b);// // double a1 = 3.22;// float b1 = 3.44;// printf("a1 = %lf,b1 = %f\n",a1,b1);#pragma

2016-05-03 19:34:56 247

原创 c语言1(基础)

c语言1//#include,#import,@class," ",/*#include:重复编译#import:防止重复编译@class:告诉编译器导入的这个是个类名“”:导入的是自定义的文件*/#pragma mark - 注释//单行注释:可以嵌套,不可以折行/*多行注释:可以折行,不可以嵌套*/#pragma mark -

2016-05-03 19:27:11 305

空空如也

空空如也

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

TA关注的人

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