Skip to content

Instantly share code, notes, and snippets.

#import "ViewController.h"
@interface ViewController () <UITableViewDataSource, UITableViewDelegate>
@property (strong, nonatomic) UITableView *tableView;
@end
@implementation ViewController
@adin283
adin283 / .zshrc
Created July 18, 2016 08:51
.zshrc
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="kevintheme"
#ZSH_THEME="agnoster"
@adin283
adin283 / ReusableCellExample.m
Created March 15, 2016 06:52 — forked from bunnyhero/ReusableCellExample.m
Example of Reactive Cocoa binding for a reusable cell.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell =
[tableView dequeueReusableCellWithIdentifier:REUSABLE_CELL_ID];
UILabel *label = (UILabel *)[cell viewWithTag:VIEW_TAG];
Model *someModel = [self getModelFromIndexPath:indexPath];
// `takeUntil:` makes the RACObserve() signal complete (and thus breaks the subscription)
// when the cell is recycled.
@adin283
adin283 / SwiftStructAndClass.swift
Last active December 28, 2015 06:16
Swift Struct And Class Playground
//: Playground - noun: a place where people can play
import UIKit
//1.结构体类型的定义
struct MyPoint {
var x: Float = 0
var y: Float = 0
mutating func setMyPoint(tempX: Float, tempY: Float) {
@adin283
adin283 / UIScrollViewAutoLayoutDemo.m
Created December 22, 2015 02:26
UIScrollView with AutoLayout by PureLayout
//
// ZZZViewController.m
// KevinDemo
//
// Created by Kevin on 15/12/22.
// Copyright © 2015年 KevinLab. All rights reserved.
//
#import "ZZZViewController.h"