Skip to content

Instantly share code, notes, and snippets.

@Ramshandilya
Ramshandilya / AsynchronousOperation.swift
Created November 18, 2019 19:09 — forked from Sorix/AsynchronousOperation.swift
Subclass of NSOperation (Operation) to make it asynchronous in Swift 3, 4, 5
// Created by Vasily Ulianov on 09.02.17, updated in 2019.
// License: MIT
import Foundation
/// Subclass of `Operation` that adds support of asynchronous operations.
/// 1. Call `super.main()` when override `main` method.
/// 2. When operation is finished or cancelled set `state = .finished` or `finish()`
open class AsynchronousOperation: Operation {
public override var isAsynchronous: Bool {
@Ramshandilya
Ramshandilya / keybase.md
Created December 18, 2018 22:03
Keybase Verification

Keybase proof

I hereby claim:

  • I am ramshandilya on github.
  • I am ramshandilya (https://keybase.io/ramshandilya) on keybase.
  • I have a public key ASC1mKD7vWVVGOaqLNF9Kpj0Km0DAabRZWttRueBuxxp0Ao

To claim this, I am signing this object:

# pragma mark - APCBarCharViewDataSource
- (NSInteger)barGraph:(APCLineGraphView *)graphView numberOfPointsInPlot:(NSInteger)plotIndex
{
return 6;
}
- (NSInteger)numberOfPlotsInBarGraph:(APCLineGraphView *)graphView
{
return 1;
@Ramshandilya
Ramshandilya / CCMenu+GridLayout.h
Created December 24, 2013 12:02
A grid layout menu for Cocos2d using CCMenu
@interface CCMenu (GridLayout)
- (void)alignItemsInGridWithPadding:(CGPoint)padding columns:(NSInteger)columns;
@end
@Ramshandilya
Ramshandilya / UITableView+CellAnimation.h
Created December 24, 2013 12:00
A fancy sequential animation for table rows
typedef enum
{
UITableViewAnimationDirectionFromLeft,
UITableViewAnimationDirectionFromRight
}UITableViewAnimationDirection;
@interface UITableView (CellAnimation)
- (void)animateRowsFromLeft;
- (void)animateRowsFromRight;
@Ramshandilya
Ramshandilya / UILabel+Resize.h
Created December 24, 2013 11:53
UILabel category to resize the frame height according to content text.
@interface UILabel (Resize)
- (void)resizeToFit;
@end
@Ramshandilya
Ramshandilya / UIView+LoadNib.h
Created December 24, 2013 11:51
A UIView category to load the view from XIB file
@interface UIView (LoadNib)
+ (id)loadInstanceFromNib;
+ (id)loadInstanceFromNibWithOwner:(id)owner;
@end