Skip to content

Instantly share code, notes, and snippets.

@mr-v
mr-v / gist:c3e261ad1f8daa658a44
Created October 21, 2014 21:11
core graphics
http://stackoverflow.com/questions/10966127/missing-subpixel-smoothing-when-using-nsstring-drawatpoint
http://www.catamount.com/forums/viewtopic.php?f=21&t=967 - UIImage extensions for rotation, scaling, etc.
//
// NocillaTestCase.swift
//
// Copyright (c) 2014 Witold Skibniewski
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is

IDE with amazing Objective-C support: many refactorings, fixing old timey syntax with hitting Alt-Enter, Show Usages, Show History for Selection. Unfortunately only so-so Swift support.

Tips:

Use ⌥Space (View | Quick Definition), to quickly review definition or content of the symbol at caret, without the need to open it in a new editor tab.

Workshop for learning way around the AppCode and many of its shortcuts: https://github.com/JetBrains/appcode-workshop

@mr-v
mr-v / droppable_uiview.swift
Created March 7, 2016 17:04
UIView<SomeProtocol> in Swift
import UIKit
protocol Droppable {
func dropped()
}
class A: UIView, Droppable {
func dropped() {
print("A")
}

When calling:

private func scheduleSurveyAvailableNotification(id id: Int, surveyDate: NSDate)

instead of:

 dates.enumerate().forEach { index, date in