随笔分类 - [13] iOS-日记本
摘要:1.UI书写:一个小练习图片如下:代码如下:@implementationAppDelegate{UIControl*control;UILabel*label;} label= [[UILabelalloc]initWithFrame:CGRectMake(10,50,300,50)];control= [[UIControlalloc]initWithFrame:CGRectMake(10,50,300,50)];label.backgroundColor= [UIColorclearColor];label.text=@"按我呀、好爽!";label.textColo
阅读全文
摘要:1. UI 书写最基本创建一个label 标签 写一个first rate : UILabel*label = [[UILabelalloc]initWithFrame:CGRectMake(10,50,300,50)]; label.backgroundColor= [UIColororangeColor]; label.text=@"first rate...
阅读全文
摘要:NSString 基础练习:代码://// main.m// NSStringDemo01//// Created by Levi on 14-3-14.// Copyright (c) 2014年 levi. All rights reserved.//#import int main(int argc, const char * argv[]){ @autoreleasepool { /* NSString NSArray NSDictionary */ char *s...
阅读全文
摘要:(一)学习目标:1.面向对象基本概念:OOP的主要思想是把构成问题的各个事务分解成各个对象,建立对象的目的不是为了完成一个步骤,而是为了描述一个事物在整个解决问题步骤中的行为。2.熟悉OC类的定义:OC类分为两个文件,.h 和 .m文件.h 文件存放类、函数声明,类声明用关键字@interface @end 来声明.m文件存放的是具体实现,类实现使用关键字@implementation @end 来实现+ 表示类的方法,相当于 JAVA中的静态函数- 表示对象方法,对象实例化可以调用3.熟悉OC的字段定义:@interface Person : NSObject { int age;...
阅读全文
摘要:练习代码:代码一:(面向过程的OC)//// main.m// Class01Test01//// Copyright (c) 2014年 levi. All rights reserved.//#import @interface Fraction : NSObject-(void) setarr;-(void) rand;-(void) judge;@end@implementation Fraction{ NSInteger a; NSInteger b; //NSArray *arr = @[@"剪刀", @"石头", @"布"
阅读全文

浙公网安备 33010602011771号