This file contains hidden or 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
ASIHTTPRequest *req = [ASIHTTPRequest requestWithURL:URL]; | |
req.delegate = self; | |
req.userInfo = [NSDictionary dictionaryWithObject:@"initialRequest" forKey:@"type"]; | |
NSData *body = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; | |
[req appendPostData:body]; | |
[req startSynchronous]; |
This file contains hidden or 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
[self.view endEditing:YES]; |
This file contains hidden or 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
- (NSString *)createUUID | |
{ | |
// Create universally unique identifier (object) | |
CFUUIDRef uuidObject = CFUUIDCreate(kCFAllocatorDefault); | |
// Get the string representation of CFUUID object. | |
NSString *uuidStr = [(NSString *)CFUUIDCreateString(kCFAllocatorDefault, uuidObject) autorelease]; | |
// If needed, here is how to get a representation in bytes, returned as a structure | |
// typedef struct { |
This file contains hidden or 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
_netRequests--; | |
if(_netRequests == 0) [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; |
This file contains hidden or 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
+(BOOL)deviceIsRunningOS5 | |
{ | |
UIScreen *s = [UIScreen mainScreen]; | |
return [s respondsToSelector:@selector(brightness)]; | |
} |
NewerOlder