- 博客(15)
- 收藏
- 关注
原创 IOS开发基础06(UITableView)
// ViewController.swift import UIKit class ViewController: UIViewController { // let names = ["一","二","三","四","五"] let keys = ["F","G","W","Q","Z"] let classmateAr
2016-11-08 15:15:15
388
原创 IOS开发基础06(界面通信(界面传值):属性传值、代理传值、闭包传值)
// AppDelegate.swift import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(application: UIApp
2016-11-07 14:23:03
354
原创 IOS开发基础05(导航视图控制器,跳转视图控制器,模态)
// AppDelegate.swift import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(application: UIAppli
2016-11-03 15:39:07
667
原创 IOS开发基础04(滑动轮播图)
// ViewController.swift import UIKit class ViewController: UIViewController { var pageControl:UIPageControl? override func viewDidLoad() { super.view
2016-11-03 08:38:03
448
原创 IOS开发基础03(Label,textField)
// ViewController.swift import UIKit class ViewController: UIViewController { override func viewDidLoad() { // 标签:UILabel,能够看得到,同样继承于UIView let label = U
2016-11-02 08:51:16
405
原创 IOS开发基础02(序列帧动画)
以植物大战僵尸为例: // ViewController.swift // 植物大战僵尸 import UIKit class ViewController: UIViewController { //IOS显示图片基本都采用UIImageView override func viewDidLoad() {
2016-11-01 10:55:17
837
原创 IOS开发基础01(工程创建,添加视图,按钮,按钮点击事件)
使用的开发工具为 Xcode 创建一个空白工程 创建好后目录如下: AppDelegate.swift import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { //程序的
2016-10-31 08:47:35
905
原创 IOS中的Swift基础(懒加载,代理协议)
// lazy.swift import Foundation class lazy: NSObject { //如果外部不使用的话就加载好了 var arr1:[String] = ["1","2","3","4"] //如果外部不使用就不加载 lazy var arr:[String] = { l
2016-10-28 09:12:34
422
原创 IOS中的Swift基础(类和对象)
// Person.swift import Foundation //类是一类物体的共有性抽象 //对象是某一类的一个具体 class Person: NSObject { //类里面一般由属性跟方法构成的 //定义属性: // var name:String = "胡小东" // var age:Int = 60
2016-10-28 09:03:04
347
原创 IOS中的Swift基础05(函数,闭包)
// // main.swift // SwiftLesson05 // // Created by lanou on 16/10/26. // Copyright (c) 2016年 lanou. All rights reserved. // import Foundation /* 函数: C语言:封装了一段有特定功能的代码段 形式:
2016-10-27 08:11:01
327
原创 IOS中的Swift基础04(字典,枚举)
// // main.swift // SwiftLesson04 // // Created by lanou on 16/10/26. // Copyright (c) 2016年 lanou. All rights reserved. // import Foundation //有如下⼀个数组,[“type = iOS", "Device =
2016-10-26 14:46:57
634
原创 IOS中的Swift基础03(字符串操作,数组,元组)
// // main.swift // SwiftLesson03 // // Created by lanou on 16/10/24. // Copyright (c) 2016年 lanou. All rights reserved. // import Foundation //字符串长度strlen(),比较strcom(),拷贝,拼接...
2016-10-25 08:54:24
364
原创 IOS中的Swift基础02(switch,循环)
// main.swift // SwiftLesson02 // // Created by lanou on 16/10/21. // Copyright (c) 2016年 lanou. All rights reserved. // import Foundation //switch /**
2016-10-25 08:31:35
355
原创 IOS中的Swift基础01(常量,变量,可选类型,条件判断)
// main.swift // SwiftLesson01 // // Created by lanou on 16/10/20. // Copyright (c) 2016年 lanou. All rights reserved. // //swift里面没有头文件和实现文件,只有一个.swift文件 //s
2016-10-25 08:25:07
873
原创 Objective-c的Block基础
// main.m // Block // // Created by lanou on 16/10/20. // Copyright (c) 2016年 lanou. All rights reserved. // #import //block块(变量):封装了一段具有特定功能的代码段 //函数有函数名
2016-10-25 08:18:32
240
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人