- https://github.com/NOUSguide/NGVaryingGridView
NGVaryingGridViewをinitしてdelegateを指定しaddSubviewしてreloadDataすればよい
- TableViewと同じようにgridViewDelegateを実装してcellを作る
@required rectsForCellsInGridView:
- cellの位置情報を含んだCGRectのNSArrayを作り、それを返す
| (define nil '()) | |
| (define (accumulate op initial sequence) | |
| (if (null? sequence) | |
| initial | |
| (op (car sequence) | |
| (accumulate op initial (cdr sequence))))) | |
| (define (accumulate-n op init seqs) | |
| (if (null? (car seqs)) |
| (define nil '()) | |
| (define (accumulate op initial sequence) | |
| (if (null? sequence) | |
| initial | |
| (op (car sequence) | |
| (accumulate op initial (cdr sequence))))) | |
| ; 2.2.2 | |
| (define (count-leaves x) |
| ; p.13 1.1.7 sqrt | |
| (define (sqrt x) | |
| (sqrt-iter 1.0 x)) | |
| (define (sqrt-iter guess x) | |
| (if (good-enough? guess x) | |
| guess | |
| (sqrt-iter (improve guess x) | |
| x))) |
| ; p.41のcube-rootを参考にコピペ | |
| (define (fixed-point f first-guess) | |
| (define tolerance 0.00001) | |
| (define (close-enough? v1 v2) | |
| (< (abs (- v1 v2)) tolerance)) | |
| (define (try guess) | |
| (let ((next (f guess))) | |
| (if (close-enough? guess next) | |
| next |
| ; たとえば | |
| ; f(0) = 1.0 | |
| ; f(1) = 3.0 | |
| ; f(2) = 9.0 | |
| ; f(3) = 27.0 | |
| ; f(4) = 81.0 | |
| ; のとき | |
| ; (smooth(f))(1) = 4.333 | |
| ; (smooth(f))(2) = 13.0 | |
| ; (smooth(f))(3) = 39.0 |
| ; たとえば | |
| ; f(f(x)) | |
| ; はq1.42のcomposeを使って | |
| ; ((compose f f) x) | |
| ; とかける | |
| ; | |
| ; ここでf(f(x))をg(x)とする | |
| ; | |
| ; f(f(f(x))) | |
| ; は |
| ; p.39の脚注58より | |
| ; x |-> f(g(x)) | |
| ; は | |
| ; (lambda (x) (f (g x))) | |
| (define (compose f g) | |
| (lambda (x) (f (g x)))) | |
NGVaryingGridViewをinitしてdelegateを指定しaddSubviewしてreloadDataすればよい@required rectsForCellsInGridView:http://www.cocoacontrols.com/platforms/ios/controls/qbkoverlaymenuview https://github.com/hollance/MHTabBarController/