Getting a string value for a property of a class with autocompletion feature and checking it at compile-time is very useful.
Get the property name for a class:
@interface AnyClass : NSObject
@property (strong) NSData *data;
#import <Foundation/Foundation.h> | |
#import <UIKit/UIKit.h> | |
typedef enum : NSUInteger { | |
/** | |
result == _Failed && resultDescription == _NoSectionsYet @b==> | |
which means that the messageCountArray contains no section info. | |
result == _Failed && resultDescription == _PlainIndexOutOfBounds @b==> | |
which means that the plainIndex is greater than the maximal possible plain index available in given sections (the resulting indexPath contains (section == lastSectionIndex, row == lastPossibleRowInLastSection + 1). |
// | |
// UITabBarController+HideTabBar.h | |
// | |
// Created by Joshua Greene on 9/26/13. | |
// | |
// 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 |
// | |
// VIOSMessageHeaderView.h | |
// vipole | |
// | |
// Created by Aziz Latypov on 09/11/15. | |
// Copyright © 2015 vipole. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> |
See original in Ray Wenderlich code style guide
Put bracket on next line for functions.
// | |
// VIOSXibLoader.h | |
// Created by Aziz Latypov on 8/21/15. | |
// | |
// If your TableViewCells are in Xib files and you name them in some convencion | |
// described with regular expression, you can load them into a table like this: | |
// In your viewDidLoad method call | |
// [[VIOSXibLoader defaultLoader] loadXibsForTableView:self.tableView | |
// withPattern:@"^MyModelClassName(\\w*)TableViewCell$"]; | |
// |
- (void)viewDidAppear:(BOOL)animated | |
{ | |
[super viewDidAppear:animated]; | |
[[NSNotificationCenter defaultCenter] addObserver:self | |
selector:@selector(keyboardWillShow:) | |
name:UIKeyboardWillChangeFrameNotification object:nil]; | |
[[NSNotificationCenter defaultCenter] addObserver:self | |
selector:@selector(keyboardWillHide:) |
#!/usr/bin/ruby | |
require 'date' | |
require 'pp' | |
COMPANY_NAME="<#company_name#>" | |
if ARGV.count != 1 | |
puts "Usage: update_strings.rb /path/to/source/dir" | |
puts "Path and project_name are case sensitive." |
#include <stdio.h> | |
#include <string.h> | |
#include <math.h> | |
int main() | |
{ | |
int a,d,m,o,c,f,x; | |
printf("A D M O C | F\n"); | |
for(x=0; x<32; x++){ | |
a = x & 16; |
$VERBOSE = nil | |
require File.expand_path('../rooby', __FILE__) | |
Person = Rooby::Class.new 'Person' do | |
define :initialize do |name| | |
@name = name | |
end | |
define :name do |