This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For .h: | |
@interface Person : NSObject | |
@property (nonatomic, strong) NSString *imageName; | |
@property (nonatomic, strong) NSString *name; | |
@property (nonatomic, strong) NSString *phoneNumber; | |
@property (nonatomic, strong) NSString *job; | |
- (id)initWithDictionary:(NSDictionary *)dictionary; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Configure the Scene View | |
self.sceneView.backgroundColor = [UIColor darkGrayColor]; | |
// Create the scene | |
SCNScene *scene = [SCNScene scene]; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Written for answer to http://stackoverflow.com/questions/23700556/getting-a-date-from-string-objective-c/23700701 | |
Compile and run like so: | |
$> clang DateFormatterExample.m -ObjC -std=c99 -fobjc-arc -framework Foundation | |
$> ./a.out | |
*/ | |
#import <Foundation/Foundation.h> | |
int main(int argc, char *argv[]) { | |
@autoreleasepool { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Compile and run like so: | |
$> clang CGMutablePathRef_NSInvocation.m -ObjC -std=c99 -fobjc-arc -framework Foundation -framework CoreGraphics | |
$> ./a.out | |
*/ | |
#import <Foundation/Foundation.h> | |
#import <CoreGraphics/CoreGraphics.h> | |
@interface TestClass : NSObject |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
@interface TestClass : NSObject | |
@end | |
@interface TestClass () | |
@property NSString *name; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
@interface Test : NSObject | |
- (void)enqueue:(id)object; | |
- (id)dequeue; | |
@end | |
@implementation Test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)makeGraphPopup:(NSString *)popupName { | |
/* | |
I want to pass a string (popupName) into this method and use it dynamically | |
for object names just like popupName.to_sym in Ruby. | |
Below you can see where I've insert {popupName} and how it would append itself | |
to various object names which are IBOutlets | |
*/ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
@interface MyClass : NSObject | |
@end | |
@implementation MyClass | |
@end | |
@interface MyClass (Properties) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
#import <IOKit/usb/USBSpec.h> | |
#import "ORSSerialPort.h" | |
@interface ORSSerialPort (Attributes) | |
@property (nonatomic, readonly) NSDictionary *ioDeviceAttributes; | |
@property (nonatomic, readonly) NSNumber *vendorID; | |
@property (nonatomic, readonly) NSNumber *productID; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
labelTypeName | labelSheetWidth | labelSheetHeight | topMargin | bottomMargin | leftMargin | rightMargin | numberOfRows | numberOfColumns | horizontalGutter | verticalGutter | |
---|---|---|---|---|---|---|---|---|---|---|---|
Avery 2160 Bottom | 8.5 | 11 | 5.5 | 0.5 | 0.81 | 0.81 | 4 | 1 | 0 | 0 | |
Avery 2160 Top | 8.5 | 11 | 0.5 | 5.5 | 0.81 | 0.81 | 4 | 1 | 0 | 0 | |
Avery 2162 Bottom | 8.5 | 11 | 5.5 | 0.5 | 0.125 | 0.125 | 3 | 1 | 0 | 0 | |
Avery 2162 Top | 8.5 | 11 | 0.5 | 5.5 | 0.125 | 0.125 | 3 | 1 | 0 | 0 | |
Avery 2163 Bottom | 8.5 | 11 | 5.5 | 0.5 | 0.125 | 0.125 | 2 | 1 | 0 | 0 | |
Avery 2163 Top | 8.5 | 11 | 0.5 | 5.5 | 0.125 | 0.125 | 2 | 1 | 0 | 0 | |
Avery 2164 Bottom | 8.5 | 11 | 5.844 | 0.844 | 0.125 | 0.125 | 1 | 1 | 0 | 0 | |
Avery 2164 Top | 8.5 | 11 | 0.844 | 5.844 | 0.125 | 0.125 | 1 | 1 | 0 | 0 | |
Avery 5159 | 8.5 | 11 | 0.25 | 0.25 | 0.156 | 0.156 | 7 | 2 | 0.188 | 0 |