Skip to content

Instantly share code, notes, and snippets.

View ViewController.m
#import "ViewController.h"
@interface ViewController () <UITableViewDataSource, UITableViewDelegate>
@property (strong, nonatomic) UITableView *tableView;
@end
@implementation ViewController
View .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 Mar 15, 2016 — forked from bunnyhero/ReusableCellExample.m
Example of Reactive Cocoa binding for a reusable cell.
View ReusableCellExample.m
- (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 Dec 28, 2015
Swift Struct And Class Playground
View SwiftStructAndClass.swift
//: 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 Dec 22, 2015
UIScrollView with AutoLayout by PureLayout
View UIScrollViewAutoLayoutDemo.m
//
// ZZZViewController.m
// KevinDemo
//
// Created by Kevin on 15/12/22.
// Copyright © 2015年 KevinLab. All rights reserved.
//
#import "ZZZViewController.h"