一、loadView 1. loadView什么时候被调用? 每次访问UIViewController的view(如 controller.view、self.view)并且view为nil,loadView方法就会被调用 2. 有什么作用 loadView 方法是用来负责创建UIViewContr ...
分类:
其他好文 时间:
2017-07-12 23:26:39
阅读次数:
232
接前一篇:PHP实现RESTful风格的API实例(一) Response.php :包含一个Request类,即输出类。根据接收到的Content-Type,将Request类返回的数组拼接成对应的格式,加上header后输出 index.php :入口文件,调用Request类取得数据后交给Re ...
估计这篇不会有多少阅读量,毕竟我看到的前端,遇到这种情况就直接切图了... ...
分类:
Web程序 时间:
2017-07-12 19:00:55
阅读次数:
313
class Tag{ public static function addTag($str, $arr) { $head = new Node; // 树的head self::addString($head,$arr); exit; $str = trim($str); $result = sel ...
分类:
Web程序 时间:
2017-07-12 15:26:15
阅读次数:
291
Treblecross is a two player game where the goal is to get three ‘X’ in a row on a one-dimensional board.At the start of the game all cells in the boar ...
分类:
其他好文 时间:
2017-07-12 13:35:45
阅读次数:
141
CATransition-转场动画 CATransition是CAAnimation的子类,用于做转场动画,能够为层提供移出屏幕和移入屏幕的动画效果。iOS比Mac OS X的转场动画效果少一点。UINavigationController就是通过CATransition实现了将控制器的视图推入屏幕 ...
分类:
其他好文 时间:
2017-07-12 11:09:22
阅读次数:
250
Counter计数 ChainMap映射多个字典 UserDict重写字典 form collections import UserDict class StrKeyDict(UserDict): def __missing__(self, key): if isinstance(key, str) ...
分类:
其他好文 时间:
2017-07-12 01:21:50
阅读次数:
257
元组,列表,字典,集合 一:什么是数据类型 x = 10,10是我们要存储的数据 二:数据类型 数字(整型,长整型,浮点型,复数) 字符串 列表 元组 字典 集合 Bytes类型 (一):数字(int,float,complex) 作用:年纪,等级,薪资,身份证号,qq号等数字相关 class st ...
分类:
编程语言 时间:
2017-07-11 21:21:02
阅读次数:
282
一、概述 1.定义类(class Dog(object))--> 实例化(d = Dog()) > 实例对象(d) 2. __init__() 构造函数 3. self.name = name 类的属性、成员变量 4. def say_hi() 类的方法 、动态属性 二、访问类的属性 2.1 访问类 ...
分类:
其他好文 时间:
2017-07-11 21:02:16
阅读次数:
174