Permalink
Browse files

Indenting macro conditionals

  • Loading branch information...
1 parent d5bd23c commit 5ec794dc4d87e2fb1134ef6c80343337838914a0 @mattt mattt committed Nov 6, 2012
@@ -81,15 +81,15 @@ typedef enum {
AFNetworkReachabilityStatusReachableViaWiFi = 2,
} AFNetworkReachabilityStatus;
#else
-#warning SystemConfiguration framework not found in project, or not included in precompiled header. Network reachability functionality will not be available.
+ #warning SystemConfiguration framework not found in project, or not included in precompiled header. Network reachability functionality will not be available.
#endif
#ifndef __UTTYPE__
-#if __IPHONE_OS_VERSION_MIN_REQUIRED
-#warning MobileCoreServices framework not found in project, or not included in precompiled header. Automatic MIME type detection when uploading files in multipart requests will not be available.
-#else
-#warning CoreServices framework not found in project, or not included in precompiled header. Automatic MIME type detection when uploading files in multipart requests will not be available.
-#endif
+ #if __IPHONE_OS_VERSION_MIN_REQUIRED
+ #warning MobileCoreServices framework not found in project, or not included in precompiled header. Automatic MIME type detection when uploading files in multipart requests will not be available.
+ #else
+ #warning CoreServices framework not found in project, or not included in precompiled header. Automatic MIME type detection when uploading files in multipart requests will not be available.
+ #endif
#endif
typedef enum {
@@ -28,15 +28,15 @@
#import <Availability.h>
#ifdef _SYSTEMCONFIGURATION_H
-#import <netinet/in.h>
-#import <netinet6/in6.h>
-#import <arpa/inet.h>
-#import <ifaddrs.h>
-#import <netdb.h>
+ #import <netinet/in.h>
+ #import <netinet6/in6.h>
+ #import <arpa/inet.h>
+ #import <ifaddrs.h>
+ #import <netdb.h>
#endif
#if __IPHONE_OS_VERSION_MIN_REQUIRED
-#import <UIKit/UIKit.h>
+ #import <UIKit/UIKit.h>
#endif
#ifdef _SYSTEMCONFIGURATION_H
@@ -25,9 +25,9 @@
// Workaround for change in imp_implementationWithBlock() with Xcode 4.5
#if defined(__IPHONE_6_0) || defined(__MAC_10_8)
-#define AF_CAST_TO_BLOCK id
+ #define AF_CAST_TO_BLOCK id
#else
-#define AF_CAST_TO_BLOCK __bridge void *
+ #define AF_CAST_TO_BLOCK __bridge void *
#endif
NSSet * AFContentTypesFromHTTPHeader(NSString *string) {
@@ -26,9 +26,9 @@
#import <Availability.h>
#if __IPHONE_OS_VERSION_MIN_REQUIRED
-#import <UIKit/UIKit.h>
+ #import <UIKit/UIKit.h>
#elif __MAC_OS_X_VERSION_MIN_REQUIRED
-#import <Cocoa/Cocoa.h>
+ #import <Cocoa/Cocoa.h>
#endif
/**
@@ -24,21 +24,20 @@
#import <Availability.h>
#ifndef _AFNETWORKING_
-#define _AFNETWORKING_
+ #define _AFNETWORKING_
-#import "AFURLConnectionOperation.h"
+ #import "AFURLConnectionOperation.h"
-#import "AFHTTPRequestOperation.h"
-#import "AFJSONRequestOperation.h"
-#import "AFXMLRequestOperation.h"
-#import "AFPropertyListRequestOperation.h"
-#import "AFHTTPClient.h"
+ #import "AFHTTPRequestOperation.h"
+ #import "AFJSONRequestOperation.h"
+ #import "AFXMLRequestOperation.h"
+ #import "AFPropertyListRequestOperation.h"
+ #import "AFHTTPClient.h"
-#import "AFImageRequestOperation.h"
-
-#if __IPHONE_OS_VERSION_MIN_REQUIRED
-#import "AFNetworkActivityIndicatorManager.h"
-#import "UIImageView+AFNetworking.h"
-#endif
+ #import "AFImageRequestOperation.h"
+ #if __IPHONE_OS_VERSION_MIN_REQUIRED
+ #import "AFNetworkActivityIndicatorManager.h"
+ #import "UIImageView+AFNetworking.h"
+ #endif
#endif /* _AFNETWORKING_ */
@@ -21,8 +21,9 @@
// THE SOFTWARE.
#import "AFURLConnectionOperation.h"
+
#if __IPHONE_OS_VERSION_MIN_REQUIRED
-#import <UIKit/UIKit.h>
+ #import <UIKit/UIKit.h>
#endif
#if !__has_feature(objc_arc)
View
@@ -23,28 +23,22 @@
#import <Availability.h>
#if __IPHONE_OS_VERSION_MIN_REQUIRED
+ #import <UIKit/UIKit.h>
-#import <UIKit/UIKit.h>
+ @interface AppDelegate : NSObject <UIApplicationDelegate>
-@interface AppDelegate : NSObject <UIApplicationDelegate> {
-
-}
-
-@property (nonatomic, strong) UIWindow *window;
-@property (nonatomic, strong) UINavigationController *navigationController;
-
-@end
+ @property (nonatomic, strong) UIWindow *window;
+ @property (nonatomic, strong) UINavigationController *navigationController;
+ @end
#else
+ #import <Cocoa/Cocoa.h>
-#import <Cocoa/Cocoa.h>
-
-@interface AppDelegate : NSObject <NSApplicationDelegate>
-
-@property (strong) IBOutlet NSWindow *window;
-@property (strong) IBOutlet NSTableView *tableView;
-@property (strong) IBOutlet NSArrayController *postsArrayController;
+ @interface AppDelegate : NSObject <NSApplicationDelegate>
-@end
+ @property (strong) IBOutlet NSWindow *window;
+ @property (strong) IBOutlet NSTableView *tableView;
+ @property (strong) IBOutlet NSArrayController *postsArrayController;
+ @end
#endif
View
@@ -23,75 +23,71 @@
#import "AppDelegate.h"
#if __IPHONE_OS_VERSION_MIN_REQUIRED
+ #import "GlobalTimelineViewController.h"
-#import "GlobalTimelineViewController.h"
+ #import "AFNetworkActivityIndicatorManager.h"
-#import "AFNetworkActivityIndicatorManager.h"
+ @implementation AppDelegate
+ @synthesize window = _window;
+ @synthesize navigationController = _navigationController;
-@implementation AppDelegate
-@synthesize window = _window;
-@synthesize navigationController = _navigationController;
-
-- (BOOL)application:(UIApplication *)application
-didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
-{
- NSURLCache *URLCache = [[NSURLCache alloc] initWithMemoryCapacity:4 * 1024 * 1024 diskCapacity:20 * 1024 * 1024 diskPath:nil];
- [NSURLCache setSharedURLCache:URLCache];
+ - (BOOL)application:(UIApplication *)application
+ didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+ {
+ NSURLCache *URLCache = [[NSURLCache alloc] initWithMemoryCapacity:4 * 1024 * 1024 diskCapacity:20 * 1024 * 1024 diskPath:nil];
+ [NSURLCache setSharedURLCache:URLCache];
+
+ [[AFNetworkActivityIndicatorManager sharedManager] setEnabled:YES];
- [[AFNetworkActivityIndicatorManager sharedManager] setEnabled:YES];
-
- UITableViewController *viewController = [[GlobalTimelineViewController alloc] initWithStyle:UITableViewStylePlain];
- self.navigationController = [[UINavigationController alloc] initWithRootViewController:viewController];
- self.navigationController.navigationBar.tintColor = [UIColor darkGrayColor];
-
- self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
- self.window.backgroundColor = [UIColor whiteColor];
- self.window.rootViewController = self.navigationController;
- [self.window makeKeyAndVisible];
-
- return YES;
-}
-
-@end
+ UITableViewController *viewController = [[GlobalTimelineViewController alloc] initWithStyle:UITableViewStylePlain];
+ self.navigationController = [[UINavigationController alloc] initWithRootViewController:viewController];
+ self.navigationController.navigationBar.tintColor = [UIColor darkGrayColor];
+
+ self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
+ self.window.backgroundColor = [UIColor whiteColor];
+ self.window.rootViewController = self.navigationController;
+ [self.window makeKeyAndVisible];
+
+ return YES;
+ }
+ @end
#else
+ #import "Post.h"
+ #import "User.h"
-#import "Post.h"
-#import "User.h"
-
-@implementation AppDelegate
+ @implementation AppDelegate
-@synthesize window = _window;
-@synthesize tableView = _tableView;
-@synthesize postsArrayController = _postsArrayController;
+ @synthesize window = _window;
+ @synthesize tableView = _tableView;
+ @synthesize postsArrayController = _postsArrayController;
-- (void)applicationDidFinishLaunching:(NSNotification *)notification {
- NSURLCache *URLCache = [[NSURLCache alloc] initWithMemoryCapacity:4 * 1024 * 1024 diskCapacity:20 * 1024 * 1024 diskPath:nil];
- [NSURLCache setSharedURLCache:URLCache];
-
- [self.window makeKeyAndOrderFront:self];
-
- [Post globalTimelinePostsWithBlock:^(NSArray *posts, NSError *error) {
- if (error) {
- [[NSAlert alertWithMessageText:NSLocalizedString(@"Error", nil) defaultButton:NSLocalizedString(@"OK", nil) alternateButton:nil otherButton:nil informativeTextWithFormat:@"%@",[error localizedDescription]] runModal];
- }
+ - (void)applicationDidFinishLaunching:(NSNotification *)notification {
+ NSURLCache *URLCache = [[NSURLCache alloc] initWithMemoryCapacity:4 * 1024 * 1024 diskCapacity:20 * 1024 * 1024 diskPath:nil];
+ [NSURLCache setSharedURLCache:URLCache];
- self.postsArrayController.content = posts;
- }];
-
- [[NSNotificationCenter defaultCenter] addObserverForName:kUserProfileImageDidLoadNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notification) {
- [self.tableView reloadData];
- }];
-}
-
-- (BOOL)applicationShouldHandleReopen:(NSApplication *)application
- hasVisibleWindows:(BOOL)flag
-{
- [self.window makeKeyAndOrderFront:self];
-
- return YES;
-}
+ [self.window makeKeyAndOrderFront:self];
+
+ [Post globalTimelinePostsWithBlock:^(NSArray *posts, NSError *error) {
+ if (error) {
+ [[NSAlert alertWithMessageText:NSLocalizedString(@"Error", nil) defaultButton:NSLocalizedString(@"OK", nil) alternateButton:nil otherButton:nil informativeTextWithFormat:@"%@",[error localizedDescription]] runModal];
+ }
+
+ self.postsArrayController.content = posts;
+ }];
+
+ [[NSNotificationCenter defaultCenter] addObserverForName:kUserProfileImageDidLoadNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notification) {
+ [self.tableView reloadData];
+ }];
+ }
-@end
+ - (BOOL)applicationShouldHandleReopen:(NSApplication *)application
+ hasVisibleWindows:(BOOL)flag
+ {
+ [self.window makeKeyAndOrderFront:self];
+
+ return YES;
+ }
-#endif
+ @end
+#endif

0 comments on commit 5ec794d

Please sign in to comment.