Skip to content

Instantly share code, notes, and snippets.

View x0000ff's full-sized avatar

Konstantin Portnov x0000ff

View GitHub Profile
@x0000ff
x0000ff / nsstring-copy.md
Last active November 25, 2020 07:37
Should be NSString property being `copy` or `strong`?

Disclaimer

So, you have to use copy

Explain

If you have this property:

@property (strong) NSString *name;
@x0000ff
x0000ff / api-categories.json
Created August 25, 2017 14:32
api-categories.json for Yandex Money test app
[
{
"title": "Phone",
"subs": [
{
"id": 157291,
"title": "Cell Phone Service"
},
{
"id": 524624,
@x0000ff
x0000ff / AsyncOperation.swift
Created June 11, 2017 02:12
AsyncOperation in Swift
import Foundation
open class AsyncOperation: Operation {
public enum State: String {
case Ready, Executing, Finished
fileprivate var keyPath: String {
return "is" + rawValue
}
@x0000ff
x0000ff / UserModel.h
Last active March 27, 2017 20:59
Implementation of `isEqual:` http://nshipster.com/equality/
@interface UserModel : NSObject
@property (copy, nonatomic) NSString *name;
@property (copy, nonatomic) NSNumber *age;
@end