-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
49 lines (40 loc) · 2.5 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<title>Ios-dev-record by will0321</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="stylesheets/normalize.css" media="screen">
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen">
<link rel="stylesheet" type="text/css" href="stylesheets/github-light.css" media="screen">
</head>
<body>
<section class="page-header">
<h1 class="project-name">Ios-dev-record</h1>
<h2 class="project-tagline">iOS开发过程中的一些纪录</h2>
<a href="https://github.com/will0321/IOS-Dev-Record" class="btn">View on GitHub</a>
<a href="https://github.com/will0321/IOS-Dev-Record/zipball/master" class="btn">Download .zip</a>
<a href="https://github.com/will0321/IOS-Dev-Record/tarball/master" class="btn">Download .tar.gz</a>
</section>
<section class="main-content">
<p>一.关于fram和bound</p>
<ul>
<li>1)fame是相对父view的坐标系统;bound是自己的坐标系统;</li>
<li>2)bound默认x,y的是(0,0);</li>
<li>3)改变bound影响它子view的显示,它本身的显示位置相对它自己的父view显示位置不变</li>
<li>4)改变view bound的x,y后,子view的变化用一句话表示:本身先移动(x,y),子不变。将新的显示效果放在view的fram表示的位置。</li>
</ul>
<p>二.关于kvo,NSNotification,delegate三种观察者模式</p>
<ul>
<li>1)kvo用于model改变view需要对应改变的场景;</li>
<li>2)NSNotification用于一个地方改变,很多地方需要变化的场景,有点类似广播的场景;NSNotification不要滥用,会影响代码的可读性。</li>
<li>3)观察者模式,最先考虑delegate。虽然写法稍微麻烦,但是代码可读性高。</li>
</ul>
<footer class="site-footer">
<span class="site-footer-owner"><a href="https://github.com/will0321/IOS-Dev-Record">Ios-dev-record</a> is maintained by <a href="https://github.com/will0321">will0321</a>.</span>
<span class="site-footer-credits">This page was generated by <a href="https://pages.github.com">GitHub Pages</a> using the <a href="https://github.com/jasonlong/cayman-theme">Cayman theme</a> by <a href="https://twitter.com/jasonlong">Jason Long</a>.</span>
</footer>
</section>
</body>
</html>