- 博客(6)
- 收藏
- 关注
原创 Swift基础用法
// Playground - noun: a place where people can playimport UIKit//HelloWorldvar str = "Hello, playground"//常量可以改变值var myVariable = 42myVariable = 50let myConstant = 42//指定数据类型let floatNumb
2015-02-05 22:11:21
394
原创 用Swift写输入日期计算天数的Demo
//输入XX年XX月XX日,计算出日期// Playground - noun: a place where people can play import UIKitfunc days (year: Int, month : Int, day : Int) ->(Int) { if (year 12 || day 31) { println("输入错误"
2015-02-02 19:50:43
939
原创 动画
#import @interface SecondViewController : UIViewController@end#import "SecondViewController.h"@interface SecondViewController (){ }@property (nonatomic, retain) UIVi
2015-01-28 20:09:23
332
原创 block
之前写的是第一次发,格式看着太别扭了,重新发//block:从后一个页面向前一个页面传值;//步骤://1.数据的发送方创建block属性; typedef block, 创建block属性;//2.发送方定义一个方法,方法的参数是block类型, 方法的实现对block进行赋值;//3.发送方在某个时刻, 执行block, 并进行数据传递;//4.接收方,调用方法;
2015-01-27 20:05:35
404
原创 定时器
这种初始化方法最简单实用定时器参数1:定时时间间隔定时器参数2:自己执行这个方法定时器参数3:执行的方法定时器参数4:需要传的参数(我这里是简介,就没传参数)定时器参数5:是否重复定时器操作(YES/NO,如果为NO,只执行一次定时器方法)[NSTimer scheduledTimerWithTimeInterval:1 target:self select
2015-01-26 13:11:10
346
原创 多线程单例
多线程单例.h#import @interface DataHandle : NSObject+ (DataHandle *)defaultdataHandle;@end多线程单例.m#import "DataHandle.h"@implementation DataHandle+ (DataHandle *)defaultd
2015-01-26 11:45:59
306
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人