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
@property (nonatomic, strong) SomeOtherObject *containedObject; | |
@property (nonatomic, weak) SomeOtherObject *containerObject; | |
@propery (nonatomic) int value; | |
@property (nonatomic, readonly, strong) NSDate *dateCreated; |
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
SomeObject *myObj = [[SomeObject alloc] init]; | |
[myObj setContainedObject:[[SomeOtherObject alloc] init]]; | |
SomeOtherObject *otherObject = myObj.containedObject; |
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
@interface SomeObject : NSObject | |
@propery (nonatomic, strong) SomeOtherObject *containedObject; | |
@end |
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
@interface SomeObject : NSObject | |
{ | |
SomeOtherObject *containedObject | |
} | |
- (void)setContainedObject(SomeOtherObject *)obj; | |
- (SomeOtherObject *)containedObject; | |
@end |
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
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:@"http://someurl/blah]; | |
AFJSONRequestOperation *operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id resultJSON) { | |
[self processResult:resultJSON]; | |
} failure:^(AFHTTPRequestOperation *operation, NSError *error) { | |
[self processFailuer:error]; | |
}]; | |
[operation start]; |
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
# See http://help.github.com/ignore-files/ for more about ignoring files. | |
# | |
# If you find yourself ignoring temporary files generated by your text editor | |
# or operating system, you probably want to add a global ignore instead: | |
# git config --global core.excludesfile ~/.gitignore_global | |
# public/uploads/**/* | |
# Ignore bundler config | |
/.bundle |
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 "NetworkActivityProtocol.h" | |
@interface SomeObjectFetcher : NSObject | |
@property (nonatomic,assign) id<NetworkActivityProtocol> networkActivityDelegate; | |
+ (SomeObjectFetcher *) sharedInstance; | |
- (void)startRequest; | |
@end | |
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
@interface SomeObjectFetcher () | |
@property (nonatomic, strong) NSMutableData *responseData; | |
@end | |
@implementation SomeObjectFetcher | |
@synthesize networkActivityDelegate = _networkActivityDelegate; | |
+ (SomeObjectFetcher *) sharedInstance{ | |
static AvailableFestivalFetcher *requestGenerator = nil; |
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
NSURL *urlToRemoteServer = [NSURL URLWithString:[NSString stringWithFormat:@"%@/some_resource.json%@", YourURLToRemoteServer, additionalParams]]; | |
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:urlToRemoteServer | |
cachePolicy:NSURLRequestReloadIgnoringLocalAndRemoteCacheData | |
timeoutInterval:15]; | |
[request setHTTPMethod: @"GET"]; | |
NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self]; | |
[connection start]; |
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
NSURL *apiURL = [NSURL URLWithString:[NSString stringWithFormat:@"%@/some_resource.json%@", [[EnvironmentVars sharedInstance] yourAPIURL], path]]; | |