Skip to content

Instantly share code, notes, and snippets.

Jaison Vieira jaisonv

Block or report user

Report or block jaisonv

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View TableViewController.swift
// first enable "Refreshing" on controller via storyboard
override func viewDidLoad() {
super.viewDidLoad()
// the value for "action" must mach the function's name
refreshControl?.addTarget(self, action: "reloadStuff", forControlEvents: UIControlEvents.ValueChanged)
}
func reloadStuff() {
@jaisonv
jaisonv / TableViewController.swift
Last active Aug 29, 2015
Resize cell height based on content
View TableViewController.swift
tableView.estimatedRowHeight = 100 // estimated value for cell height
tableView.rowHeight = UITableViewAutomaticDimension
@jaisonv
jaisonv / ViewController.m
Last active Aug 29, 2015
Rounded ImageView
View ViewController.m
myImageView.layer.cornerRadius = 10.0f;
@jaisonv
jaisonv / ViewController.m
Last active Aug 29, 2015
Beautiful border to ImageView
View ViewController.m
myImageView.layer.borderWidth = 3.0f;
myImageView.layer.borderColor = [UIColor whiteColor].CGColor;
@jaisonv
jaisonv / ViewController.m
Last active Aug 29, 2015
Circular ImageView
View ViewController.m
myImageView.layer.cornerRadius = myImageView.frame.size.width / 2;
myImageView.clipsToBounds = YES;
@jaisonv
jaisonv / test_helper.rb
Created May 15, 2015
MiniTest reporters - Rails tests show red and green
View test_helper.rb
require "minitest/reporters"
Minitest::Reporters.use!
You can’t perform that action at this time.