Skip to content

Instantly share code, notes, and snippets.

@K-Be
K-Be / CellOptimization.m
Created October 24, 2017 02:05
Example of linear logic.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
NSString *cellIdentifier = @"Cell1"; //static unedded here because constanst are optimized
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
if (cell == nil) {
cell= [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier];
}
if ([self _isSearchActive])// self.searchController.isActive
{
@K-Be
K-Be / RSTimingFunction.h
Created February 12, 2016 07:04 — forked from raphaelschaad/RSTimingFunction.h
All the cool animation curves from `CAMediaTimingFunction` but not limited to use with CoreAnimation. See what you can do with cubic Bezier curves here: http://netcetera.org/camtf-playground.html To get started just "Download Gist", throw the .h and .m files into your Xcode project and you're good to go!
//
// RSTimingFunction.h
//
// Created by Raphael Schaad on 2013-09-28.
// This is free and unencumbered software released into the public domain.
//
#import <Foundation/Foundation.h>
//
// NSArray+BinarySearch.h
// BinarySearch
//
// Created by Ole Begemann on 19.04.10.
// Copyright 2010 Ole Begemann. All rights reserved.
//
#import <Foundation/Foundation.h>