diff --git a/Podfile b/Podfile index 8d0f15c..e1fe3e3 100644 --- a/Podfile +++ b/Podfile @@ -2,3 +2,5 @@ platform :ios, '7.0' pod 'AFNetworking' pod 'BDBOAuth1Manager' +pod 'MBProgressHUD', '~> 0.5' + diff --git a/Podfile.lock b/Podfile.lock index 43e4c77..b1eeffc 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -21,13 +21,16 @@ PODS: - BDBOAuth1Manager (1.2.0): - AFNetworking/NSURLConnection (~> 2.2.0) - AFNetworking/NSURLSession (~> 2.2.0) + - MBProgressHUD (0.8) DEPENDENCIES: - AFNetworking - BDBOAuth1Manager + - MBProgressHUD (~> 0.5) SPEC CHECKSUMS: - AFNetworking: 0121f4b69be3fa58d1ab317866e036e12ac9651d - BDBOAuth1Manager: 25d18d56820695aa18aae44eecad55829274a290 + AFNetworking: 8dde8c8a6597ad95dac332a593c27e541bc87371 + BDBOAuth1Manager: 468477f0425ce24b3a19a34bbf176fac11225232 + MBProgressHUD: c356980b0cd097f19acec959b49dca5eb8ec31be -COCOAPODS: 0.29.0 +COCOAPODS: 0.33.1 diff --git a/Pods/BuildHeaders/MBProgressHUD/MBProgressHUD.h b/Pods/BuildHeaders/MBProgressHUD/MBProgressHUD.h new file mode 120000 index 0000000..6a8f158 --- /dev/null +++ b/Pods/BuildHeaders/MBProgressHUD/MBProgressHUD.h @@ -0,0 +1 @@ +../../MBProgressHUD/MBProgressHUD.h \ No newline at end of file diff --git a/Pods/Headers/MBProgressHUD/MBProgressHUD.h b/Pods/Headers/MBProgressHUD/MBProgressHUD.h new file mode 120000 index 0000000..6a8f158 --- /dev/null +++ b/Pods/Headers/MBProgressHUD/MBProgressHUD.h @@ -0,0 +1 @@ +../../MBProgressHUD/MBProgressHUD.h \ No newline at end of file diff --git a/Pods/MBProgressHUD/LICENSE b/Pods/MBProgressHUD/LICENSE new file mode 100644 index 0000000..c51b6b0 --- /dev/null +++ b/Pods/MBProgressHUD/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2013 Matej Bukovinski + +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 +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/Pods/MBProgressHUD/MBProgressHUD.h b/Pods/MBProgressHUD/MBProgressHUD.h new file mode 100755 index 0000000..26eadf6 --- /dev/null +++ b/Pods/MBProgressHUD/MBProgressHUD.h @@ -0,0 +1,484 @@ +// +// MBProgressHUD.h +// Version 0.8 +// Created by Matej Bukovinski on 2.4.09. +// + +// This code is distributed under the terms and conditions of the MIT license. + +// Copyright (c) 2013 Matej Bukovinski +// +// 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 +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#import +#import + +@protocol MBProgressHUDDelegate; + + +typedef enum { + /** Progress is shown using an UIActivityIndicatorView. This is the default. */ + MBProgressHUDModeIndeterminate, + /** Progress is shown using a round, pie-chart like, progress view. */ + MBProgressHUDModeDeterminate, + /** Progress is shown using a horizontal progress bar */ + MBProgressHUDModeDeterminateHorizontalBar, + /** Progress is shown using a ring-shaped progress view. */ + MBProgressHUDModeAnnularDeterminate, + /** Shows a custom view */ + MBProgressHUDModeCustomView, + /** Shows only labels */ + MBProgressHUDModeText +} MBProgressHUDMode; + +typedef enum { + /** Opacity animation */ + MBProgressHUDAnimationFade, + /** Opacity + scale animation */ + MBProgressHUDAnimationZoom, + MBProgressHUDAnimationZoomOut = MBProgressHUDAnimationZoom, + MBProgressHUDAnimationZoomIn +} MBProgressHUDAnimation; + + +#ifndef MB_INSTANCETYPE +#if __has_feature(objc_instancetype) + #define MB_INSTANCETYPE instancetype +#else + #define MB_INSTANCETYPE id +#endif +#endif + +#ifndef MB_STRONG +#if __has_feature(objc_arc) + #define MB_STRONG strong +#else + #define MB_STRONG retain +#endif +#endif + +#ifndef MB_WEAK +#if __has_feature(objc_arc_weak) + #define MB_WEAK weak +#elif __has_feature(objc_arc) + #define MB_WEAK unsafe_unretained +#else + #define MB_WEAK assign +#endif +#endif + +#if NS_BLOCKS_AVAILABLE +typedef void (^MBProgressHUDCompletionBlock)(); +#endif + + +/** + * Displays a simple HUD window containing a progress indicator and two optional labels for short messages. + * + * This is a simple drop-in class for displaying a progress HUD view similar to Apple's private UIProgressHUD class. + * The MBProgressHUD window spans over the entire space given to it by the initWithFrame constructor and catches all + * user input on this region, thereby preventing the user operations on components below the view. The HUD itself is + * drawn centered as a rounded semi-transparent view which resizes depending on the user specified content. + * + * This view supports four modes of operation: + * - MBProgressHUDModeIndeterminate - shows a UIActivityIndicatorView + * - MBProgressHUDModeDeterminate - shows a custom round progress indicator + * - MBProgressHUDModeAnnularDeterminate - shows a custom annular progress indicator + * - MBProgressHUDModeCustomView - shows an arbitrary, user specified view (@see customView) + * + * All three modes can have optional labels assigned: + * - If the labelText property is set and non-empty then a label containing the provided content is placed below the + * indicator view. + * - If also the detailsLabelText property is set then another label is placed below the first label. + */ +@interface MBProgressHUD : UIView + +/** + * Creates a new HUD, adds it to provided view and shows it. The counterpart to this method is hideHUDForView:animated:. + * + * @param view The view that the HUD will be added to + * @param animated If set to YES the HUD will appear using the current animationType. If set to NO the HUD will not use + * animations while appearing. + * @return A reference to the created HUD. + * + * @see hideHUDForView:animated: + * @see animationType + */ ++ (MB_INSTANCETYPE)showHUDAddedTo:(UIView *)view animated:(BOOL)animated; + +/** + * Finds the top-most HUD subview and hides it. The counterpart to this method is showHUDAddedTo:animated:. + * + * @param view The view that is going to be searched for a HUD subview. + * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use + * animations while disappearing. + * @return YES if a HUD was found and removed, NO otherwise. + * + * @see showHUDAddedTo:animated: + * @see animationType + */ ++ (BOOL)hideHUDForView:(UIView *)view animated:(BOOL)animated; + +/** + * Finds all the HUD subviews and hides them. + * + * @param view The view that is going to be searched for HUD subviews. + * @param animated If set to YES the HUDs will disappear using the current animationType. If set to NO the HUDs will not use + * animations while disappearing. + * @return the number of HUDs found and removed. + * + * @see hideHUDForView:animated: + * @see animationType + */ ++ (NSUInteger)hideAllHUDsForView:(UIView *)view animated:(BOOL)animated; + +/** + * Finds the top-most HUD subview and returns it. + * + * @param view The view that is going to be searched. + * @return A reference to the last HUD subview discovered. + */ ++ (MB_INSTANCETYPE)HUDForView:(UIView *)view; + +/** + * Finds all HUD subviews and returns them. + * + * @param view The view that is going to be searched. + * @return All found HUD views (array of MBProgressHUD objects). + */ ++ (NSArray *)allHUDsForView:(UIView *)view; + +/** + * A convenience constructor that initializes the HUD with the window's bounds. Calls the designated constructor with + * window.bounds as the parameter. + * + * @param window The window instance that will provide the bounds for the HUD. Should be the same instance as + * the HUD's superview (i.e., the window that the HUD will be added to). + */ +- (id)initWithWindow:(UIWindow *)window; + +/** + * A convenience constructor that initializes the HUD with the view's bounds. Calls the designated constructor with + * view.bounds as the parameter + * + * @param view The view instance that will provide the bounds for the HUD. Should be the same instance as + * the HUD's superview (i.e., the view that the HUD will be added to). + */ +- (id)initWithView:(UIView *)view; + +/** + * Display the HUD. You need to make sure that the main thread completes its run loop soon after this method call so + * the user interface can be updated. Call this method when your task is already set-up to be executed in a new thread + * (e.g., when using something like NSOperation or calling an asynchronous call like NSURLRequest). + * + * @param animated If set to YES the HUD will appear using the current animationType. If set to NO the HUD will not use + * animations while appearing. + * + * @see animationType + */ +- (void)show:(BOOL)animated; + +/** + * Hide the HUD. This still calls the hudWasHidden: delegate. This is the counterpart of the show: method. Use it to + * hide the HUD when your task completes. + * + * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use + * animations while disappearing. + * + * @see animationType + */ +- (void)hide:(BOOL)animated; + +/** + * Hide the HUD after a delay. This still calls the hudWasHidden: delegate. This is the counterpart of the show: method. Use it to + * hide the HUD when your task completes. + * + * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use + * animations while disappearing. + * @param delay Delay in seconds until the HUD is hidden. + * + * @see animationType + */ +- (void)hide:(BOOL)animated afterDelay:(NSTimeInterval)delay; + +/** + * Shows the HUD while a background task is executing in a new thread, then hides the HUD. + * + * This method also takes care of autorelease pools so your method does not have to be concerned with setting up a + * pool. + * + * @param method The method to be executed while the HUD is shown. This method will be executed in a new thread. + * @param target The object that the target method belongs to. + * @param object An optional object to be passed to the method. + * @param animated If set to YES the HUD will (dis)appear using the current animationType. If set to NO the HUD will not use + * animations while (dis)appearing. + */ +- (void)showWhileExecuting:(SEL)method onTarget:(id)target withObject:(id)object animated:(BOOL)animated; + +#if NS_BLOCKS_AVAILABLE + +/** + * Shows the HUD while a block is executing on a background queue, then hides the HUD. + * + * @see showAnimated:whileExecutingBlock:onQueue:completionBlock: + */ +- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block; + +/** + * Shows the HUD while a block is executing on a background queue, then hides the HUD. + * + * @see showAnimated:whileExecutingBlock:onQueue:completionBlock: + */ +- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block completionBlock:(MBProgressHUDCompletionBlock)completion; + +/** + * Shows the HUD while a block is executing on the specified dispatch queue, then hides the HUD. + * + * @see showAnimated:whileExecutingBlock:onQueue:completionBlock: + */ +- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue; + +/** + * Shows the HUD while a block is executing on the specified dispatch queue, executes completion block on the main queue, and then hides the HUD. + * + * @param animated If set to YES the HUD will (dis)appear using the current animationType. If set to NO the HUD will + * not use animations while (dis)appearing. + * @param block The block to be executed while the HUD is shown. + * @param queue The dispatch queue on which the block should be executed. + * @param completion The block to be executed on completion. + * + * @see completionBlock + */ +- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue + completionBlock:(MBProgressHUDCompletionBlock)completion; + +/** + * A block that gets called after the HUD was completely hidden. + */ +@property (copy) MBProgressHUDCompletionBlock completionBlock; + +#endif + +/** + * MBProgressHUD operation mode. The default is MBProgressHUDModeIndeterminate. + * + * @see MBProgressHUDMode + */ +@property (assign) MBProgressHUDMode mode; + +/** + * The animation type that should be used when the HUD is shown and hidden. + * + * @see MBProgressHUDAnimation + */ +@property (assign) MBProgressHUDAnimation animationType; + +/** + * The UIView (e.g., a UIImageView) to be shown when the HUD is in MBProgressHUDModeCustomView. + * For best results use a 37 by 37 pixel view (so the bounds match the built in indicator bounds). + */ +@property (MB_STRONG) UIView *customView; + +/** + * The HUD delegate object. + * + * @see MBProgressHUDDelegate + */ +@property (MB_WEAK) id delegate; + +/** + * An optional short message to be displayed below the activity indicator. The HUD is automatically resized to fit + * the entire text. If the text is too long it will get clipped by displaying "..." at the end. If left unchanged or + * set to @"", then no message is displayed. + */ +@property (copy) NSString *labelText; + +/** + * An optional details message displayed below the labelText message. This message is displayed only if the labelText + * property is also set and is different from an empty string (@""). The details text can span multiple lines. + */ +@property (copy) NSString *detailsLabelText; + +/** + * The opacity of the HUD window. Defaults to 0.8 (80% opacity). + */ +@property (assign) float opacity; + +/** + * The color of the HUD window. Defaults to black. If this property is set, color is set using + * this UIColor and the opacity property is not used. using retain because performing copy on + * UIColor base colors (like [UIColor greenColor]) cause problems with the copyZone. + */ +@property (MB_STRONG) UIColor *color; + +/** + * The x-axis offset of the HUD relative to the centre of the superview. + */ +@property (assign) float xOffset; + +/** + * The y-axis offset of the HUD relative to the centre of the superview. + */ +@property (assign) float yOffset; + +/** + * The amount of space between the HUD edge and the HUD elements (labels, indicators or custom views). + * Defaults to 20.0 + */ +@property (assign) float margin; + +/** + * Cover the HUD background view with a radial gradient. + */ +@property (assign) BOOL dimBackground; + +/* + * Grace period is the time (in seconds) that the invoked method may be run without + * showing the HUD. If the task finishes before the grace time runs out, the HUD will + * not be shown at all. + * This may be used to prevent HUD display for very short tasks. + * Defaults to 0 (no grace time). + * Grace time functionality is only supported when the task status is known! + * @see taskInProgress + */ +@property (assign) float graceTime; + +/** + * The minimum time (in seconds) that the HUD is shown. + * This avoids the problem of the HUD being shown and than instantly hidden. + * Defaults to 0 (no minimum show time). + */ +@property (assign) float minShowTime; + +/** + * Indicates that the executed operation is in progress. Needed for correct graceTime operation. + * If you don't set a graceTime (different than 0.0) this does nothing. + * This property is automatically set when using showWhileExecuting:onTarget:withObject:animated:. + * When threading is done outside of the HUD (i.e., when the show: and hide: methods are used directly), + * you need to set this property when your task starts and completes in order to have normal graceTime + * functionality. + */ +@property (assign) BOOL taskInProgress; + +/** + * Removes the HUD from its parent view when hidden. + * Defaults to NO. + */ +@property (assign) BOOL removeFromSuperViewOnHide; + +/** + * Font to be used for the main label. Set this property if the default is not adequate. + */ +@property (MB_STRONG) UIFont* labelFont; + +/** + * Font to be used for the details label. Set this property if the default is not adequate. + */ +@property (MB_STRONG) UIFont* detailsLabelFont; + +/** + * The progress of the progress indicator, from 0.0 to 1.0. Defaults to 0.0. + */ +@property (assign) float progress; + +/** + * The minimum size of the HUD bezel. Defaults to CGSizeZero (no minimum size). + */ +@property (assign) CGSize minSize; + +/** + * Force the HUD dimensions to be equal if possible. + */ +@property (assign, getter = isSquare) BOOL square; + +@end + + +@protocol MBProgressHUDDelegate + +@optional + +/** + * Called after the HUD was fully hidden from the screen. + */ +- (void)hudWasHidden:(MBProgressHUD *)hud; + +@end + + +/** + * A progress view for showing definite progress by filling up a circle (pie chart). + */ +@interface MBRoundProgressView : UIView + +/** + * Progress (0.0 to 1.0) + */ +@property (nonatomic, assign) float progress; + +/** + * Indicator progress color. + * Defaults to white [UIColor whiteColor] + */ +@property (nonatomic, MB_STRONG) UIColor *progressTintColor; + +/** + * Indicator background (non-progress) color. + * Defaults to translucent white (alpha 0.1) + */ +@property (nonatomic, MB_STRONG) UIColor *backgroundTintColor; + +/* + * Display mode - NO = round or YES = annular. Defaults to round. + */ +@property (nonatomic, assign, getter = isAnnular) BOOL annular; + +@end + + +/** + * A flat bar progress view. + */ +@interface MBBarProgressView : UIView + +/** + * Progress (0.0 to 1.0) + */ +@property (nonatomic, assign) float progress; + +/** + * Bar border line color. + * Defaults to white [UIColor whiteColor]. + */ +@property (nonatomic, MB_STRONG) UIColor *lineColor; + +/** + * Bar background color. + * Defaults to clear [UIColor clearColor]; + */ +@property (nonatomic, MB_STRONG) UIColor *progressRemainingColor; + +/** + * Bar progress color. + * Defaults to white [UIColor whiteColor]. + */ +@property (nonatomic, MB_STRONG) UIColor *progressColor; + +@end diff --git a/Pods/MBProgressHUD/MBProgressHUD.m b/Pods/MBProgressHUD/MBProgressHUD.m new file mode 100755 index 0000000..b1f2055 --- /dev/null +++ b/Pods/MBProgressHUD/MBProgressHUD.m @@ -0,0 +1,1008 @@ +// +// MBProgressHUD.m +// Version 0.8 +// Created by Matej Bukovinski on 2.4.09. +// + +#import "MBProgressHUD.h" + + +#if __has_feature(objc_arc) + #define MB_AUTORELEASE(exp) exp + #define MB_RELEASE(exp) exp + #define MB_RETAIN(exp) exp +#else + #define MB_AUTORELEASE(exp) [exp autorelease] + #define MB_RELEASE(exp) [exp release] + #define MB_RETAIN(exp) [exp retain] +#endif + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 60000 + #define MBLabelAlignmentCenter NSTextAlignmentCenter +#else + #define MBLabelAlignmentCenter UITextAlignmentCenter +#endif + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 + #define MB_TEXTSIZE(text, font) [text length] > 0 ? [text \ + sizeWithAttributes:@{NSFontAttributeName:font}] : CGSizeZero; +#else + #define MB_TEXTSIZE(text, font) [text length] > 0 ? [text sizeWithFont:font] : CGSizeZero; +#endif + +#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 + #define MB_MULTILINE_TEXTSIZE(text, font, maxSize, mode) [text length] > 0 ? [text \ + boundingRectWithSize:maxSize options:(NSStringDrawingUsesLineFragmentOrigin) \ + attributes:@{NSFontAttributeName:font} context:nil].size : CGSizeZero; +#else + #define MB_MULTILINE_TEXTSIZE(text, font, maxSize, mode) [text length] > 0 ? [text \ + sizeWithFont:font constrainedToSize:maxSize lineBreakMode:mode] : CGSizeZero; +#endif + + +static const CGFloat kPadding = 4.f; +static const CGFloat kLabelFontSize = 16.f; +static const CGFloat kDetailsLabelFontSize = 12.f; + + +@interface MBProgressHUD () + +- (void)setupLabels; +- (void)registerForKVO; +- (void)unregisterFromKVO; +- (NSArray *)observableKeypaths; +- (void)registerForNotifications; +- (void)unregisterFromNotifications; +- (void)updateUIForKeypath:(NSString *)keyPath; +- (void)hideUsingAnimation:(BOOL)animated; +- (void)showUsingAnimation:(BOOL)animated; +- (void)done; +- (void)updateIndicators; +- (void)handleGraceTimer:(NSTimer *)theTimer; +- (void)handleMinShowTimer:(NSTimer *)theTimer; +- (void)setTransformForCurrentOrientation:(BOOL)animated; +- (void)cleanUp; +- (void)launchExecution; +- (void)deviceOrientationDidChange:(NSNotification *)notification; +- (void)hideDelayed:(NSNumber *)animated; + +@property (atomic, MB_STRONG) UIView *indicator; +@property (atomic, MB_STRONG) NSTimer *graceTimer; +@property (atomic, MB_STRONG) NSTimer *minShowTimer; +@property (atomic, MB_STRONG) NSDate *showStarted; +@property (atomic, assign) CGSize size; + +@end + + +@implementation MBProgressHUD { + BOOL useAnimation; + SEL methodForExecution; + id targetForExecution; + id objectForExecution; + UILabel *label; + UILabel *detailsLabel; + BOOL isFinished; + CGAffineTransform rotationTransform; +} + +#pragma mark - Properties + +@synthesize animationType; +@synthesize delegate; +@synthesize opacity; +@synthesize color; +@synthesize labelFont; +@synthesize detailsLabelFont; +@synthesize indicator; +@synthesize xOffset; +@synthesize yOffset; +@synthesize minSize; +@synthesize square; +@synthesize margin; +@synthesize dimBackground; +@synthesize graceTime; +@synthesize minShowTime; +@synthesize graceTimer; +@synthesize minShowTimer; +@synthesize taskInProgress; +@synthesize removeFromSuperViewOnHide; +@synthesize customView; +@synthesize showStarted; +@synthesize mode; +@synthesize labelText; +@synthesize detailsLabelText; +@synthesize progress; +@synthesize size; +#if NS_BLOCKS_AVAILABLE +@synthesize completionBlock; +#endif + +#pragma mark - Class methods + ++ (MB_INSTANCETYPE)showHUDAddedTo:(UIView *)view animated:(BOOL)animated { + MBProgressHUD *hud = [[self alloc] initWithView:view]; + [view addSubview:hud]; + [hud show:animated]; + return MB_AUTORELEASE(hud); +} + ++ (BOOL)hideHUDForView:(UIView *)view animated:(BOOL)animated { + MBProgressHUD *hud = [self HUDForView:view]; + if (hud != nil) { + hud.removeFromSuperViewOnHide = YES; + [hud hide:animated]; + return YES; + } + return NO; +} + ++ (NSUInteger)hideAllHUDsForView:(UIView *)view animated:(BOOL)animated { + NSArray *huds = [MBProgressHUD allHUDsForView:view]; + for (MBProgressHUD *hud in huds) { + hud.removeFromSuperViewOnHide = YES; + [hud hide:animated]; + } + return [huds count]; +} + ++ (MB_INSTANCETYPE)HUDForView:(UIView *)view { + NSEnumerator *subviewsEnum = [view.subviews reverseObjectEnumerator]; + for (UIView *subview in subviewsEnum) { + if ([subview isKindOfClass:self]) { + return (MBProgressHUD *)subview; + } + } + return nil; +} + ++ (NSArray *)allHUDsForView:(UIView *)view { + NSMutableArray *huds = [NSMutableArray array]; + NSArray *subviews = view.subviews; + for (UIView *aView in subviews) { + if ([aView isKindOfClass:self]) { + [huds addObject:aView]; + } + } + return [NSArray arrayWithArray:huds]; +} + +#pragma mark - Lifecycle + +- (id)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + // Set default values for properties + self.animationType = MBProgressHUDAnimationFade; + self.mode = MBProgressHUDModeIndeterminate; + self.labelText = nil; + self.detailsLabelText = nil; + self.opacity = 0.8f; + self.color = nil; + self.labelFont = [UIFont boldSystemFontOfSize:kLabelFontSize]; + self.detailsLabelFont = [UIFont boldSystemFontOfSize:kDetailsLabelFontSize]; + self.xOffset = 0.0f; + self.yOffset = 0.0f; + self.dimBackground = NO; + self.margin = 20.0f; + self.graceTime = 0.0f; + self.minShowTime = 0.0f; + self.removeFromSuperViewOnHide = NO; + self.minSize = CGSizeZero; + self.square = NO; + self.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin + | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin; + + // Transparent background + self.opaque = NO; + self.backgroundColor = [UIColor clearColor]; + // Make it invisible for now + self.alpha = 0.0f; + + taskInProgress = NO; + rotationTransform = CGAffineTransformIdentity; + + [self setupLabels]; + [self updateIndicators]; + [self registerForKVO]; + [self registerForNotifications]; + } + return self; +} + +- (id)initWithView:(UIView *)view { + NSAssert(view, @"View must not be nil."); + return [self initWithFrame:view.bounds]; +} + +- (id)initWithWindow:(UIWindow *)window { + return [self initWithView:window]; +} + +- (void)dealloc { + [self unregisterFromNotifications]; + [self unregisterFromKVO]; +#if !__has_feature(objc_arc) + [color release]; + [indicator release]; + [label release]; + [detailsLabel release]; + [labelText release]; + [detailsLabelText release]; + [graceTimer release]; + [minShowTimer release]; + [showStarted release]; + [customView release]; +#if NS_BLOCKS_AVAILABLE + [completionBlock release]; +#endif + [super dealloc]; +#endif +} + +#pragma mark - Show & hide + +- (void)show:(BOOL)animated { + useAnimation = animated; + // If the grace time is set postpone the HUD display + if (self.graceTime > 0.0) { + self.graceTimer = [NSTimer scheduledTimerWithTimeInterval:self.graceTime target:self + selector:@selector(handleGraceTimer:) userInfo:nil repeats:NO]; + } + // ... otherwise show the HUD imediately + else { + [self setNeedsDisplay]; + [self showUsingAnimation:useAnimation]; + } +} + +- (void)hide:(BOOL)animated { + useAnimation = animated; + // If the minShow time is set, calculate how long the hud was shown, + // and pospone the hiding operation if necessary + if (self.minShowTime > 0.0 && showStarted) { + NSTimeInterval interv = [[NSDate date] timeIntervalSinceDate:showStarted]; + if (interv < self.minShowTime) { + self.minShowTimer = [NSTimer scheduledTimerWithTimeInterval:(self.minShowTime - interv) target:self + selector:@selector(handleMinShowTimer:) userInfo:nil repeats:NO]; + return; + } + } + // ... otherwise hide the HUD immediately + [self hideUsingAnimation:useAnimation]; +} + +- (void)hide:(BOOL)animated afterDelay:(NSTimeInterval)delay { + [self performSelector:@selector(hideDelayed:) withObject:[NSNumber numberWithBool:animated] afterDelay:delay]; +} + +- (void)hideDelayed:(NSNumber *)animated { + [self hide:[animated boolValue]]; +} + +#pragma mark - Timer callbacks + +- (void)handleGraceTimer:(NSTimer *)theTimer { + // Show the HUD only if the task is still running + if (taskInProgress) { + [self setNeedsDisplay]; + [self showUsingAnimation:useAnimation]; + } +} + +- (void)handleMinShowTimer:(NSTimer *)theTimer { + [self hideUsingAnimation:useAnimation]; +} + +#pragma mark - View Hierrarchy + +- (void)didMoveToSuperview { + // We need to take care of rotation ourselfs if we're adding the HUD to a window + if ([self.superview isKindOfClass:[UIWindow class]]) { + [self setTransformForCurrentOrientation:NO]; + } +} + +#pragma mark - Internal show & hide operations + +- (void)showUsingAnimation:(BOOL)animated { + if (animated && animationType == MBProgressHUDAnimationZoomIn) { + self.transform = CGAffineTransformConcat(rotationTransform, CGAffineTransformMakeScale(0.5f, 0.5f)); + } else if (animated && animationType == MBProgressHUDAnimationZoomOut) { + self.transform = CGAffineTransformConcat(rotationTransform, CGAffineTransformMakeScale(1.5f, 1.5f)); + } + self.showStarted = [NSDate date]; + // Fade in + if (animated) { + [UIView beginAnimations:nil context:NULL]; + [UIView setAnimationDuration:0.30]; + self.alpha = 1.0f; + if (animationType == MBProgressHUDAnimationZoomIn || animationType == MBProgressHUDAnimationZoomOut) { + self.transform = rotationTransform; + } + [UIView commitAnimations]; + } + else { + self.alpha = 1.0f; + } +} + +- (void)hideUsingAnimation:(BOOL)animated { + // Fade out + if (animated && showStarted) { + [UIView beginAnimations:nil context:NULL]; + [UIView setAnimationDuration:0.30]; + [UIView setAnimationDelegate:self]; + [UIView setAnimationDidStopSelector:@selector(animationFinished:finished:context:)]; + // 0.02 prevents the hud from passing through touches during the animation the hud will get completely hidden + // in the done method + if (animationType == MBProgressHUDAnimationZoomIn) { + self.transform = CGAffineTransformConcat(rotationTransform, CGAffineTransformMakeScale(1.5f, 1.5f)); + } else if (animationType == MBProgressHUDAnimationZoomOut) { + self.transform = CGAffineTransformConcat(rotationTransform, CGAffineTransformMakeScale(0.5f, 0.5f)); + } + + self.alpha = 0.02f; + [UIView commitAnimations]; + } + else { + self.alpha = 0.0f; + [self done]; + } + self.showStarted = nil; +} + +- (void)animationFinished:(NSString *)animationID finished:(BOOL)finished context:(void*)context { + [self done]; +} + +- (void)done { + isFinished = YES; + self.alpha = 0.0f; + if (removeFromSuperViewOnHide) { + [self removeFromSuperview]; + } +#if NS_BLOCKS_AVAILABLE + if (self.completionBlock) { + self.completionBlock(); + self.completionBlock = NULL; + } +#endif + if ([delegate respondsToSelector:@selector(hudWasHidden:)]) { + [delegate performSelector:@selector(hudWasHidden:) withObject:self]; + } +} + +#pragma mark - Threading + +- (void)showWhileExecuting:(SEL)method onTarget:(id)target withObject:(id)object animated:(BOOL)animated { + methodForExecution = method; + targetForExecution = MB_RETAIN(target); + objectForExecution = MB_RETAIN(object); + // Launch execution in new thread + self.taskInProgress = YES; + [NSThread detachNewThreadSelector:@selector(launchExecution) toTarget:self withObject:nil]; + // Show HUD view + [self show:animated]; +} + +#if NS_BLOCKS_AVAILABLE + +- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block { + dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); + [self showAnimated:animated whileExecutingBlock:block onQueue:queue completionBlock:NULL]; +} + +- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block completionBlock:(void (^)())completion { + dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); + [self showAnimated:animated whileExecutingBlock:block onQueue:queue completionBlock:completion]; +} + +- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue { + [self showAnimated:animated whileExecutingBlock:block onQueue:queue completionBlock:NULL]; +} + +- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue + completionBlock:(MBProgressHUDCompletionBlock)completion { + self.taskInProgress = YES; + self.completionBlock = completion; + dispatch_async(queue, ^(void) { + block(); + dispatch_async(dispatch_get_main_queue(), ^(void) { + [self cleanUp]; + }); + }); + [self show:animated]; +} + +#endif + +- (void)launchExecution { + @autoreleasepool { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Warc-performSelector-leaks" + // Start executing the requested task + [targetForExecution performSelector:methodForExecution withObject:objectForExecution]; +#pragma clang diagnostic pop + // Task completed, update view in main thread (note: view operations should + // be done only in the main thread) + [self performSelectorOnMainThread:@selector(cleanUp) withObject:nil waitUntilDone:NO]; + } +} + +- (void)cleanUp { + taskInProgress = NO; +#if !__has_feature(objc_arc) + [targetForExecution release]; + [objectForExecution release]; +#else + targetForExecution = nil; + objectForExecution = nil; +#endif + [self hide:useAnimation]; +} + +#pragma mark - UI + +- (void)setupLabels { + label = [[UILabel alloc] initWithFrame:self.bounds]; + label.adjustsFontSizeToFitWidth = NO; + label.textAlignment = MBLabelAlignmentCenter; + label.opaque = NO; + label.backgroundColor = [UIColor clearColor]; + label.textColor = [UIColor whiteColor]; + label.font = self.labelFont; + label.text = self.labelText; + [self addSubview:label]; + + detailsLabel = [[UILabel alloc] initWithFrame:self.bounds]; + detailsLabel.font = self.detailsLabelFont; + detailsLabel.adjustsFontSizeToFitWidth = NO; + detailsLabel.textAlignment = MBLabelAlignmentCenter; + detailsLabel.opaque = NO; + detailsLabel.backgroundColor = [UIColor clearColor]; + detailsLabel.textColor = [UIColor whiteColor]; + detailsLabel.numberOfLines = 0; + detailsLabel.font = self.detailsLabelFont; + detailsLabel.text = self.detailsLabelText; + [self addSubview:detailsLabel]; +} + +- (void)updateIndicators { + + BOOL isActivityIndicator = [indicator isKindOfClass:[UIActivityIndicatorView class]]; + BOOL isRoundIndicator = [indicator isKindOfClass:[MBRoundProgressView class]]; + + if (mode == MBProgressHUDModeIndeterminate && !isActivityIndicator) { + // Update to indeterminate indicator + [indicator removeFromSuperview]; + self.indicator = MB_AUTORELEASE([[UIActivityIndicatorView alloc] + initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]); + [(UIActivityIndicatorView *)indicator startAnimating]; + [self addSubview:indicator]; + } + else if (mode == MBProgressHUDModeDeterminateHorizontalBar) { + // Update to bar determinate indicator + [indicator removeFromSuperview]; + self.indicator = MB_AUTORELEASE([[MBBarProgressView alloc] init]); + [self addSubview:indicator]; + } + else if (mode == MBProgressHUDModeDeterminate || mode == MBProgressHUDModeAnnularDeterminate) { + if (!isRoundIndicator) { + // Update to determinante indicator + [indicator removeFromSuperview]; + self.indicator = MB_AUTORELEASE([[MBRoundProgressView alloc] init]); + [self addSubview:indicator]; + } + if (mode == MBProgressHUDModeAnnularDeterminate) { + [(MBRoundProgressView *)indicator setAnnular:YES]; + } + } + else if (mode == MBProgressHUDModeCustomView && customView != indicator) { + // Update custom view indicator + [indicator removeFromSuperview]; + self.indicator = customView; + [self addSubview:indicator]; + } else if (mode == MBProgressHUDModeText) { + [indicator removeFromSuperview]; + self.indicator = nil; + } +} + +#pragma mark - Layout + +- (void)layoutSubviews { + + // Entirely cover the parent view + UIView *parent = self.superview; + if (parent) { + self.frame = parent.bounds; + } + CGRect bounds = self.bounds; + + // Determine the total widt and height needed + CGFloat maxWidth = bounds.size.width - 4 * margin; + CGSize totalSize = CGSizeZero; + + CGRect indicatorF = indicator.bounds; + indicatorF.size.width = MIN(indicatorF.size.width, maxWidth); + totalSize.width = MAX(totalSize.width, indicatorF.size.width); + totalSize.height += indicatorF.size.height; + + CGSize labelSize = MB_TEXTSIZE(label.text, label.font); + labelSize.width = MIN(labelSize.width, maxWidth); + totalSize.width = MAX(totalSize.width, labelSize.width); + totalSize.height += labelSize.height; + if (labelSize.height > 0.f && indicatorF.size.height > 0.f) { + totalSize.height += kPadding; + } + + CGFloat remainingHeight = bounds.size.height - totalSize.height - kPadding - 4 * margin; + CGSize maxSize = CGSizeMake(maxWidth, remainingHeight); + CGSize detailsLabelSize = MB_MULTILINE_TEXTSIZE(detailsLabel.text, detailsLabel.font, maxSize, detailsLabel.lineBreakMode); + totalSize.width = MAX(totalSize.width, detailsLabelSize.width); + totalSize.height += detailsLabelSize.height; + if (detailsLabelSize.height > 0.f && (indicatorF.size.height > 0.f || labelSize.height > 0.f)) { + totalSize.height += kPadding; + } + + totalSize.width += 2 * margin; + totalSize.height += 2 * margin; + + // Position elements + CGFloat yPos = roundf(((bounds.size.height - totalSize.height) / 2)) + margin + yOffset; + CGFloat xPos = xOffset; + indicatorF.origin.y = yPos; + indicatorF.origin.x = roundf((bounds.size.width - indicatorF.size.width) / 2) + xPos; + indicator.frame = indicatorF; + yPos += indicatorF.size.height; + + if (labelSize.height > 0.f && indicatorF.size.height > 0.f) { + yPos += kPadding; + } + CGRect labelF; + labelF.origin.y = yPos; + labelF.origin.x = roundf((bounds.size.width - labelSize.width) / 2) + xPos; + labelF.size = labelSize; + label.frame = labelF; + yPos += labelF.size.height; + + if (detailsLabelSize.height > 0.f && (indicatorF.size.height > 0.f || labelSize.height > 0.f)) { + yPos += kPadding; + } + CGRect detailsLabelF; + detailsLabelF.origin.y = yPos; + detailsLabelF.origin.x = roundf((bounds.size.width - detailsLabelSize.width) / 2) + xPos; + detailsLabelF.size = detailsLabelSize; + detailsLabel.frame = detailsLabelF; + + // Enforce minsize and quare rules + if (square) { + CGFloat max = MAX(totalSize.width, totalSize.height); + if (max <= bounds.size.width - 2 * margin) { + totalSize.width = max; + } + if (max <= bounds.size.height - 2 * margin) { + totalSize.height = max; + } + } + if (totalSize.width < minSize.width) { + totalSize.width = minSize.width; + } + if (totalSize.height < minSize.height) { + totalSize.height = minSize.height; + } + + self.size = totalSize; +} + +#pragma mark BG Drawing + +- (void)drawRect:(CGRect)rect { + + CGContextRef context = UIGraphicsGetCurrentContext(); + UIGraphicsPushContext(context); + + if (self.dimBackground) { + //Gradient colours + size_t gradLocationsNum = 2; + CGFloat gradLocations[2] = {0.0f, 1.0f}; + CGFloat gradColors[8] = {0.0f,0.0f,0.0f,0.0f,0.0f,0.0f,0.0f,0.75f}; + CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); + CGGradientRef gradient = CGGradientCreateWithColorComponents(colorSpace, gradColors, gradLocations, gradLocationsNum); + CGColorSpaceRelease(colorSpace); + //Gradient center + CGPoint gradCenter= CGPointMake(self.bounds.size.width/2, self.bounds.size.height/2); + //Gradient radius + float gradRadius = MIN(self.bounds.size.width , self.bounds.size.height) ; + //Gradient draw + CGContextDrawRadialGradient (context, gradient, gradCenter, + 0, gradCenter, gradRadius, + kCGGradientDrawsAfterEndLocation); + CGGradientRelease(gradient); + } + + // Set background rect color + if (self.color) { + CGContextSetFillColorWithColor(context, self.color.CGColor); + } else { + CGContextSetGrayFillColor(context, 0.0f, self.opacity); + } + + + // Center HUD + CGRect allRect = self.bounds; + // Draw rounded HUD backgroud rect + CGRect boxRect = CGRectMake(roundf((allRect.size.width - size.width) / 2) + self.xOffset, + roundf((allRect.size.height - size.height) / 2) + self.yOffset, size.width, size.height); + float radius = 10.0f; + CGContextBeginPath(context); + CGContextMoveToPoint(context, CGRectGetMinX(boxRect) + radius, CGRectGetMinY(boxRect)); + CGContextAddArc(context, CGRectGetMaxX(boxRect) - radius, CGRectGetMinY(boxRect) + radius, radius, 3 * (float)M_PI / 2, 0, 0); + CGContextAddArc(context, CGRectGetMaxX(boxRect) - radius, CGRectGetMaxY(boxRect) - radius, radius, 0, (float)M_PI / 2, 0); + CGContextAddArc(context, CGRectGetMinX(boxRect) + radius, CGRectGetMaxY(boxRect) - radius, radius, (float)M_PI / 2, (float)M_PI, 0); + CGContextAddArc(context, CGRectGetMinX(boxRect) + radius, CGRectGetMinY(boxRect) + radius, radius, (float)M_PI, 3 * (float)M_PI / 2, 0); + CGContextClosePath(context); + CGContextFillPath(context); + + UIGraphicsPopContext(); +} + +#pragma mark - KVO + +- (void)registerForKVO { + for (NSString *keyPath in [self observableKeypaths]) { + [self addObserver:self forKeyPath:keyPath options:NSKeyValueObservingOptionNew context:NULL]; + } +} + +- (void)unregisterFromKVO { + for (NSString *keyPath in [self observableKeypaths]) { + [self removeObserver:self forKeyPath:keyPath]; + } +} + +- (NSArray *)observableKeypaths { + return [NSArray arrayWithObjects:@"mode", @"customView", @"labelText", @"labelFont", + @"detailsLabelText", @"detailsLabelFont", @"progress", nil]; +} + +- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { + if (![NSThread isMainThread]) { + [self performSelectorOnMainThread:@selector(updateUIForKeypath:) withObject:keyPath waitUntilDone:NO]; + } else { + [self updateUIForKeypath:keyPath]; + } +} + +- (void)updateUIForKeypath:(NSString *)keyPath { + if ([keyPath isEqualToString:@"mode"] || [keyPath isEqualToString:@"customView"]) { + [self updateIndicators]; + } else if ([keyPath isEqualToString:@"labelText"]) { + label.text = self.labelText; + } else if ([keyPath isEqualToString:@"labelFont"]) { + label.font = self.labelFont; + } else if ([keyPath isEqualToString:@"detailsLabelText"]) { + detailsLabel.text = self.detailsLabelText; + } else if ([keyPath isEqualToString:@"detailsLabelFont"]) { + detailsLabel.font = self.detailsLabelFont; + } else if ([keyPath isEqualToString:@"progress"]) { + if ([indicator respondsToSelector:@selector(setProgress:)]) { + [(id)indicator setProgress:progress]; + } + return; + } + [self setNeedsLayout]; + [self setNeedsDisplay]; +} + +#pragma mark - Notifications + +- (void)registerForNotifications { + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + [nc addObserver:self selector:@selector(deviceOrientationDidChange:) + name:UIDeviceOrientationDidChangeNotification object:nil]; +} + +- (void)unregisterFromNotifications { + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + +- (void)deviceOrientationDidChange:(NSNotification *)notification { + UIView *superview = self.superview; + if (!superview) { + return; + } else if ([superview isKindOfClass:[UIWindow class]]) { + [self setTransformForCurrentOrientation:YES]; + } else { + self.bounds = self.superview.bounds; + [self setNeedsDisplay]; + } +} + +- (void)setTransformForCurrentOrientation:(BOOL)animated { + // Stay in sync with the superview + if (self.superview) { + self.bounds = self.superview.bounds; + [self setNeedsDisplay]; + } + + UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation; + CGFloat radians = 0; + if (UIInterfaceOrientationIsLandscape(orientation)) { + if (orientation == UIInterfaceOrientationLandscapeLeft) { radians = -(CGFloat)M_PI_2; } + else { radians = (CGFloat)M_PI_2; } + // Window coordinates differ! + self.bounds = CGRectMake(0, 0, self.bounds.size.height, self.bounds.size.width); + } else { + if (orientation == UIInterfaceOrientationPortraitUpsideDown) { radians = (CGFloat)M_PI; } + else { radians = 0; } + } + rotationTransform = CGAffineTransformMakeRotation(radians); + + if (animated) { + [UIView beginAnimations:nil context:nil]; + } + [self setTransform:rotationTransform]; + if (animated) { + [UIView commitAnimations]; + } +} + +@end + + +@implementation MBRoundProgressView + +#pragma mark - Lifecycle + +- (id)init { + return [self initWithFrame:CGRectMake(0.f, 0.f, 37.f, 37.f)]; +} + +- (id)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + self.backgroundColor = [UIColor clearColor]; + self.opaque = NO; + _progress = 0.f; + _annular = NO; + _progressTintColor = [[UIColor alloc] initWithWhite:1.f alpha:1.f]; + _backgroundTintColor = [[UIColor alloc] initWithWhite:1.f alpha:.1f]; + [self registerForKVO]; + } + return self; +} + +- (void)dealloc { + [self unregisterFromKVO]; +#if !__has_feature(objc_arc) + [_progressTintColor release]; + [_backgroundTintColor release]; + [super dealloc]; +#endif +} + +#pragma mark - Drawing + +- (void)drawRect:(CGRect)rect { + + CGRect allRect = self.bounds; + CGRect circleRect = CGRectInset(allRect, 2.0f, 2.0f); + CGContextRef context = UIGraphicsGetCurrentContext(); + + if (_annular) { + // Draw background + CGFloat lineWidth = 5.f; + UIBezierPath *processBackgroundPath = [UIBezierPath bezierPath]; + processBackgroundPath.lineWidth = lineWidth; + processBackgroundPath.lineCapStyle = kCGLineCapRound; + CGPoint center = CGPointMake(self.bounds.size.width/2, self.bounds.size.height/2); + CGFloat radius = (self.bounds.size.width - lineWidth)/2; + CGFloat startAngle = - ((float)M_PI / 2); // 90 degrees + CGFloat endAngle = (2 * (float)M_PI) + startAngle; + [processBackgroundPath addArcWithCenter:center radius:radius startAngle:startAngle endAngle:endAngle clockwise:YES]; + [_backgroundTintColor set]; + [processBackgroundPath stroke]; + // Draw progress + UIBezierPath *processPath = [UIBezierPath bezierPath]; + processPath.lineCapStyle = kCGLineCapRound; + processPath.lineWidth = lineWidth; + endAngle = (self.progress * 2 * (float)M_PI) + startAngle; + [processPath addArcWithCenter:center radius:radius startAngle:startAngle endAngle:endAngle clockwise:YES]; + [_progressTintColor set]; + [processPath stroke]; + } else { + // Draw background + [_progressTintColor setStroke]; + [_backgroundTintColor setFill]; + CGContextSetLineWidth(context, 2.0f); + CGContextFillEllipseInRect(context, circleRect); + CGContextStrokeEllipseInRect(context, circleRect); + // Draw progress + CGPoint center = CGPointMake(allRect.size.width / 2, allRect.size.height / 2); + CGFloat radius = (allRect.size.width - 4) / 2; + CGFloat startAngle = - ((float)M_PI / 2); // 90 degrees + CGFloat endAngle = (self.progress * 2 * (float)M_PI) + startAngle; + CGContextSetRGBFillColor(context, 1.0f, 1.0f, 1.0f, 1.0f); // white + CGContextMoveToPoint(context, center.x, center.y); + CGContextAddArc(context, center.x, center.y, radius, startAngle, endAngle, 0); + CGContextClosePath(context); + CGContextFillPath(context); + } +} + +#pragma mark - KVO + +- (void)registerForKVO { + for (NSString *keyPath in [self observableKeypaths]) { + [self addObserver:self forKeyPath:keyPath options:NSKeyValueObservingOptionNew context:NULL]; + } +} + +- (void)unregisterFromKVO { + for (NSString *keyPath in [self observableKeypaths]) { + [self removeObserver:self forKeyPath:keyPath]; + } +} + +- (NSArray *)observableKeypaths { + return [NSArray arrayWithObjects:@"progressTintColor", @"backgroundTintColor", @"progress", @"annular", nil]; +} + +- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { + [self setNeedsDisplay]; +} + +@end + + +@implementation MBBarProgressView + +#pragma mark - Lifecycle + +- (id)init { + return [self initWithFrame:CGRectMake(.0f, .0f, 120.0f, 20.0f)]; +} + +- (id)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + _progress = 0.f; + _lineColor = [UIColor whiteColor]; + _progressColor = [UIColor whiteColor]; + _progressRemainingColor = [UIColor clearColor]; + self.backgroundColor = [UIColor clearColor]; + self.opaque = NO; + [self registerForKVO]; + } + return self; +} + +- (void)dealloc { + [self unregisterFromKVO]; +#if !__has_feature(objc_arc) + [_lineColor release]; + [_progressColor release]; + [_progressRemainingColor release]; + [super dealloc]; +#endif +} + +#pragma mark - Drawing + +- (void)drawRect:(CGRect)rect { + CGContextRef context = UIGraphicsGetCurrentContext(); + + // setup properties + CGContextSetLineWidth(context, 2); + CGContextSetStrokeColorWithColor(context,[_lineColor CGColor]); + CGContextSetFillColorWithColor(context, [_progressRemainingColor CGColor]); + + // draw line border + float radius = (rect.size.height / 2) - 2; + CGContextMoveToPoint(context, 2, rect.size.height/2); + CGContextAddArcToPoint(context, 2, 2, radius + 2, 2, radius); + CGContextAddLineToPoint(context, rect.size.width - radius - 2, 2); + CGContextAddArcToPoint(context, rect.size.width - 2, 2, rect.size.width - 2, rect.size.height / 2, radius); + CGContextAddArcToPoint(context, rect.size.width - 2, rect.size.height - 2, rect.size.width - radius - 2, rect.size.height - 2, radius); + CGContextAddLineToPoint(context, radius + 2, rect.size.height - 2); + CGContextAddArcToPoint(context, 2, rect.size.height - 2, 2, rect.size.height/2, radius); + CGContextFillPath(context); + + // draw progress background + CGContextMoveToPoint(context, 2, rect.size.height/2); + CGContextAddArcToPoint(context, 2, 2, radius + 2, 2, radius); + CGContextAddLineToPoint(context, rect.size.width - radius - 2, 2); + CGContextAddArcToPoint(context, rect.size.width - 2, 2, rect.size.width - 2, rect.size.height / 2, radius); + CGContextAddArcToPoint(context, rect.size.width - 2, rect.size.height - 2, rect.size.width - radius - 2, rect.size.height - 2, radius); + CGContextAddLineToPoint(context, radius + 2, rect.size.height - 2); + CGContextAddArcToPoint(context, 2, rect.size.height - 2, 2, rect.size.height/2, radius); + CGContextStrokePath(context); + + // setup to draw progress color + CGContextSetFillColorWithColor(context, [_progressColor CGColor]); + radius = radius - 2; + float amount = self.progress * rect.size.width; + + // if progress is in the middle area + if (amount >= radius + 4 && amount <= (rect.size.width - radius - 4)) { + // top + CGContextMoveToPoint(context, 4, rect.size.height/2); + CGContextAddArcToPoint(context, 4, 4, radius + 4, 4, radius); + CGContextAddLineToPoint(context, amount, 4); + CGContextAddLineToPoint(context, amount, radius + 4); + + // bottom + CGContextMoveToPoint(context, 4, rect.size.height/2); + CGContextAddArcToPoint(context, 4, rect.size.height - 4, radius + 4, rect.size.height - 4, radius); + CGContextAddLineToPoint(context, amount, rect.size.height - 4); + CGContextAddLineToPoint(context, amount, radius + 4); + + CGContextFillPath(context); + } + + // progress is in the right arc + else if (amount > radius + 4) { + float x = amount - (rect.size.width - radius - 4); + + // top + CGContextMoveToPoint(context, 4, rect.size.height/2); + CGContextAddArcToPoint(context, 4, 4, radius + 4, 4, radius); + CGContextAddLineToPoint(context, rect.size.width - radius - 4, 4); + float angle = -acos(x/radius); + if (isnan(angle)) angle = 0; + CGContextAddArc(context, rect.size.width - radius - 4, rect.size.height/2, radius, M_PI, angle, 0); + CGContextAddLineToPoint(context, amount, rect.size.height/2); + + // bottom + CGContextMoveToPoint(context, 4, rect.size.height/2); + CGContextAddArcToPoint(context, 4, rect.size.height - 4, radius + 4, rect.size.height - 4, radius); + CGContextAddLineToPoint(context, rect.size.width - radius - 4, rect.size.height - 4); + angle = acos(x/radius); + if (isnan(angle)) angle = 0; + CGContextAddArc(context, rect.size.width - radius - 4, rect.size.height/2, radius, -M_PI, angle, 1); + CGContextAddLineToPoint(context, amount, rect.size.height/2); + + CGContextFillPath(context); + } + + // progress is in the left arc + else if (amount < radius + 4 && amount > 0) { + // top + CGContextMoveToPoint(context, 4, rect.size.height/2); + CGContextAddArcToPoint(context, 4, 4, radius + 4, 4, radius); + CGContextAddLineToPoint(context, radius + 4, rect.size.height/2); + + // bottom + CGContextMoveToPoint(context, 4, rect.size.height/2); + CGContextAddArcToPoint(context, 4, rect.size.height - 4, radius + 4, rect.size.height - 4, radius); + CGContextAddLineToPoint(context, radius + 4, rect.size.height/2); + + CGContextFillPath(context); + } +} + +#pragma mark - KVO + +- (void)registerForKVO { + for (NSString *keyPath in [self observableKeypaths]) { + [self addObserver:self forKeyPath:keyPath options:NSKeyValueObservingOptionNew context:NULL]; + } +} + +- (void)unregisterFromKVO { + for (NSString *keyPath in [self observableKeypaths]) { + [self removeObserver:self forKeyPath:keyPath]; + } +} + +- (NSArray *)observableKeypaths { + return [NSArray arrayWithObjects:@"lineColor", @"progressRemainingColor", @"progressColor", @"progress", nil]; +} + +- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { + [self setNeedsDisplay]; +} + +@end diff --git a/Pods/MBProgressHUD/README.mdown b/Pods/MBProgressHUD/README.mdown new file mode 100644 index 0000000..d21bc65 --- /dev/null +++ b/Pods/MBProgressHUD/README.mdown @@ -0,0 +1,101 @@ +# MBProgressHUD [![Build Status](https://travis-ci.org/matej/MBProgressHUD.png)](https://travis-ci.org/matej/MBProgressHUD) + +MBProgressHUD is an iOS drop-in class that displays a translucent HUD with an indicator and/or labels while work is being done in a background thread. The HUD is meant as a replacement for the undocumented, private UIKit UIProgressHUD with some additional features. + +[![](http://dl.dropbox.com/u/378729/MBProgressHUD/1-thumb.png)](http://dl.dropbox.com/u/378729/MBProgressHUD/1.png) +[![](http://dl.dropbox.com/u/378729/MBProgressHUD/2-thumb.png)](http://dl.dropbox.com/u/378729/MBProgressHUD/2.png) +[![](http://dl.dropbox.com/u/378729/MBProgressHUD/3-thumb.png)](http://dl.dropbox.com/u/378729/MBProgressHUD/3.png) +[![](http://dl.dropbox.com/u/378729/MBProgressHUD/4-thumb.png)](http://dl.dropbox.com/u/378729/MBProgressHUD/4.png) +[![](http://dl.dropbox.com/u/378729/MBProgressHUD/5-thumb.png)](http://dl.dropbox.com/u/378729/MBProgressHUD/5.png) +[![](http://dl.dropbox.com/u/378729/MBProgressHUD/6-thumb.png)](http://dl.dropbox.com/u/378729/MBProgressHUD/6.png) +[![](http://dl.dropbox.com/u/378729/MBProgressHUD/7-thumb.png)](http://dl.dropbox.com/u/378729/MBProgressHUD/7.png) + +## Requirements + +MBProgressHUD works on any iOS version and is compatible with both ARC and non-ARC projects. It depends on the following Apple frameworks, which should already be included with most Xcode templates: + +* Foundation.framework +* UIKit.framework +* CoreGraphics.framework + +You will need LLVM 3.0 or later in order to build MBProgressHUD. + +## Adding MBProgressHUD to your project + +### Cocoapods + +[CocoaPods](http://cocoapods.org) is the recommended way to add MBProgressHUD to your project. + +1. Add a pod entry for MBProgressHUD to your Podfile `pod 'MBProgressHUD', '~> 0.8'` +2. Install the pod(s) by running `pod install`. +3. Include MBProgressHUD wherever you need it with `#import "MBProgressHUD.h"`. + +### Source files + +Alternatively you can directly add the `MBProgressHUD.h` and `MBProgressHUD.m` source files to your project. + +1. Download the [latest code version](https://github.com/matej/MBProgressHUD/archive/master.zip) or add the repository as a git submodule to your git-tracked project. +2. Open your project in Xcode, then drag and drop `MBProgressHUD.h` and `MBProgressHUD.m` onto your project (use the "Product Navigator view"). Make sure to select Copy items when asked if you extracted the code archive outside of your project. +3. Include MBProgressHUD wherever you need it with `#import "MBProgressHUD.h"`. + +### Static library + +You can also add MBProgressHUD as a static library to your project or workspace. + +1. Download the [latest code version](https://github.com/matej/MBProgressHUD/downloads) or add the repository as a git submodule to your git-tracked project. +2. Open your project in Xcode, then drag and drop `MBProgressHUD.xcodeproj` onto your project or workspace (use the "Product Navigator view"). +3. Select your target and go to the Build phases tab. In the Link Binary With Libraries section select the add button. On the sheet find and add `libMBProgressHUD.a`. You might also need to add `MBProgressHUD` to the Target Dependencies list. +4. Include MBProgressHUD wherever you need it with `#import `. + +## Usage + +The main guideline you need to follow when dealing with MBProgressHUD while running long-running tasks is keeping the main thread work-free, so the UI can be updated promptly. The recommended way of using MBProgressHUD is therefore to set it up on the main thread and then spinning the task, that you want to perform, off onto a new thread. + +```objective-c +[MBProgressHUD showHUDAddedTo:self.view animated:YES]; +dispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{ + // Do something... + dispatch_async(dispatch_get_main_queue(), ^{ + [MBProgressHUD hideHUDForView:self.view animated:YES]; + }); +}); +``` + +If you need to configure the HUD you can do this by using the MBProgressHUD reference that showHUDAddedTo:animated: returns. + +```objective-c +MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES]; +hud.mode = MBProgressHUDModeAnnularDeterminate; +hud.labelText = @"Loading"; +[self doSomethingInBackgroundWithProgressCallback:^(float progress) { + hud.progress = progress; +} completionCallback:^{ + [hud hide:YES]; +}]; +``` + +UI updates should always be done on the main thread. Some MBProgressHUD setters are however considered "thread safe" and can be called from background threads. Those also include `setMode:`, `setCustomView:`, `setLabelText:`, `setLabelFont:`, `setDetailsLabelText:`, `setDetailsLabelFont:` and `setProgress:`. + +If you need to run your long-running task in the main thread, you should perform it with a slight delay, so UIKit will have enough time to update the UI (i.e., draw the HUD) before you block the main thread with your task. + +```objective-c +[MBProgressHUD showHUDAddedTo:self.view animated:YES]; +dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, 0.01 * NSEC_PER_SEC); +dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ + // Do something... + [MBProgressHUD hideHUDForView:self.view animated:YES]; +}); +``` + +You should be aware that any HUD updates issued inside the above block won't be displayed until the block completes. + +For more examples, including how to use MBProgressHUD with asynchronous operations such as NSURLConnection, take a look at the bundled demo project. Extensive API documentation is provided in the header file (MBProgressHUD.h). + + +## License + +This code is distributed under the terms and conditions of the [MIT license](LICENSE). + +## Change-log + +A brief summary of each MBProgressHUD release can be found on the [wiki](https://github.com/matej/MBProgressHUD/wiki/Change-log). diff --git a/Pods/Manifest.lock b/Pods/Manifest.lock index 43e4c77..b1eeffc 100644 --- a/Pods/Manifest.lock +++ b/Pods/Manifest.lock @@ -21,13 +21,16 @@ PODS: - BDBOAuth1Manager (1.2.0): - AFNetworking/NSURLConnection (~> 2.2.0) - AFNetworking/NSURLSession (~> 2.2.0) + - MBProgressHUD (0.8) DEPENDENCIES: - AFNetworking - BDBOAuth1Manager + - MBProgressHUD (~> 0.5) SPEC CHECKSUMS: - AFNetworking: 0121f4b69be3fa58d1ab317866e036e12ac9651d - BDBOAuth1Manager: 25d18d56820695aa18aae44eecad55829274a290 + AFNetworking: 8dde8c8a6597ad95dac332a593c27e541bc87371 + BDBOAuth1Manager: 468477f0425ce24b3a19a34bbf176fac11225232 + MBProgressHUD: c356980b0cd097f19acec959b49dca5eb8ec31be -COCOAPODS: 0.29.0 +COCOAPODS: 0.33.1 diff --git a/Pods/Pods-AFNetworking-Private.xcconfig b/Pods/Pods-AFNetworking-Private.xcconfig index 8e3a35b..5026294 100644 --- a/Pods/Pods-AFNetworking-Private.xcconfig +++ b/Pods/Pods-AFNetworking-Private.xcconfig @@ -1,5 +1,5 @@ #include "Pods-AFNetworking.xcconfig" GCC_PREPROCESSOR_DEFINITIONS = COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/BuildHeaders" "${PODS_ROOT}/BuildHeaders/AFNetworking" "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/AFNetworking" "${PODS_ROOT}/Headers/BDBOAuth1Manager" +HEADER_SEARCH_PATHS = "${PODS_ROOT}/BuildHeaders" "${PODS_ROOT}/BuildHeaders/AFNetworking" "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/AFNetworking" "${PODS_ROOT}/Headers/BDBOAuth1Manager" "${PODS_ROOT}/Headers/MBProgressHUD" OTHER_LDFLAGS = -ObjC ${PODS_AFNETWORKING_OTHER_LDFLAGS} PODS_ROOT = ${SRCROOT} \ No newline at end of file diff --git a/Pods/Pods-AFNetworking-prefix.pch b/Pods/Pods-AFNetworking-prefix.pch index 73f7e08..95cf11d 100644 --- a/Pods/Pods-AFNetworking-prefix.pch +++ b/Pods/Pods-AFNetworking-prefix.pch @@ -3,9 +3,3 @@ #endif #import "Pods-environment.h" - - - - - - diff --git a/Pods/Pods-BDBOAuth1Manager-Private.xcconfig b/Pods/Pods-BDBOAuth1Manager-Private.xcconfig index fcfb995..a080145 100644 --- a/Pods/Pods-BDBOAuth1Manager-Private.xcconfig +++ b/Pods/Pods-BDBOAuth1Manager-Private.xcconfig @@ -1,5 +1,5 @@ #include "Pods-BDBOAuth1Manager.xcconfig" GCC_PREPROCESSOR_DEFINITIONS = COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/BuildHeaders" "${PODS_ROOT}/BuildHeaders/BDBOAuth1Manager" "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/AFNetworking" "${PODS_ROOT}/Headers/BDBOAuth1Manager" +HEADER_SEARCH_PATHS = "${PODS_ROOT}/BuildHeaders" "${PODS_ROOT}/BuildHeaders/BDBOAuth1Manager" "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/AFNetworking" "${PODS_ROOT}/Headers/BDBOAuth1Manager" "${PODS_ROOT}/Headers/MBProgressHUD" OTHER_LDFLAGS = -ObjC PODS_ROOT = ${SRCROOT} \ No newline at end of file diff --git a/Pods/Pods-MBProgressHUD-Private.xcconfig b/Pods/Pods-MBProgressHUD-Private.xcconfig new file mode 100644 index 0000000..d07f29f --- /dev/null +++ b/Pods/Pods-MBProgressHUD-Private.xcconfig @@ -0,0 +1,5 @@ +#include "Pods-MBProgressHUD.xcconfig" +GCC_PREPROCESSOR_DEFINITIONS = COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/BuildHeaders" "${PODS_ROOT}/BuildHeaders/MBProgressHUD" "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/AFNetworking" "${PODS_ROOT}/Headers/BDBOAuth1Manager" "${PODS_ROOT}/Headers/MBProgressHUD" +OTHER_LDFLAGS = -ObjC ${PODS_MBPROGRESSHUD_OTHER_LDFLAGS} +PODS_ROOT = ${SRCROOT} \ No newline at end of file diff --git a/Pods/Pods-MBProgressHUD-dummy.m b/Pods/Pods-MBProgressHUD-dummy.m new file mode 100644 index 0000000..10d445d --- /dev/null +++ b/Pods/Pods-MBProgressHUD-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_MBProgressHUD : NSObject +@end +@implementation PodsDummy_Pods_MBProgressHUD +@end diff --git a/Pods/Pods-MBProgressHUD-prefix.pch b/Pods/Pods-MBProgressHUD-prefix.pch new file mode 100644 index 0000000..95cf11d --- /dev/null +++ b/Pods/Pods-MBProgressHUD-prefix.pch @@ -0,0 +1,5 @@ +#ifdef __OBJC__ +#import +#endif + +#import "Pods-environment.h" diff --git a/Pods/Pods-MBProgressHUD.xcconfig b/Pods/Pods-MBProgressHUD.xcconfig new file mode 100644 index 0000000..e1c175d --- /dev/null +++ b/Pods/Pods-MBProgressHUD.xcconfig @@ -0,0 +1 @@ +PODS_MBPROGRESSHUD_OTHER_LDFLAGS = -framework CoreGraphics \ No newline at end of file diff --git a/Pods/Pods-acknowledgements.markdown b/Pods/Pods-acknowledgements.markdown index c3178b2..64c945b 100644 --- a/Pods/Pods-acknowledgements.markdown +++ b/Pods/Pods-acknowledgements.markdown @@ -47,4 +47,26 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +## MBProgressHUD + +Copyright (c) 2013 Matej Bukovinski + +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 +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. Generated by CocoaPods - http://cocoapods.org diff --git a/Pods/Pods-acknowledgements.plist b/Pods/Pods-acknowledgements.plist index ef0440a..81b8207 100644 --- a/Pods/Pods-acknowledgements.plist +++ b/Pods/Pods-acknowledgements.plist @@ -67,6 +67,32 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Type PSGroupSpecifier + + FooterText + Copyright (c) 2013 Matej Bukovinski + +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 +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + Title + MBProgressHUD + Type + PSGroupSpecifier + FooterText Generated by CocoaPods - http://cocoapods.org diff --git a/Pods/Pods-environment.h b/Pods/Pods-environment.h index 28c7231..37f6296 100644 --- a/Pods/Pods-environment.h +++ b/Pods/Pods-environment.h @@ -54,3 +54,9 @@ #define COCOAPODS_VERSION_MINOR_BDBOAuth1Manager 2 #define COCOAPODS_VERSION_PATCH_BDBOAuth1Manager 0 +// MBProgressHUD +#define COCOAPODS_POD_AVAILABLE_MBProgressHUD +#define COCOAPODS_VERSION_MAJOR_MBProgressHUD 0 +#define COCOAPODS_VERSION_MINOR_MBProgressHUD 8 +#define COCOAPODS_VERSION_PATCH_MBProgressHUD 0 + diff --git a/Pods/Pods.xcconfig b/Pods/Pods.xcconfig index 17540e8..e5bff49 100644 --- a/Pods/Pods.xcconfig +++ b/Pods/Pods.xcconfig @@ -1,5 +1,5 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/AFNetworking" "${PODS_ROOT}/Headers/BDBOAuth1Manager" -OTHER_CFLAGS = $(inherited) "-isystem${PODS_ROOT}/Headers" "-isystem${PODS_ROOT}/Headers/AFNetworking" "-isystem${PODS_ROOT}/Headers/BDBOAuth1Manager" +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/AFNetworking" "${PODS_ROOT}/Headers/BDBOAuth1Manager" "${PODS_ROOT}/Headers/MBProgressHUD" +OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers" -isystem "${PODS_ROOT}/Headers/AFNetworking" -isystem "${PODS_ROOT}/Headers/BDBOAuth1Manager" -isystem "${PODS_ROOT}/Headers/MBProgressHUD" OTHER_LDFLAGS = -ObjC -framework CoreGraphics -framework MobileCoreServices -framework Security -framework SystemConfiguration PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file diff --git a/Pods/Pods.xcodeproj/project.pbxproj b/Pods/Pods.xcodeproj/project.pbxproj index a4d4008..b0d6075 100644 --- a/Pods/Pods.xcodeproj/project.pbxproj +++ b/Pods/Pods.xcodeproj/project.pbxproj @@ -10,22 +10,19 @@ 46 objects - 0028127B92A44A72B3F81B32 + 0162C08ECBE34AE48AEBEC40 - includeInIndex - 1 + fileRef + A9FF5AE9AEAB4390B4592F45 isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - name - AFURLRequestSerialization.h - path - AFNetworking/AFURLRequestSerialization.h - sourceTree - <group> + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + - 02E89E8A8078408F8CBD15D6 + 0A53D991DC77403BAB303634 includeInIndex 1 @@ -34,51 +31,82 @@ lastKnownFileType sourcecode.c.objc name - AFURLConnectionOperation.m + AFHTTPRequestOperationManager.m path - AFNetworking/AFURLConnectionOperation.m + AFNetworking/AFHTTPRequestOperationManager.m sourceTree <group> - 03606861C0D9462084CAE6D1 + 0BA9E9A472F0480EB0A31A0D - includeInIndex - 1 + buildConfigurations + + A974C4B704674487BA2BAF52 + E0E488ADCCBB405A9AE088FE + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release isa - PBXFileReference - lastKnownFileType - text - path - Pods-acknowledgements.markdown + XCConfigurationList + + 117E27A9720344458AB8B07D + + buildConfigurations + + 50B407D622F747AC976CDD59 + 5F58CB8921DA41FB94CFBA02 + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + 121A367EF79B490985077C1F + + fileRef + 296634217A80463F812FB928 + isa + PBXBuildFile + + 1383686CEA9E4FC090D8E91F + + children + + 5F508211551743009A3B483B + 9B6CFB3379E54DBBB56E14D7 + 39403AE4F78D4B4BBA679BA5 + 3FE65B2103AD4A09AC40DED7 + + isa + PBXGroup + name + NSURLSession sourceTree <group> - 04137369DAC147DFA0BC9DD3 + 13EBBE9AAEB04A9081061F6F includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h + name + UIRefreshControl+AFNetworking.h path - Pods-BDBOAuth1Manager-dummy.m + UIKit+AFNetworking/UIRefreshControl+AFNetworking.h sourceTree <group> - 0862550EF0E1431BADA22463 - - isa - PBXTargetDependency - target - BA3292AA93EC4C249841C31D - targetProxy - 62231323D3774C4F9EE53E37 - - 08BEDD7D3F874F4E8F9CC7E3 + 15FEBF8AD05F43F797EF8A5F fileRef - 5FCAED4760BB4BC38E9EF0A6 + 9B6CFB3379E54DBBB56E14D7 isa PBXBuildFile settings @@ -87,10 +115,10 @@ -fobjc-arc - 0ACD622641C54AFCBDC637E3 + 182F448103304F90A3E7307F fileRef - 3832820606024CFD839129A5 + 1DB0DED179BB47138A2D31BE isa PBXBuildFile settings @@ -99,7 +127,7 @@ -fobjc-arc - 0D25440A9D0640C9B045CDB1 + 191BE84524C34017BBB8C4E3 includeInIndex 1 @@ -108,40 +136,31 @@ lastKnownFileType sourcecode.c.h name - UIImageView+AFNetworking.h + UIProgressView+AFNetworking.h path - UIKit+AFNetworking/UIImageView+AFNetworking.h + UIKit+AFNetworking/UIProgressView+AFNetworking.h sourceTree <group> - 0DD384B7AE7B464683EFB5E3 - - fileRef - 04137369DAC147DFA0BC9DD3 - isa - PBXBuildFile - - 11AD6073DD684803BC5513E9 + 1ADAE5B1DB6E4607944FB2B6 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h - name - AFURLResponseSerialization.h + sourcecode.c.objc path - AFNetworking/AFURLResponseSerialization.h + Pods-AFNetworking-dummy.m sourceTree <group> - 1203B8C7C1324F699E85E765 + 1AF06F9AF57E4E41A082CCB4 buildConfigurations - 7E6DF8CF142347069D40A51A - 7A16570C975F44F5914B0CCF + 6972D7C6D77D4EBE8A8DD8A3 + 30598384926C43AE89E443E4 defaultConfigurationIsVisible 0 @@ -150,65 +169,40 @@ isa XCConfigurationList - 13727B6FC14D4AA78E94FB4F - - fileRef - D7E0786CD2CF4813A9E00ACD - isa - PBXBuildFile - - 152B2FEB73DE4F95BEA984DE - - fileRef - 816D049BC0484A92B4100FE0 - isa - PBXBuildFile - settings - - COMPILER_FLAGS - -fobjc-arc - - - 168C68BC2923492AA51810C1 + 1D0EFA9990F5415F917F87EE children - 32EBEEE13B564A81B69C35F8 - AECE7BD8C1B444F0B719B42A - 7758E9EB57B84895AE638F77 - F9B2B226227042FD99767222 - 1C31A43BDE5547599B75099B - CDB1B59A7A264CB0A10A7A56 - 2CBD3C2B674A454FA488BCCB - F8C7E0D223F540FFACA5D61B - 500C24E4D8374390921B9457 - 47E73E0A4D3346389D40F5B7 - 736DD9FE41DA489CAF2029E9 + ADC08269D1EF4489B11F6DC2 + 38E361F6703C489492AAAF40 + 437F6530CC7E4CD8B25B4549 + 0A53D991DC77403BAB303634 + 454E0FE0524C4048A4029215 + 9F53427C9DF640BC94259FF8 isa PBXGroup name - BDBOAuth1Manager - path - BDBOAuth1Manager + NSURLConnection sourceTree <group> - 172D170FA07A439A9E5313D9 - - fileRef - D58D00B5A527408FAEC0AA35 - isa - PBXBuildFile - - 175D58CBD46C43F89C4972E6 + 1DB0DED179BB47138A2D31BE - fileRef - 1C31A43BDE5547599B75099B + includeInIndex + 1 isa - PBXBuildFile + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + BDBOAuth1SessionManager.m + path + BDBOAuth1Manager/BDBOAuth1SessionManager.m + sourceTree + <group> - 195179D03AFB494E9A6FC86D + 1FB93D9246A4460085C2F3F0 includeInIndex 1 @@ -216,116 +210,67 @@ PBXFileReference lastKnownFileType sourcecode.c.objc - name - UIAlertView+AFNetworking.m path - UIKit+AFNetworking/UIAlertView+AFNetworking.m + MBProgressHUD.m sourceTree <group> - 1B2FB7F0D08C491BA75129CD + 1FFE760DD36F4A03A928C077 fileRef - 6041EEA4FD8548989172B7A3 + 7837B80B9CAA4925930C61A5 isa PBXBuildFile - 1C31A43BDE5547599B75099B + 2056F30D54C440C38BEE1ECA - includeInIndex - 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + wrapper.framework name - BDBOAuth1SessionManager.h + Foundation.framework path - BDBOAuth1Manager/BDBOAuth1SessionManager.h + Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/System/Library/Frameworks/Foundation.framework sourceTree - <group> + DEVELOPER_DIR - 1CE4A0F0ECF44A5BAC3C6AEE + 20601FFA1C4D4E60971482F1 - children - - E3BD331831244E6F9BA72A49 - 76DD6410EF4B4872A699BD18 - A7541F134A464E94953865F5 - + includeInIndex + 1 isa - PBXGroup + PBXFileReference + lastKnownFileType + sourcecode.c.objc name - Products + UIAlertView+AFNetworking.m + path + UIKit+AFNetworking/UIAlertView+AFNetworking.m sourceTree <group> - 1D0143C0D1F6457695989E23 + 2093D98870194E7DB657D685 fileRef - B88A8B2C836342FF9287BD86 + 892B9EB7F373473493383DDF isa PBXBuildFile - 1DD22AACFD574E98ACB08362 + 20ACB052939949AF89A2A1CB includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc - name - UIActivityIndicatorView+AFNetworking.m + text.xcconfig path - UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.m + Pods-AFNetworking-Private.xcconfig sourceTree <group> - 1E342FA6877E49BE85317401 - - containerPortal - 4E3E557B13204629994D3BB8 - isa - PBXContainerItemProxy - proxyType - 1 - remoteGlobalIDString - BA3292AA93EC4C249841C31D - remoteInfo - Pods-AFNetworking - - 2085B639350248C0950BBE3A - - buildActionMask - 2147483647 - files - - 827035396690490AB8A3F874 - A5E32BC8C3054CD89DE5DCC3 - C56D7ADFBB7E499DB1FE674C - B6FABB9473164729989393F7 - 08BEDD7D3F874F4E8F9CC7E3 - 75DD5AA3145F4A70997A7C7F - A79E0D731B974EBBB5F0134D - E17E2D6E23144E4BA819A316 - 91281656E20D41E5B5E3F1A7 - 0ACD622641C54AFCBDC637E3 - 172D170FA07A439A9E5313D9 - A028940A29FB4B4D9B7E00A0 - 8A098B51842A4CA8B5AA72C7 - C3B925F8A71846BBB1748F08 - 30DB85C575A448758285F008 - 152B2FEB73DE4F95BEA984DE - 2B5683AC64394F09A9F08121 - 57CE5B4E393947D99DA1B789 - - isa - PBXSourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 241368771B3F42BB8EDB63C4 + 216B711A045343308D9FFE27 includeInIndex 1 @@ -334,13 +279,13 @@ lastKnownFileType sourcecode.c.h name - UIRefreshControl+AFNetworking.h + NSDictionary+BDBOAuth1Manager.h path - UIKit+AFNetworking/UIRefreshControl+AFNetworking.h + BDBOAuth1Manager/Categories/NSDictionary+BDBOAuth1Manager.h sourceTree <group> - 26267C75A8DD441EBB26B2D7 + 21A81ECC70214D5EBA2EE463 includeInIndex 1 @@ -355,84 +300,80 @@ sourceTree <group> - 284B97FE6A8E40D59B7D06FF + 22B8423BA276416F8C6A1A07 - includeInIndex - 1 + buildConfigurations + + 3F85E16D25CA4172B7A464F4 + 66F62E17476545F0BE2547C2 + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - name - AFNetworkActivityIndicatorManager.m - path - UIKit+AFNetworking/AFNetworkActivityIndicatorManager.m - sourceTree - <group> + XCConfigurationList + + 23AF226022CE413FBB31B245 + + buildActionMask + 2147483647 + files + + 498CC935DD1446C98CC412A0 + + isa + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 - 2875857077FA4A5CBD30924B + 251D048746FB429A92FDBDBE includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc - name - UIRefreshControl+AFNetworking.m + text.plist.xml path - UIKit+AFNetworking/UIRefreshControl+AFNetworking.m + Pods-acknowledgements.plist sourceTree <group> - 2B5683AC64394F09A9F08121 + 27A9618A8432486F9A994CC2 fileRef - 2875857077FA4A5CBD30924B + 408BC35B490F4B20A1DB4D48 + isa + PBXBuildFile + + 2824180F78FD41CABF73F0A8 + + fileRef + 21A81ECC70214D5EBA2EE463 isa PBXBuildFile - settings - - COMPILER_FLAGS - -fobjc-arc - - 2C2A64BFA0204EC38FA9514C + 28C0365611054673A93B1AC2 + baseConfigurationReference + 3B05440FD75647CD983AA5F0 buildSettings ALWAYS_SEARCH_USER_PATHS NO - CLANG_CXX_LANGUAGE_STANDARD - gnu++0x - CLANG_CXX_LIBRARY - libc++ - CLANG_ENABLE_MODULES - YES - CLANG_ENABLE_OBJC_ARC - NO - CLANG_WARN_BOOL_CONVERSION - YES - CLANG_WARN_CONSTANT_CONVERSION - YES - CLANG_WARN_DIRECT_OBJC_ISA_USAGE - YES_ERROR - CLANG_WARN_EMPTY_BODY - YES - CLANG_WARN_ENUM_CONVERSION - YES - CLANG_WARN_INT_CONVERSION - YES - CLANG_WARN_OBJC_ROOT_CLASS - YES_ERROR COPY_PHASE_STRIP - YES + NO + DSTROOT + /tmp/xcodeproj.dst GCC_C_LANGUAGE_STANDARD gnu99 GCC_DYNAMIC_NO_PIC NO GCC_OPTIMIZATION_LEVEL 0 + GCC_PRECOMPILE_PREFIX_HEADER + YES GCC_PREPROCESSOR_DEFINITIONS DEBUG=1 @@ -440,31 +381,29 @@ GCC_SYMBOLS_PRIVATE_EXTERN NO - GCC_WARN_64_TO_32_BIT_CONVERSION - YES - GCC_WARN_ABOUT_RETURN_TYPE - YES_ERROR - GCC_WARN_UNDECLARED_SELECTOR - YES - GCC_WARN_UNINITIALIZED_AUTOS - YES - GCC_WARN_UNUSED_FUNCTION - YES - GCC_WARN_UNUSED_VARIABLE - YES + GCC_VERSION + com.apple.compilers.llvm.clang.1_0 + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) IPHONEOS_DEPLOYMENT_TARGET 7.0 - ONLY_ACTIVE_ARCH + OTHER_LDFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL YES - STRIP_INSTALLED_PRODUCT - NO isa XCBuildConfiguration name Debug - 2CBD3C2B674A454FA488BCCB + 296634217A80463F812FB928 includeInIndex 1 @@ -473,26 +412,68 @@ lastKnownFileType sourcecode.c.h name - NSDictionary+BDBOAuth1Manager.h + AFSecurityPolicy.h path - BDBOAuth1Manager/Categories/NSDictionary+BDBOAuth1Manager.h + AFNetworking/AFSecurityPolicy.h sourceTree <group> - 2CE19D17FE244346AA16CA80 + 2A8B6064A3514D859DF375CB + includeInIndex + 1 isa PBXFileReference lastKnownFileType - wrapper.framework + sourcecode.c.h name - CoreGraphics.framework + UIAlertView+AFNetworking.h path - Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/CoreGraphics.framework + UIKit+AFNetworking/UIAlertView+AFNetworking.h sourceTree - DEVELOPER_DIR + <group> + + 2B8B9B9A4AA24023B5A914D0 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + Pods-MBProgressHUD-prefix.pch + sourceTree + <group> + + 2CF58F506E0F4F29A29F1933 + + fileRef + 9F53427C9DF640BC94259FF8 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 2F576CAAD4A24FFD86361AB2 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + AFNetworking.h + path + AFNetworking/AFNetworking.h + sourceTree + <group> - 2D16D57790704DE8A84D7A88 + 30598384926C43AE89E443E4 buildSettings @@ -511,7 +492,7 @@ CLANG_WARN_CONSTANT_CONVERSION YES CLANG_WARN_DIRECT_OBJC_ISA_USAGE - YES_ERROR + YES CLANG_WARN_EMPTY_BODY YES CLANG_WARN_ENUM_CONVERSION @@ -519,7 +500,7 @@ CLANG_WARN_INT_CONVERSION YES CLANG_WARN_OBJC_ROOT_CLASS - YES_ERROR + YES COPY_PHASE_STRIP NO ENABLE_NS_ASSERTIONS @@ -529,7 +510,7 @@ GCC_WARN_64_TO_32_BIT_CONVERSION YES GCC_WARN_ABOUT_RETURN_TYPE - YES_ERROR + YES GCC_WARN_UNDECLARED_SELECTOR YES GCC_WARN_UNINITIALIZED_AUTOS @@ -550,10 +531,10 @@ name Release - 2DC3991DC3FD44E58E51F109 + 31154E8F1CAC4E0CA4B5D5A3 fileRef - AECE7BD8C1B444F0B719B42A + 7A1087842AA74F39BD338767 isa PBXBuildFile settings @@ -562,49 +543,34 @@ -fobjc-arc - 2F764968162C4DCFBDBEE6EE + 318811E7C4064E7D955E5FA7 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h - name - AFNetworkReachabilityManager.h + sourcecode.c.objc path - AFNetworking/AFNetworkReachabilityManager.h + Pods-MBProgressHUD-dummy.m sourceTree <group> - 2FF3F1152A1249F69624BD15 + 3191666CBC68482F87C318A0 - includeInIndex - 1 + fileRef + 36F5D8A079FD49EBA955E1D8 isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - name - AFHTTPRequestOperationManager.h - path - AFNetworking/AFHTTPRequestOperationManager.h - sourceTree - <group> + PBXBuildFile - 30DB85C575A448758285F008 + 333867E34A904A639D894DDB fileRef - 675F54EE7C844CFF9B022DC6 + 7D5A8CCD7F5046518E2E7957 isa PBXBuildFile - settings - - COMPILER_FLAGS - -fobjc-arc - - 32EBEEE13B564A81B69C35F8 + 34494644DE7D4F9A93E9308F includeInIndex 1 @@ -613,158 +579,89 @@ lastKnownFileType sourcecode.c.h name - BDBOAuth1RequestOperationManager.h + UIButton+AFNetworking.h path - BDBOAuth1Manager/BDBOAuth1RequestOperationManager.h + UIKit+AFNetworking/UIButton+AFNetworking.h sourceTree <group> - 37281E23E7D64E3AAC1B9326 - - fileRef - A7541F134A464E94953865F5 - isa - PBXBuildFile - - 3784BC628509444CA07A46D3 + 348A4DB151F14EE2A6E44FC0 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h name - AFHTTPRequestOperationManager.m + BDBOAuth1RequestSerializer.h path - AFNetworking/AFHTTPRequestOperationManager.m + BDBOAuth1Manager/BDBOAuth1RequestSerializer.h sourceTree <group> - 3832820606024CFD839129A5 + 34AC9AFE05C54AC79CBC5816 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc - name - AFURLSessionManager.m + text.xcconfig path - AFNetworking/AFURLSessionManager.m + Pods-BDBOAuth1Manager-Private.xcconfig sourceTree <group> - 38DC109300EA4AEE98D8E07F + 3519F07C2E014ECC830D66EF fileRef - 2CE19D17FE244346AA16CA80 + 3EC3DC94D6B4457FAE0327F1 isa PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + - 39B7902F884247ACBB3ACD97 + 35F3984D7618419DB710E86E buildActionMask 2147483647 files - 38DC109300EA4AEE98D8E07F - E754DC1DE3E044108A18104F - 55694747B9124AF583948FCA - A3DD400530D04932BF87ECC6 - 67CFC3B711204B1F86F970D2 + B2CD88FE313A4BDCA9ED4A5C + 3191666CBC68482F87C318A0 + DB3090B73EFA41CA80247C11 + 8BC20E55E5BE4F0BA5F233F4 isa PBXFrameworksBuildPhase runOnlyForDeploymentPostprocessing 0 - 3ADFDC4C2D6C40FDA9C166B0 - - buildConfigurationList - F4E2B8DB00D4445890ADA4FB - buildPhases - - 57B8005E049C49E9BC019F94 - CE3AFAC471A549E5A893CFA9 - - buildRules - - dependencies - - B977314728ED4B3B91D1BFCF - C80B52E86B0C489DB7EA5D09 - - isa - PBXNativeTarget - name - Pods - productName - Pods - productReference - E3BD331831244E6F9BA72A49 - productType - com.apple.product-type.library.static - - 3CB5071DCC414161B0940255 - - fileRef - F30B59C06DAE4F2C8E0CE969 - isa - PBXBuildFile - - 3E5968EC173446029C2B89EE - - fileRef - DADBD1CB7DFC495EB0983E80 - isa - PBXBuildFile - - 4168CDEA4C0147E1A61E5CD1 - - fileRef - A60409C24D0A4A8AB1C0056C - isa - PBXBuildFile - - 41A7FE04E1644B348D728DD1 - - children - - 96649C75E4654B6D9297659F - - isa - PBXGroup - name - Frameworks - sourceTree - <group> - - 41CB7876D5674A3D8421BE87 + 36F5D8A079FD49EBA955E1D8 - children - - CF9A92992B57447B91657B89 - 66E8D3E19AB842768391E209 - D58D00B5A527408FAEC0AA35 - E56B154C3525404799C9C7C9 - + explicitFileType + archive.ar + includeInIndex + 0 isa - PBXGroup - name - Support Files + PBXFileReference + path + libPods-AFNetworking.a sourceTree - SOURCE_ROOT + BUILT_PRODUCTS_DIR - 45DC7C997A0E4EF398C297A8 + 37EB072B7FF4414D9FC6512F fileRef - 7DE14F2AA4884380A3254579 + 39403AE4F78D4B4BBA679BA5 isa PBXBuildFile - 47E73E0A4D3346389D40F5B7 + 38E361F6703C489492AAAF40 includeInIndex 1 @@ -773,20 +670,13 @@ lastKnownFileType sourcecode.c.objc name - NSString+BDBOAuth1Manager.m + AFHTTPRequestOperation.m path - BDBOAuth1Manager/Categories/NSString+BDBOAuth1Manager.m + AFNetworking/AFHTTPRequestOperation.m sourceTree <group> - 4ABE337FA7864BFD9AE1EE3B - - fileRef - 2FF3F1152A1249F69624BD15 - isa - PBXBuildFile - - 4B1E185A3A33413F833770B5 + 39403AE4F78D4B4BBA679BA5 includeInIndex 1 @@ -794,236 +684,271 @@ PBXFileReference lastKnownFileType sourcecode.c.h - path - Pods-environment.h - sourceTree - <group> - - 4CD6E27ABBF248D2B3AF8F82 - - children - - 940C0C766C594AE1851C1D21 - 7FDF5599F24F4D6F800BCBC7 - F6E2D6F05787459B8B8C730E - D40C302169384BF68FCEB750 - 6E8C62082D394BEC88545987 - 79FACA55D1194CE691354B1A - 41CB7876D5674A3D8421BE87 - 852A58BAC1514E2E8B7D3E4F - - isa - PBXGroup name - AFNetworking + AFURLSessionManager.h path - AFNetworking + AFNetworking/AFURLSessionManager.h sourceTree <group> - 4E3E557B13204629994D3BB8 - - attributes - - LastUpgradeCheck - 0500 - - buildConfigurationList - 679DABF1AD694705BECE0442 - compatibilityVersion - Xcode 3.2 - developmentRegion - English - hasScannedForEncodings - 0 - isa - PBXProject - knownRegions - - en - - mainGroup - E74827506991483DB6DCD747 - productRefGroup - 1CE4A0F0ECF44A5BAC3C6AEE - projectDirPath - - projectReferences - - projectRoot - - targets - - 3ADFDC4C2D6C40FDA9C166B0 - BA3292AA93EC4C249841C31D - 96C63594E4EF45049741F64F - - - 4F8D2EAFD63B490FA7C4F6AB - - fileRef - 76DD6410EF4B4872A699BD18 - isa - PBXBuildFile - - 500C24E4D8374390921B9457 + 3B05440FD75647CD983AA5F0 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h - name - NSString+BDBOAuth1Manager.h + text.xcconfig path - BDBOAuth1Manager/Categories/NSString+BDBOAuth1Manager.h + Pods.xcconfig sourceTree <group> - 50B6BCC17FF8465D83E22E59 + 3B71F4D416084660BB3F1A21 buildActionMask 2147483647 files - E9A931E6FA664B9583DF7094 - 8BF2FD4F6D114941937FD343 - 175D58CBD46C43F89C4972E6 - 7496F12D36134D44BC893072 - A25BA1F19126416A855F7F77 + F8B5B91732284B809E122030 isa PBXHeadersBuildPhase runOnlyForDeploymentPostprocessing 0 - 512F3D0D2376406B96DF2E69 + 3BEDE2B923B54953BF78C6DB - children - - 4CD6E27ABBF248D2B3AF8F82 - 168C68BC2923492AA51810C1 - - isa - PBXGroup + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc name - Pods + NSDictionary+BDBOAuth1Manager.m + path + BDBOAuth1Manager/Categories/NSDictionary+BDBOAuth1Manager.m sourceTree <group> - 51F8A2D88D034A74AB07898E + 3C0CA1D3128B49A5AF6A4D23 - fileRef - D7903E4B57EB4F3C82DA7268 + includeInIndex + 1 isa - PBXBuildFile + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + UIButton+AFNetworking.m + path + UIKit+AFNetworking/UIButton+AFNetworking.m + sourceTree + <group> - 5364E4B62B674243B7C41518 + 3EC3DC94D6B4457FAE0327F1 - fileRef - 47E73E0A4D3346389D40F5B7 + includeInIndex + 1 isa - PBXBuildFile - settings + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + AFNetworkReachabilityManager.m + path + AFNetworking/AFNetworkReachabilityManager.m + sourceTree + <group> + + 3F85E16D25CA4172B7A464F4 + + baseConfigurationReference + 20ACB052939949AF89A2A1CB + buildSettings - COMPILER_FLAGS - -fobjc-arc + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + NO + DSTROOT + /tmp/xcodeproj.dst + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_DYNAMIC_NO_PIC + NO + GCC_OPTIMIZATION_LEVEL + 0 + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + Pods-AFNetworking-prefix.pch + GCC_PREPROCESSOR_DEFINITIONS + + DEBUG=1 + $(inherited) + + GCC_SYMBOLS_PRIVATE_EXTERN + NO + GCC_VERSION + com.apple.compilers.llvm.clang.1_0 + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 7.0 + OTHER_LDFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + isa + XCBuildConfiguration + name + Debug - 55554E4C1D8D4FC0A20A1C9D + 3FE65B2103AD4A09AC40DED7 + includeInIndex + 1 isa PBXFileReference lastKnownFileType - wrapper.framework + sourcecode.c.objc name - SystemConfiguration.framework + AFURLSessionManager.m path - Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/SystemConfiguration.framework + AFNetworking/AFURLSessionManager.m sourceTree - DEVELOPER_DIR + <group> - 55694747B9124AF583948FCA + 3FF70379F3EF41C7AA8474C6 - fileRef - 78D79C3E8F6E4AE0BD91C874 + explicitFileType + archive.ar + includeInIndex + 0 isa - PBXBuildFile + PBXFileReference + path + libPods.a + sourceTree + BUILT_PRODUCTS_DIR - 57B8005E049C49E9BC019F94 + 408BC35B490F4B20A1DB4D48 - buildActionMask - 2147483647 - files - - B6B7E8EFF36B409D82751648 - + includeInIndex + 1 isa - PBXSourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + UIImageView+AFNetworking.h + path + UIKit+AFNetworking/UIImageView+AFNetworking.h + sourceTree + <group> - 57CE5B4E393947D99DA1B789 + 40BD5CE671B849E296A4B28D fileRef - 8BD1D4AC9FF140D5A8ADAB08 + 2F576CAAD4A24FFD86361AB2 isa PBXBuildFile - settings - - COMPILER_FLAGS - -fobjc-arc - - 5A3DBBA21C474405B44E16B6 + 41A7CE87C7AC44E2BD3E4FB0 - fileRef - DD5430B8C9E04CF4955BD62C + includeInIndex + 1 isa - PBXBuildFile + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + AFNetworkActivityIndicatorManager.m + path + UIKit+AFNetworking/AFNetworkActivityIndicatorManager.m + sourceTree + <group> - 5AEA0BF518DF412DAB83C76C + 437F6530CC7E4CD8B25B4549 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h name - AFURLResponseSerialization.m + AFHTTPRequestOperationManager.h path - AFNetworking/AFURLResponseSerialization.m + AFNetworking/AFHTTPRequestOperationManager.h + sourceTree + <group> + + 43DBFC69ED3D46F7AE144E95 + + buildConfigurations + + 28C0365611054673A93B1AC2 + 61E921CE0D8A43B2937EF1C8 + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + 454E0FE0524C4048A4029215 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + AFURLConnectionOperation.h + path + AFNetworking/AFURLConnectionOperation.h sourceTree <group> - 5DDCF6E8F819481E8995557B + 471DCA21B79843B9B98A0750 fileRef - EB9C06BC7CD047AFBA76E2AE + 20601FFA1C4D4E60971482F1 isa PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + - 5F435886E3944584BCF82428 + 484C07BC7E3D4D15B7671136 children - AD9B8347F8A345ACB81AF36A - 03606861C0D9462084CAE6D1 - FB8BAA5BA74A4D3EAAC843C4 - 61E2433D637F47BBAABBB55C - 4B1E185A3A33413F833770B5 - 9810245015374860A417FC72 + 296634217A80463F812FB928 + 72BEF4AD35A24D6DBDDC68D1 isa PBXGroup name - Pods + Security sourceTree <group> - 5FCAED4760BB4BC38E9EF0A6 + 496D645D3EF6449993243BB0 includeInIndex 1 @@ -1032,133 +957,315 @@ lastKnownFileType sourcecode.c.objc name - AFNetworkReachabilityManager.m + UIRefreshControl+AFNetworking.m path - AFNetworking/AFNetworkReachabilityManager.m + UIKit+AFNetworking/UIRefreshControl+AFNetworking.m sourceTree <group> - 6041EEA4FD8548989172B7A3 + 498CC935DD1446C98CC412A0 + + fileRef + CEB7FA6A96A24E788E1150AB + isa + PBXBuildFile + + 4C2CEEE08FE84EF3BEE54104 isa PBXFileReference lastKnownFileType wrapper.framework name - Foundation.framework + SystemConfiguration.framework path - Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/Foundation.framework + Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/System/Library/Frameworks/SystemConfiguration.framework sourceTree DEVELOPER_DIR - 60D0DF31AC9242B49745F84C + 4D172ADC38574E888A0BEDF9 + + fileRef + 3FE65B2103AD4A09AC40DED7 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 4E450EC3E3F843D09ECD222D includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h - name - UIKit+AFNetworking.h + text.xcconfig path - UIKit+AFNetworking/UIKit+AFNetworking.h + Pods-AFNetworking.xcconfig sourceTree <group> - 61E2433D637F47BBAABBB55C + 50178D77CBC643AEABD5859A + + fileRef + 348A4DB151F14EE2A6E44FC0 + isa + PBXBuildFile + + 50B407D622F747AC976CDD59 + + baseConfigurationReference + D9DB576C366A4E8D9A9EEDB4 + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + NO + DSTROOT + /tmp/xcodeproj.dst + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_DYNAMIC_NO_PIC + NO + GCC_OPTIMIZATION_LEVEL + 0 + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + Pods-MBProgressHUD-prefix.pch + GCC_PREPROCESSOR_DEFINITIONS + + DEBUG=1 + $(inherited) + + GCC_SYMBOLS_PRIVATE_EXTERN + NO + GCC_VERSION + com.apple.compilers.llvm.clang.1_0 + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 7.0 + OTHER_LDFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + + isa + XCBuildConfiguration + name + Debug + + 50E2981008264864B07C2731 + + buildActionMask + 2147483647 + files + + 998D14356219408CAF9EDEC3 + E86E3FDE21ED43AA9545C20F + 182F448103304F90A3E7307F + CDCBD6DBDF2C43F394A6B665 + 0162C08ECBE34AE48AEBEC40 + A2DAAEB41D24417DAD6DEE4B + + isa + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 51967C17338D4841898E3A7E includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h path - Pods-dummy.m + Pods-AFNetworking-prefix.pch sourceTree <group> - 62231323D3774C4F9EE53E37 + 5310F16A1AE940B8B48A06DF - containerPortal - 4E3E557B13204629994D3BB8 + explicitFileType + archive.ar + includeInIndex + 0 isa - PBXContainerItemProxy - proxyType - 1 - remoteGlobalIDString - BA3292AA93EC4C249841C31D - remoteInfo - Pods-AFNetworking + PBXFileReference + path + libPods-MBProgressHUD.a + sourceTree + BUILT_PRODUCTS_DIR - 66E8D3E19AB842768391E209 + 539EF70826704F7392170FA5 includeInIndex 1 isa PBXFileReference lastKnownFileType - text.xcconfig + text + name + Podfile path - Pods-AFNetworking-Private.xcconfig + ../Podfile sourceTree - <group> + SOURCE_ROOT + xcLanguageSpecificationIdentifier + xcode.lang.ruby - 675F54EE7C844CFF9B022DC6 + 56876FD52024499EBCA23D92 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h name - UIImageView+AFNetworking.m + NSString+BDBOAuth1Manager.h path - UIKit+AFNetworking/UIImageView+AFNetworking.m + BDBOAuth1Manager/Categories/NSString+BDBOAuth1Manager.h sourceTree <group> - 679DABF1AD694705BECE0442 + 58518BB53F9A457EA1ABEF37 - buildConfigurations + fileRef + A8A7EFFDF096426BBC505B15 + isa + PBXBuildFile + + 597AE1A2E77345C6901538A5 + + children - 2C2A64BFA0204EC38FA9514C - 2D16D57790704DE8A84D7A88 + 9C401BA726444F929A582459 + 66A9EEB821CF43A480F024E7 + 348A4DB151F14EE2A6E44FC0 + FC23FCE33F7F432D9F0678E8 + CEC97AFC99CC4DBCB0E8D034 + 1DB0DED179BB47138A2D31BE + 216B711A045343308D9FFE27 + 3BEDE2B923B54953BF78C6DB + 56876FD52024499EBCA23D92 + A9FF5AE9AEAB4390B4592F45 + 7AB232721903450193735703 - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Release isa - XCConfigurationList + PBXGroup + name + BDBOAuth1Manager + path + BDBOAuth1Manager + sourceTree + <group> - 67CFC3B711204B1F86F970D2 + 5CA742E52CA040AFB2A453F6 - fileRef - 55554E4C1D8D4FC0A20A1C9D + includeInIndex + 1 isa - PBXBuildFile + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + AFURLResponseSerialization.m + path + AFNetworking/AFURLResponseSerialization.m + sourceTree + <group> - 68965D644A6D4B1097C3EB6A + 5D2BB868D598480EAC678D41 fileRef - EC3C310268DC45C5B834C1F1 + 13EBBE9AAEB04A9081061F6F isa PBXBuildFile - 6A212CFD0E49482CBAF4D271 + 5D9E0B46871D47FD9689F1D3 + + isa + PBXFileReference + lastKnownFileType + wrapper.framework + name + Security.framework + path + Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/System/Library/Frameworks/Security.framework + sourceTree + DEVELOPER_DIR + + 5DAD842B9AC942D3B85E67AD + + containerPortal + 972898A3F8284D459B8A3133 + isa + PBXContainerItemProxy + proxyType + 1 + remoteGlobalIDString + 9598E628DFF64FDEB1DD401D + remoteInfo + Pods-AFNetworking + + 5E06270C233A43A9BDD44AE8 + + isa + PBXFileReference + lastKnownFileType + wrapper.framework + name + CoreGraphics.framework + path + Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/System/Library/Frameworks/CoreGraphics.framework + sourceTree + DEVELOPER_DIR + + 5EB62315DBFF47AB8CD9763D fileRef - 60D0DF31AC9242B49745F84C + 835EE65700CB4B03A3E92967 isa PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 5F508211551743009A3B483B + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + AFHTTPSessionManager.h + path + AFNetworking/AFHTTPSessionManager.h + sourceTree + <group> - 6D96163FBB0D4EBCB64B8A09 + 5F58CB8921DA41FB94CFBA02 baseConfigurationReference - 66E8D3E19AB842768391E209 + D9DB576C366A4E8D9A9EEDB4 buildSettings ALWAYS_SEARCH_USER_PATHS @@ -1172,7 +1279,7 @@ GCC_PRECOMPILE_PREFIX_HEADER YES GCC_PREFIX_HEADER - Pods-AFNetworking-prefix.pch + Pods-MBProgressHUD-prefix.pch GCC_VERSION com.apple.compilers.llvm.clang.1_0 INSTALL_PATH @@ -1207,46 +1314,44 @@ name Release - 6E8C62082D394BEC88545987 + 6075E624B1174CC283787E00 - children - - DD5430B8C9E04CF4955BD62C - D97A0D5442794AFC823E1B36 - + includeInIndex + 1 isa - PBXGroup - name - Security + PBXFileReference + lastKnownFileType + text.script.sh + path + Pods-resources.sh sourceTree <group> - 734501AC28434564A85685EF + 6094B2C44AF94CF4B6D1DA40 buildActionMask 2147483647 files - 2DC3991DC3FD44E58E51F109 - F33F3D30CDA4453CB00ED595 - ABE9638973C04214A4C8995E - EFC275E3743040A986D979BC - 5364E4B62B674243B7C41518 - 0DD384B7AE7B464683EFB5E3 + D145055936E74ADFB19E08B2 + D364459AE0684D6799D098CA + 58518BB53F9A457EA1ABEF37 + E35B92DC4D004932953E5A4C + EFCC5910C44945A99DD20CDD isa - PBXSourcesBuildPhase + PBXFrameworksBuildPhase runOnlyForDeploymentPostprocessing 0 - 736DD9FE41DA489CAF2029E9 + 61889EB8A1224F6EBEEAF479 children - BAD1023AFF4A498DA2B29F9E - D463AF1DC77146C2B91D9A31 - 04137369DAC147DFA0BC9DD3 - 83CF1DB77DB24D6780A0B2F1 + 4E450EC3E3F843D09ECD222D + 20ACB052939949AF89A2A1CB + 1ADAE5B1DB6E4607944FB2B6 + 51967C17338D4841898E3A7E isa PBXGroup @@ -1255,99 +1360,135 @@ sourceTree SOURCE_ROOT - 7496F12D36134D44BC893072 + 61E921CE0D8A43B2937EF1C8 - fileRef - 2CBD3C2B674A454FA488BCCB + baseConfigurationReference + 3B05440FD75647CD983AA5F0 + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + YES + DSTROOT + /tmp/xcodeproj.dst + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_VERSION + com.apple.compilers.llvm.clang.1_0 + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 7.0 + OTHER_CFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_CPLUSPLUSFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_LDFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + VALIDATE_PRODUCT + YES + isa - PBXBuildFile + XCBuildConfiguration + name + Release - 75DD5AA3145F4A70997A7C7F + 633F07793E18483B92A55FF5 - fileRef - D97A0D5442794AFC823E1B36 + buildActionMask + 2147483647 + files + + 74E1DDFF47E9417FB47BAEC2 + CC46A230CEF140A7BBCE9AF8 + isa - PBXBuildFile - settings - - COMPILER_FLAGS - -fobjc-arc - + PBXFrameworksBuildPhase + runOnlyForDeploymentPostprocessing + 0 - 760D20BD3A6940619AFB4F2E + 63ED68FCBBF9404C9411B1DC containerPortal - 4E3E557B13204629994D3BB8 + 972898A3F8284D459B8A3133 isa PBXContainerItemProxy proxyType 1 remoteGlobalIDString - 96C63594E4EF45049741F64F + 84FCB79F11CF46AB8912F9D8 remoteInfo - Pods-BDBOAuth1Manager + Pods-MBProgressHUD - 76DD6410EF4B4872A699BD18 + 65B194BFF0F043E8926DBAB5 - explicitFileType - archive.ar - includeInIndex - 0 + fileRef + 454E0FE0524C4048A4029215 isa - PBXFileReference - path - libPods-AFNetworking.a - sourceTree - BUILT_PRODUCTS_DIR + PBXBuildFile - 7758E9EB57B84895AE638F77 + 669F2B7E72544802AA864886 - includeInIndex - 1 + children + + D9F7BE4EDA5A4033B0CB4653 + isa - PBXFileReference - lastKnownFileType - sourcecode.c.h + PBXGroup name - BDBOAuth1RequestSerializer.h - path - BDBOAuth1Manager/BDBOAuth1RequestSerializer.h + Frameworks sourceTree <group> - 78D79C3E8F6E4AE0BD91C874 + 66A9EEB821CF43A480F024E7 + includeInIndex + 1 isa PBXFileReference lastKnownFileType - wrapper.framework + sourcecode.c.objc name - MobileCoreServices.framework + BDBOAuth1RequestOperationManager.m path - Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/MobileCoreServices.framework - sourceTree - DEVELOPER_DIR - - 79FACA55D1194CE691354B1A - - children - - 0028127B92A44A72B3F81B32 - 86BB9F2CA5954BCFBABB3FB8 - 11AD6073DD684803BC5513E9 - 5AEA0BF518DF412DAB83C76C - - isa - PBXGroup - name - Serialization + BDBOAuth1Manager/BDBOAuth1RequestOperationManager.m sourceTree <group> - 7A16570C975F44F5914B0CCF + 66C74AFE11D645C2B4AB9012 + + containerPortal + 972898A3F8284D459B8A3133 + isa + PBXContainerItemProxy + proxyType + 1 + remoteGlobalIDString + 9598E628DFF64FDEB1DD401D + remoteInfo + Pods-AFNetworking + + 66F62E17476545F0BE2547C2 baseConfigurationReference - D463AF1DC77146C2B91D9A31 + 20ACB052939949AF89A2A1CB buildSettings ALWAYS_SEARCH_USER_PATHS @@ -1361,7 +1502,7 @@ GCC_PRECOMPILE_PREFIX_HEADER YES GCC_PREFIX_HEADER - Pods-BDBOAuth1Manager-prefix.pch + Pods-AFNetworking-prefix.pch GCC_VERSION com.apple.compilers.llvm.clang.1_0 INSTALL_PATH @@ -1396,43 +1537,100 @@ name Release - 7DE14F2AA4884380A3254579 + 6730FFD5D5BF4715BE369141 - includeInIndex - 1 + buildActionMask + 2147483647 + files + + AEB09E6468E0491CA0A2B756 + 50178D77CBC643AEABD5859A + A6EACEAB937E4ED9B788D7BF + 92147C905D62436C9142A8C9 + 70F66F1ED1694A46B81CC0E7 + isa - PBXFileReference - lastKnownFileType - sourcecode.c.h + PBXHeadersBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 67622D5676C84874B845410F + + fileRef + DE9F97BA5BDC4ECF872B2B66 + isa + PBXBuildFile + + 69232256DDFA48E2A467301D + + fileRef + 1ADAE5B1DB6E4607944FB2B6 + isa + PBXBuildFile + + 69457DB67DD34A9B8C4CD90D + + buildConfigurationList + 0BA9E9A472F0480EB0A31A0D + buildPhases + + 50E2981008264864B07C2731 + CEE1781FDC7E4DDA9ACCED35 + 6730FFD5D5BF4715BE369141 + + buildRules + + dependencies + + F76A2B06012543B4ABA86388 + + isa + PBXNativeTarget name - AFHTTPSessionManager.h - path - AFNetworking/AFHTTPSessionManager.h - sourceTree - <group> + Pods-BDBOAuth1Manager + productName + Pods-BDBOAuth1Manager + productReference + DEA1A7A98309488090DBC410 + productType + com.apple.product-type.library.static - 7E6DF8CF142347069D40A51A + 6972D7C6D77D4EBE8A8DD8A3 - baseConfigurationReference - D463AF1DC77146C2B91D9A31 buildSettings ALWAYS_SEARCH_USER_PATHS NO - COPY_PHASE_STRIP + CLANG_CXX_LANGUAGE_STANDARD + gnu++0x + CLANG_CXX_LIBRARY + libc++ + CLANG_ENABLE_MODULES + YES + CLANG_ENABLE_OBJC_ARC NO - DSTROOT - /tmp/xcodeproj.dst + CLANG_WARN_BOOL_CONVERSION + YES + CLANG_WARN_CONSTANT_CONVERSION + YES + CLANG_WARN_DIRECT_OBJC_ISA_USAGE + YES + CLANG_WARN_EMPTY_BODY + YES + CLANG_WARN_ENUM_CONVERSION + YES + CLANG_WARN_INT_CONVERSION + YES + CLANG_WARN_OBJC_ROOT_CLASS + YES + COPY_PHASE_STRIP + YES GCC_C_LANGUAGE_STANDARD gnu99 GCC_DYNAMIC_NO_PIC NO GCC_OPTIMIZATION_LEVEL 0 - GCC_PRECOMPILE_PREFIX_HEADER - YES - GCC_PREFIX_HEADER - Pods-BDBOAuth1Manager-prefix.pch GCC_PREPROCESSOR_DEFINITIONS DEBUG=1 @@ -1440,79 +1638,48 @@ GCC_SYMBOLS_PRIVATE_EXTERN NO - GCC_VERSION - com.apple.compilers.llvm.clang.1_0 - INSTALL_PATH - $(BUILT_PRODUCTS_DIR) + GCC_WARN_64_TO_32_BIT_CONVERSION + YES + GCC_WARN_ABOUT_RETURN_TYPE + YES + GCC_WARN_UNDECLARED_SELECTOR + YES + GCC_WARN_UNINITIALIZED_AUTOS + YES + GCC_WARN_UNUSED_FUNCTION + YES + GCC_WARN_UNUSED_VARIABLE + YES IPHONEOS_DEPLOYMENT_TARGET 7.0 - OTHER_LDFLAGS - - PRODUCT_NAME - $(TARGET_NAME) - PUBLIC_HEADERS_FOLDER_PATH - $(TARGET_NAME) - SDKROOT - iphoneos - SKIP_INSTALL + ONLY_ACTIVE_ARCH YES + STRIP_INSTALLED_PRODUCT + NO isa XCBuildConfiguration name Debug - 7FDF5599F24F4D6F800BCBC7 - - children - - EC3C310268DC45C5B834C1F1 - 9C38608421EE4E3DB18D514A - 2FF3F1152A1249F69624BD15 - 3784BC628509444CA07A46D3 - EB9C06BC7CD047AFBA76E2AE - 02E89E8A8078408F8CBD15D6 - - isa - PBXGroup - name - NSURLConnection - sourceTree - <group> - - 813FA198904D4718B801A7F9 + 6BE005AF737947209FEAC22C - buildConfigurations - - D0504289ACBB4498B6E7BD2A - 6D96163FBB0D4EBCB64B8A09 - - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Release + fileRef + 86D7EE1684B542FBAB3D7959 isa - XCConfigurationList + PBXBuildFile - 816D049BC0484A92B4100FE0 + 70F66F1ED1694A46B81CC0E7 - includeInIndex - 1 + fileRef + 56876FD52024499EBCA23D92 isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - name - UIProgressView+AFNetworking.m - path - UIKit+AFNetworking/UIProgressView+AFNetworking.m - sourceTree - <group> + PBXBuildFile - 827035396690490AB8A3F874 + 7141C182B4904C2B8A7BF2A8 fileRef - 9C38608421EE4E3DB18D514A + ED6BC4FAC0C84994B055B053 isa PBXBuildFile settings @@ -1521,160 +1688,99 @@ -fobjc-arc - 83CF1DB77DB24D6780A0B2F1 + 72BEF4AD35A24D6DBDDC68D1 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc + name + AFSecurityPolicy.m path - Pods-BDBOAuth1Manager-prefix.pch + AFNetworking/AFSecurityPolicy.m sourceTree <group> - 852A58BAC1514E2E8B7D3E4F + 74E1DDFF47E9417FB47BAEC2 + + fileRef + 5E06270C233A43A9BDD44AE8 + isa + PBXBuildFile + + 75834AF12BC94834A8900D23 + + isa + PBXTargetDependency + target + 9598E628DFF64FDEB1DD401D + targetProxy + 66C74AFE11D645C2B4AB9012 + + 77EBBF9F63D840828DA0F599 children - B88A8B2C836342FF9287BD86 - 284B97FE6A8E40D59B7D06FF - 26267C75A8DD441EBB26B2D7 - 1DD22AACFD574E98ACB08362 - D7E0786CD2CF4813A9E00ACD - 195179D03AFB494E9A6FC86D - A60409C24D0A4A8AB1C0056C - A2C707F6A33D470BAB4C432F - 0D25440A9D0640C9B045CDB1 - 675F54EE7C844CFF9B022DC6 - 60D0DF31AC9242B49745F84C - DADBD1CB7DFC495EB0983E80 - 816D049BC0484A92B4100FE0 - 241368771B3F42BB8EDB63C4 - 2875857077FA4A5CBD30924B - F30B59C06DAE4F2C8E0CE969 - 8BD1D4AC9FF140D5A8ADAB08 + ECB619CFFF3B4BCE8E624046 + 597AE1A2E77345C6901538A5 + C0942FBAA65F4CA2B78461E9 isa PBXGroup name - UIKit + Pods sourceTree <group> - 86BB9F2CA5954BCFBABB3FB8 + 7837B80B9CAA4925930C61A5 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h name - AFURLRequestSerialization.m + AFURLRequestSerialization.h path - AFNetworking/AFURLRequestSerialization.m + AFNetworking/AFURLRequestSerialization.h sourceTree <group> - 8A098B51842A4CA8B5AA72C7 - - fileRef - 195179D03AFB494E9A6FC86D - isa - PBXBuildFile - settings - - COMPILER_FLAGS - -fobjc-arc - - - 8BD1D4AC9FF140D5A8ADAB08 + 7A1087842AA74F39BD338767 includeInIndex 1 isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - name - UIWebView+AFNetworking.m - path - UIKit+AFNetworking/UIWebView+AFNetworking.m - sourceTree - <group> - - 8BF2FD4F6D114941937FD343 - - fileRef - 7758E9EB57B84895AE638F77 - isa - PBXBuildFile - - 91281656E20D41E5B5E3F1A7 - - fileRef - 5AEA0BF518DF412DAB83C76C - isa - PBXBuildFile - settings - - COMPILER_FLAGS - -fobjc-arc - - - 936599475E1C405F82F3F1D8 - - baseConfigurationReference - AD9B8347F8A345ACB81AF36A - buildSettings - - ALWAYS_SEARCH_USER_PATHS - NO - COPY_PHASE_STRIP - YES - DSTROOT - /tmp/xcodeproj.dst - GCC_C_LANGUAGE_STANDARD - gnu99 - GCC_PRECOMPILE_PREFIX_HEADER - YES - GCC_VERSION - com.apple.compilers.llvm.clang.1_0 - INSTALL_PATH - $(BUILT_PRODUCTS_DIR) - IPHONEOS_DEPLOYMENT_TARGET - 7.0 - OTHER_CFLAGS - - -DNS_BLOCK_ASSERTIONS=1 - $(inherited) - - OTHER_CPLUSPLUSFLAGS - - -DNS_BLOCK_ASSERTIONS=1 - $(inherited) - - OTHER_LDFLAGS - - PRODUCT_NAME - $(TARGET_NAME) - PUBLIC_HEADERS_FOLDER_PATH - $(TARGET_NAME) - SDKROOT - iphoneos - SKIP_INSTALL - YES - VALIDATE_PRODUCT - YES - - isa - XCBuildConfiguration + PBXFileReference + lastKnownFileType + sourcecode.c.objc name - Release + UIActivityIndicatorView+AFNetworking.m + path + UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.m + sourceTree + <group> + + 7AB232721903450193735703 + + children + + C68BE11EAF9D48A68DA9BF05 + 34AC9AFE05C54AC79CBC5816 + E870255497444DCE88FB61A7 + FD081181724D4393AC5527B3 + + isa + PBXGroup + name + Support Files + sourceTree + SOURCE_ROOT - 940C0C766C594AE1851C1D21 + 7D5A8CCD7F5046518E2E7957 includeInIndex 1 @@ -1683,126 +1789,154 @@ lastKnownFileType sourcecode.c.h name - AFNetworking.h + AFNetworkActivityIndicatorManager.h path - AFNetworking/AFNetworking.h + UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h sourceTree <group> - 96649C75E4654B6D9297659F + 7EBF107A3CFA4E2280F309D5 children - 2CE19D17FE244346AA16CA80 - 6041EEA4FD8548989172B7A3 - 78D79C3E8F6E4AE0BD91C874 - D204DAE978A0477FBBFF515B - 55554E4C1D8D4FC0A20A1C9D + 7D5A8CCD7F5046518E2E7957 + 41A7CE87C7AC44E2BD3E4FB0 + 21A81ECC70214D5EBA2EE463 + 7A1087842AA74F39BD338767 + 2A8B6064A3514D859DF375CB + 20601FFA1C4D4E60971482F1 + 34494644DE7D4F9A93E9308F + 3C0CA1D3128B49A5AF6A4D23 + 408BC35B490F4B20A1DB4D48 + 8B7A8B79B8FB4ED59910EE2A + DE9F97BA5BDC4ECF872B2B66 + 191BE84524C34017BBB8C4E3 + ED6BC4FAC0C84994B055B053 + 13EBBE9AAEB04A9081061F6F + 496D645D3EF6449993243BB0 + 9C45F12C226B41E28880169F + A310A1B692A74565BD031E85 isa PBXGroup name - iOS + UIKit + sourceTree + <group> + + 810B13C09980492EBD31C94E + + children + + FA6906D4B70140AF91D8E7FF + + isa + PBXGroup + name + Targets Support Files + sourceTree + <group> + + 835EE65700CB4B03A3E92967 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + AFURLRequestSerialization.m + path + AFNetworking/AFURLRequestSerialization.m sourceTree <group> - 96C63594E4EF45049741F64F + 840482D643E141C190173A0D + + fileRef + 5CA742E52CA040AFB2A453F6 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + 84FCB79F11CF46AB8912F9D8 buildConfigurationList - 1203B8C7C1324F699E85E765 + 117E27A9720344458AB8B07D buildPhases - 734501AC28434564A85685EF - BB5B49514B374B5F8C542841 - 50B6BCC17FF8465D83E22E59 + 88ACAEB1DE3B47B3A30A57CE + 633F07793E18483B92A55FF5 + 3B71F4D416084660BB3F1A21 buildRules dependencies - - 0862550EF0E1431BADA22463 - + isa PBXNativeTarget name - Pods-BDBOAuth1Manager + Pods-MBProgressHUD productName - Pods-BDBOAuth1Manager + Pods-MBProgressHUD productReference - A7541F134A464E94953865F5 + 5310F16A1AE940B8B48A06DF productType com.apple.product-type.library.static - 9810245015374860A417FC72 + 86D7EE1684B542FBAB3D7959 includeInIndex 1 isa PBXFileReference lastKnownFileType - text.script.sh + sourcecode.c.h + name + AFURLResponseSerialization.h path - Pods-resources.sh + AFNetworking/AFURLResponseSerialization.h sourceTree <group> - 9883D41A97974C7EB66CCF30 + 88ACAEB1DE3B47B3A30A57CE buildActionMask 2147483647 files - 68965D644A6D4B1097C3EB6A - 4ABE337FA7864BFD9AE1EE3B - 45DC7C997A0E4EF398C297A8 - 1D0143C0D1F6457695989E23 - DA905A68A6B54DDD9F14146D - AF3FBA1C658F4441B0AFDBF0 - 5A3DBBA21C474405B44E16B6 - 5DDCF6E8F819481E8995557B - EE46C7E685E2425A8A7187F7 - EC25FCB2B056405EABABBB46 - 51F8A2D88D034A74AB07898E - C327DD13513E473FAABB70B0 - 13727B6FC14D4AA78E94FB4F - 4168CDEA4C0147E1A61E5CD1 - DDC8F79E320242D78757D671 - 6A212CFD0E49482CBAF4D271 - 3E5968EC173446029C2B89EE - F4A84EDEE6B14F7A8D61846E - 3CB5071DCC414161B0940255 + D7E328DE249E4622A0C2F7CD + E2E8F6CD66CF440B9C7D0FDE isa - PBXHeadersBuildPhase + PBXSourcesBuildPhase runOnlyForDeploymentPostprocessing 0 - 9C38608421EE4E3DB18D514A + 892B9EB7F373473493383DDF includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + sourcecode.c.h name - AFHTTPRequestOperation.m + AFNetworkReachabilityManager.h path - AFNetworking/AFHTTPRequestOperation.m + AFNetworking/AFNetworkReachabilityManager.h sourceTree <group> - 9E1DE05AC62E4B449FBFE042 - - fileRef - 6041EEA4FD8548989172B7A3 - isa - PBXBuildFile - - A028940A29FB4B4D9B7E00A0 + 89E90894318D49B0B94FFF1F fileRef - 1DD22AACFD574E98ACB08362 + A310A1B692A74565BD031E85 isa PBXBuildFile settings @@ -1811,14 +1945,7 @@ -fobjc-arc - A25BA1F19126416A855F7F77 - - fileRef - 500C24E4D8374390921B9457 - isa - PBXBuildFile - - A2C707F6A33D470BAB4C432F + 8B7A8B79B8FB4ED59910EE2A includeInIndex 1 @@ -1827,23 +1954,38 @@ lastKnownFileType sourcecode.c.objc name - UIButton+AFNetworking.m + UIImageView+AFNetworking.m path - UIKit+AFNetworking/UIButton+AFNetworking.m + UIKit+AFNetworking/UIImageView+AFNetworking.m sourceTree <group> - A3DD400530D04932BF87ECC6 + 8BC20E55E5BE4F0BA5F233F4 fileRef - D204DAE978A0477FBBFF515B + 5310F16A1AE940B8B48A06DF isa PBXBuildFile - A5E32BC8C3054CD89DE5DCC3 + 90CC4455C8124B9FBB6A7176 + + children + + 539EF70826704F7392170FA5 + 669F2B7E72544802AA864886 + 77EBBF9F63D840828DA0F599 + 95E59B2D386C4EE7B65C5D65 + 810B13C09980492EBD31C94E + + isa + PBXGroup + sourceTree + <group> + + 91B9773224C34E248800FFFA fileRef - 3784BC628509444CA07A46D3 + 0A53D991DC77403BAB303634 isa PBXBuildFile settings @@ -1852,63 +1994,97 @@ -fobjc-arc - A60409C24D0A4A8AB1C0056C - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - name - UIButton+AFNetworking.h - path - UIKit+AFNetworking/UIButton+AFNetworking.h - sourceTree - <group> - - A7541F134A464E94953865F5 + 92147C905D62436C9142A8C9 - explicitFileType - archive.ar - includeInIndex - 0 + fileRef + 216B711A045343308D9FFE27 isa - PBXFileReference - path - libPods-BDBOAuth1Manager.a - sourceTree - BUILT_PRODUCTS_DIR + PBXBuildFile - A79E0D731B974EBBB5F0134D + 9598E628DFF64FDEB1DD401D - fileRef - 02E89E8A8078408F8CBD15D6 + buildConfigurationList + 22B8423BA276416F8C6A1A07 + buildPhases + + C883615B79CE4854B7D62FAD + 6094B2C44AF94CF4B6D1DA40 + D6CB2FDBCF734E48958661D5 + + buildRules + + dependencies + isa - PBXBuildFile - settings - - COMPILER_FLAGS - -fobjc-arc - + PBXNativeTarget + name + Pods-AFNetworking + productName + Pods-AFNetworking + productReference + 36F5D8A079FD49EBA955E1D8 + productType + com.apple.product-type.library.static - A96298DA5B704A4F8E7D488B + 95E59B2D386C4EE7B65C5D65 children - 5F435886E3944584BCF82428 + 3FF70379F3EF41C7AA8474C6 + 36F5D8A079FD49EBA955E1D8 + DEA1A7A98309488090DBC410 + 5310F16A1AE940B8B48A06DF isa PBXGroup name - Targets Support Files + Products sourceTree <group> - ABE9638973C04214A4C8995E + 972898A3F8284D459B8A3133 + + attributes + + LastUpgradeCheck + 0510 + + buildConfigurationList + 1AF06F9AF57E4E41A082CCB4 + compatibilityVersion + Xcode 3.2 + developmentRegion + English + hasScannedForEncodings + 0 + isa + PBXProject + knownRegions + + en + + mainGroup + 90CC4455C8124B9FBB6A7176 + productRefGroup + 95E59B2D386C4EE7B65C5D65 + projectDirPath + + projectReferences + + projectRoot + + targets + + E5FDFAA03F5243CF81D10C88 + 9598E628DFF64FDEB1DD401D + 69457DB67DD34A9B8C4CD90D + 84FCB79F11CF46AB8912F9D8 + + + 998D14356219408CAF9EDEC3 fileRef - CDB1B59A7A264CB0A10A7A56 + 66A9EEB821CF43A480F024E7 isa PBXBuildFile settings @@ -1917,20 +2093,14 @@ -fobjc-arc - AD9B8347F8A345ACB81AF36A + 9B1B94D0BE7C4EA5B494B39E - includeInIndex - 1 + fileRef + 191BE84524C34017BBB8C4E3 isa - PBXFileReference - lastKnownFileType - text.xcconfig - path - Pods.xcconfig - sourceTree - <group> + PBXBuildFile - AECE7BD8C1B444F0B719B42A + 9B6CFB3379E54DBBB56E14D7 includeInIndex 1 @@ -1939,39 +2109,13 @@ lastKnownFileType sourcecode.c.objc name - BDBOAuth1RequestOperationManager.m + AFHTTPSessionManager.m path - BDBOAuth1Manager/BDBOAuth1RequestOperationManager.m + AFNetworking/AFHTTPSessionManager.m sourceTree <group> - AF3FBA1C658F4441B0AFDBF0 - - fileRef - 940C0C766C594AE1851C1D21 - isa - PBXBuildFile - - B6B7E8EFF36B409D82751648 - - fileRef - 61E2433D637F47BBAABBB55C - isa - PBXBuildFile - - B6FABB9473164729989393F7 - - fileRef - 284B97FE6A8E40D59B7D06FF - isa - PBXBuildFile - settings - - COMPILER_FLAGS - -fobjc-arc - - - B88A8B2C836342FF9287BD86 + 9C401BA726444F929A582459 includeInIndex 1 @@ -1980,149 +2124,98 @@ lastKnownFileType sourcecode.c.h name - AFNetworkActivityIndicatorManager.h + BDBOAuth1RequestOperationManager.h path - UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h + BDBOAuth1Manager/BDBOAuth1RequestOperationManager.h sourceTree <group> - B8AF5544514A49E4A9F3B31D + 9C45F12C226B41E28880169F includeInIndex 1 isa PBXFileReference lastKnownFileType - text + sourcecode.c.h name - Podfile + UIWebView+AFNetworking.h path - ../Podfile + UIKit+AFNetworking/UIWebView+AFNetworking.h sourceTree - SOURCE_ROOT - xcLanguageSpecificationIdentifier - xcode.lang.ruby - - B977314728ED4B3B91D1BFCF - - isa - PBXTargetDependency - target - BA3292AA93EC4C249841C31D - targetProxy - 1E342FA6877E49BE85317401 + <group> - BA3292AA93EC4C249841C31D + 9CD36FE52A894AD5894DA56D - buildConfigurationList - 813FA198904D4718B801A7F9 - buildPhases + children - 2085B639350248C0950BBE3A - 39B7902F884247ACBB3ACD97 - 9883D41A97974C7EB66CCF30 + 7837B80B9CAA4925930C61A5 + 835EE65700CB4B03A3E92967 + 86D7EE1684B542FBAB3D7959 + 5CA742E52CA040AFB2A453F6 - buildRules - - dependencies - isa - PBXNativeTarget + PBXGroup name - Pods-AFNetworking - productName - Pods-AFNetworking - productReference - 76DD6410EF4B4872A699BD18 - productType - com.apple.product-type.library.static + Serialization + sourceTree + <group> - BAD1023AFF4A498DA2B29F9E + 9F53427C9DF640BC94259FF8 includeInIndex 1 isa PBXFileReference lastKnownFileType - text.xcconfig + sourcecode.c.objc + name + AFURLConnectionOperation.m path - Pods-BDBOAuth1Manager.xcconfig + AFNetworking/AFURLConnectionOperation.m sourceTree <group> - BB5B49514B374B5F8C542841 + A2DAAEB41D24417DAD6DEE4B - buildActionMask - 2147483647 - files - - 1B2FB7F0D08C491BA75129CD - + fileRef + E870255497444DCE88FB61A7 isa - PBXFrameworksBuildPhase - runOnlyForDeploymentPostprocessing - 0 + PBXBuildFile - BBDCFCE013B24382BF49B37E + A310A1B692A74565BD031E85 - baseConfigurationReference - AD9B8347F8A345ACB81AF36A - buildSettings - - ALWAYS_SEARCH_USER_PATHS - NO - COPY_PHASE_STRIP - NO - DSTROOT - /tmp/xcodeproj.dst - GCC_C_LANGUAGE_STANDARD - gnu99 - GCC_DYNAMIC_NO_PIC - NO - GCC_OPTIMIZATION_LEVEL - 0 - GCC_PRECOMPILE_PREFIX_HEADER - YES - GCC_PREPROCESSOR_DEFINITIONS - - DEBUG=1 - $(inherited) - - GCC_SYMBOLS_PRIVATE_EXTERN - NO - GCC_VERSION - com.apple.compilers.llvm.clang.1_0 - INSTALL_PATH - $(BUILT_PRODUCTS_DIR) - IPHONEOS_DEPLOYMENT_TARGET - 7.0 - OTHER_LDFLAGS - - PRODUCT_NAME - $(TARGET_NAME) - PUBLIC_HEADERS_FOLDER_PATH - $(TARGET_NAME) - SDKROOT - iphoneos - SKIP_INSTALL - YES - + includeInIndex + 1 isa - XCBuildConfiguration + PBXFileReference + lastKnownFileType + sourcecode.c.objc name - Debug + UIWebView+AFNetworking.m + path + UIKit+AFNetworking/UIWebView+AFNetworking.m + sourceTree + <group> - C327DD13513E473FAABB70B0 + A4D2E4462E0342A3BAF65DD3 - fileRef - 26267C75A8DD441EBB26B2D7 + children + + 892B9EB7F373473493383DDF + 3EC3DC94D6B4457FAE0327F1 + isa - PBXBuildFile + PBXGroup + name + Reachability + sourceTree + <group> - C3B925F8A71846BBB1748F08 + A5CBCDFCCF184EAF8A3360FE fileRef - A2C707F6A33D470BAB4C432F + 38E361F6703C489492AAAF40 isa PBXBuildFile settings @@ -2131,74 +2224,49 @@ -fobjc-arc - C56D7ADFBB7E499DB1FE674C + A5F4D3150126420FB5E8C7CE fileRef - DB7654ECECF141CFB4A35537 + ADC08269D1EF4489B11F6DC2 isa PBXBuildFile - settings - - COMPILER_FLAGS - -fobjc-arc - - C80B52E86B0C489DB7EA5D09 + A6EACEAB937E4ED9B788D7BF + fileRef + CEC97AFC99CC4DBCB0E8D034 isa - PBXTargetDependency - target - 96C63594E4EF45049741F64F - targetProxy - 760D20BD3A6940619AFB4F2E + PBXBuildFile - CDB1B59A7A264CB0A10A7A56 + A8A7EFFDF096426BBC505B15 - includeInIndex - 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + wrapper.framework name - BDBOAuth1SessionManager.m + MobileCoreServices.framework path - BDBOAuth1Manager/BDBOAuth1SessionManager.m + Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/System/Library/Frameworks/MobileCoreServices.framework sourceTree - <group> - - CE3AFAC471A549E5A893CFA9 - - buildActionMask - 2147483647 - files - - 9E1DE05AC62E4B449FBFE042 - 4F8D2EAFD63B490FA7C4F6AB - 37281E23E7D64E3AAC1B9326 - - isa - PBXFrameworksBuildPhase - runOnlyForDeploymentPostprocessing - 0 + DEVELOPER_DIR - CF9A92992B57447B91657B89 + A90ECC90B78D4E4F882EC57F - includeInIndex - 1 + fileRef + 41A7CE87C7AC44E2BD3E4FB0 isa - PBXFileReference - lastKnownFileType - text.xcconfig - path - Pods-AFNetworking.xcconfig - sourceTree - <group> + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + - D0504289ACBB4498B6E7BD2A + A974C4B704674487BA2BAF52 baseConfigurationReference - 66E8D3E19AB842768391E209 + 34AC9AFE05C54AC79CBC5816 buildSettings ALWAYS_SEARCH_USER_PATHS @@ -2216,7 +2284,7 @@ GCC_PRECOMPILE_PREFIX_HEADER YES GCC_PREFIX_HEADER - Pods-AFNetworking-prefix.pch + Pods-BDBOAuth1Manager-prefix.pch GCC_PREPROCESSOR_DEFINITIONS DEBUG=1 @@ -2246,60 +2314,85 @@ name Debug - D204DAE978A0477FBBFF515B + A9FF5AE9AEAB4390B4592F45 + includeInIndex + 1 isa PBXFileReference lastKnownFileType - wrapper.framework + sourcecode.c.objc name - Security.framework + NSString+BDBOAuth1Manager.m path - Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/Security.framework + BDBOAuth1Manager/Categories/NSString+BDBOAuth1Manager.m sourceTree - DEVELOPER_DIR + <group> - D40C302169384BF68FCEB750 + ACD0E4EC541B4D2485B9F0A4 - children - - 2F764968162C4DCFBDBEE6EE - 5FCAED4760BB4BC38E9EF0A6 - isa - PBXGroup - name - Reachability - sourceTree - <group> + PBXTargetDependency + target + 84FCB79F11CF46AB8912F9D8 + targetProxy + 63ED68FCBBF9404C9411B1DC - D463AF1DC77146C2B91D9A31 + ADC08269D1EF4489B11F6DC2 includeInIndex 1 isa PBXFileReference lastKnownFileType - text.xcconfig + sourcecode.c.h + name + AFHTTPRequestOperation.h path - Pods-BDBOAuth1Manager-Private.xcconfig + AFNetworking/AFHTTPRequestOperation.h sourceTree <group> - D58D00B5A527408FAEC0AA35 + AEB09E6468E0491CA0A2B756 + + fileRef + 9C401BA726444F929A582459 + isa + PBXBuildFile + + AEC3AE4A4F534FC09E8E7592 + + fileRef + 3C0CA1D3128B49A5AF6A4D23 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + B2CD88FE313A4BDCA9ED4A5C + + fileRef + 2056F30D54C440C38BEE1ECA + isa + PBXBuildFile + + B3D197FF92234626BEF067A0 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc + text path - Pods-AFNetworking-dummy.m + Pods-acknowledgements.markdown sourceTree <group> - D7903E4B57EB4F3C82DA7268 + B6307B0788DE4EB3B5E4CDCC includeInIndex 1 @@ -2307,14 +2400,12 @@ PBXFileReference lastKnownFileType sourcecode.c.h - name - AFURLSessionManager.h path - AFNetworking/AFURLSessionManager.h + Pods-environment.h sourceTree <group> - D7E0786CD2CF4813A9E00ACD + B9578155C3F747D7A891A96D includeInIndex 1 @@ -2322,51 +2413,145 @@ PBXFileReference lastKnownFileType sourcecode.c.h - name - UIAlertView+AFNetworking.h path - UIKit+AFNetworking/UIAlertView+AFNetworking.h + MBProgressHUD.h sourceTree <group> - D97A0D5442794AFC823E1B36 + BB33F3C9E026460CBAA22D82 + + fileRef + 2056F30D54C440C38BEE1ECA + isa + PBXBuildFile + + BF50E4E1E5614714B558E144 + + isa + PBXTargetDependency + target + 69457DB67DD34A9B8C4CD90D + targetProxy + CB81C597E13A4E818101CB9C + + BFB4AB5486AC46ACBE51BA81 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc - name - AFSecurityPolicy.m + text.xcconfig path - AFNetworking/AFSecurityPolicy.m + Pods-MBProgressHUD.xcconfig sourceTree <group> - DA905A68A6B54DDD9F14146D + C04B21C4D4064BD6BA042001 fileRef - 2F764968162C4DCFBDBEE6EE + 8B7A8B79B8FB4ED59910EE2A isa PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + C0942FBAA65F4CA2B78461E9 + + children + + B9578155C3F747D7A891A96D + 1FB93D9246A4460085C2F3F0 + D426BD9B500947CF8633C1FF + + isa + PBXGroup + name + MBProgressHUD + path + MBProgressHUD + sourceTree + <group> - DADBD1CB7DFC495EB0983E80 + C68BE11EAF9D48A68DA9BF05 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h - name - UIProgressView+AFNetworking.h + text.xcconfig path - UIKit+AFNetworking/UIProgressView+AFNetworking.h + Pods-BDBOAuth1Manager.xcconfig sourceTree <group> - DB7654ECECF141CFB4A35537 + C883615B79CE4854B7D62FAD + + buildActionMask + 2147483647 + files + + A5CBCDFCCF184EAF8A3360FE + 91B9773224C34E248800FFFA + 15FEBF8AD05F43F797EF8A5F + A90ECC90B78D4E4F882EC57F + 3519F07C2E014ECC830D66EF + EE81CB0208CD418C9D5135F3 + 2CF58F506E0F4F29A29F1933 + 5EB62315DBFF47AB8CD9763D + 840482D643E141C190173A0D + 4D172ADC38574E888A0BEDF9 + 69232256DDFA48E2A467301D + 31154E8F1CAC4E0CA4B5D5A3 + 471DCA21B79843B9B98A0750 + AEC3AE4A4F534FC09E8E7592 + C04B21C4D4064BD6BA042001 + 7141C182B4904C2B8A7BF2A8 + F533935146214DE6815DA656 + 89E90894318D49B0B94FFF1F + + isa + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + CB81C597E13A4E818101CB9C + + containerPortal + 972898A3F8284D459B8A3133 + isa + PBXContainerItemProxy + proxyType + 1 + remoteGlobalIDString + 69457DB67DD34A9B8C4CD90D + remoteInfo + Pods-BDBOAuth1Manager + + CC46A230CEF140A7BBCE9AF8 + + fileRef + 2056F30D54C440C38BEE1ECA + isa + PBXBuildFile + + CDCBD6DBDF2C43F394A6B665 + + fileRef + 3BEDE2B923B54953BF78C6DB + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + CEB7FA6A96A24E788E1150AB includeInIndex 1 @@ -2374,14 +2559,12 @@ PBXFileReference lastKnownFileType sourcecode.c.objc - name - AFHTTPSessionManager.m path - AFNetworking/AFHTTPSessionManager.m + Pods-dummy.m sourceTree <group> - DD5430B8C9E04CF4955BD62C + CEC97AFC99CC4DBCB0E8D034 includeInIndex 1 @@ -2390,87 +2573,150 @@ lastKnownFileType sourcecode.c.h name - AFSecurityPolicy.h + BDBOAuth1SessionManager.h path - AFNetworking/AFSecurityPolicy.h + BDBOAuth1Manager/BDBOAuth1SessionManager.h sourceTree <group> - DDC8F79E320242D78757D671 + CEE1781FDC7E4DDA9ACCED35 + + buildActionMask + 2147483647 + files + + BB33F3C9E026460CBAA22D82 + + isa + PBXFrameworksBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + D0980B815AD74CEE8032DAAC fileRef - 0D25440A9D0640C9B045CDB1 + 9C45F12C226B41E28880169F isa PBXBuildFile - E17E2D6E23144E4BA819A316 + D145055936E74ADFB19E08B2 fileRef - 86BB9F2CA5954BCFBABB3FB8 + 5E06270C233A43A9BDD44AE8 isa PBXBuildFile - settings - - COMPILER_FLAGS - -fobjc-arc - - E3BD331831244E6F9BA72A49 + D364459AE0684D6799D098CA - explicitFileType - archive.ar - includeInIndex - 0 + fileRef + 2056F30D54C440C38BEE1ECA isa - PBXFileReference - path - libPods.a + PBXBuildFile + + D426BD9B500947CF8633C1FF + + children + + BFB4AB5486AC46ACBE51BA81 + D9DB576C366A4E8D9A9EEDB4 + 318811E7C4064E7D955E5FA7 + 2B8B9B9A4AA24023B5A914D0 + + isa + PBXGroup + name + Support Files sourceTree - BUILT_PRODUCTS_DIR + SOURCE_ROOT + + D6CB2FDBCF734E48958661D5 + + buildActionMask + 2147483647 + files + + A5F4D3150126420FB5E8C7CE + E881288019894153A849308E + DBE2500CEE8A475493A49571 + 333867E34A904A639D894DDB + 2093D98870194E7DB657D685 + 40BD5CE671B849E296A4B28D + 121A367EF79B490985077C1F + 65B194BFF0F043E8926DBAB5 + 1FFE760DD36F4A03A928C077 + 6BE005AF737947209FEAC22C + 37EB072B7FF4414D9FC6512F + 2824180F78FD41CABF73F0A8 + EEC74490348D4DF1BEB5E4E0 + E636335B71FE4364806BF883 + 27A9618A8432486F9A994CC2 + 67622D5676C84874B845410F + 9B1B94D0BE7C4EA5B494B39E + 5D2BB868D598480EAC678D41 + D0980B815AD74CEE8032DAAC + + isa + PBXHeadersBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + D7E328DE249E4622A0C2F7CD + + fileRef + 1FB93D9246A4460085C2F3F0 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 + - E56B154C3525404799C9C7C9 + D9DB576C366A4E8D9A9EEDB4 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + text.xcconfig path - Pods-AFNetworking-prefix.pch + Pods-MBProgressHUD-Private.xcconfig sourceTree <group> - E74827506991483DB6DCD747 + D9F7BE4EDA5A4033B0CB4653 children - B8AF5544514A49E4A9F3B31D - 41A7FE04E1644B348D728DD1 - 512F3D0D2376406B96DF2E69 - 1CE4A0F0ECF44A5BAC3C6AEE - A96298DA5B704A4F8E7D488B + 5E06270C233A43A9BDD44AE8 + 2056F30D54C440C38BEE1ECA + A8A7EFFDF096426BBC505B15 + 5D9E0B46871D47FD9689F1D3 + 4C2CEEE08FE84EF3BEE54104 isa PBXGroup + name + iOS sourceTree <group> - E754DC1DE3E044108A18104F + DB3090B73EFA41CA80247C11 fileRef - 6041EEA4FD8548989172B7A3 + DEA1A7A98309488090DBC410 isa PBXBuildFile - E9A931E6FA664B9583DF7094 + DBE2500CEE8A475493A49571 fileRef - 32EBEEE13B564A81B69C35F8 + 5F508211551743009A3B483B isa PBXBuildFile - EB9C06BC7CD047AFBA76E2AE + DE9F97BA5BDC4ECF872B2B66 includeInIndex 1 @@ -2479,45 +2725,130 @@ lastKnownFileType sourcecode.c.h name - AFURLConnectionOperation.h + UIKit+AFNetworking.h path - AFNetworking/AFURLConnectionOperation.h + UIKit+AFNetworking/UIKit+AFNetworking.h sourceTree <group> - EC25FCB2B056405EABABBB46 + DEA1A7A98309488090DBC410 + + explicitFileType + archive.ar + includeInIndex + 0 + isa + PBXFileReference + path + libPods-BDBOAuth1Manager.a + sourceTree + BUILT_PRODUCTS_DIR + + E0E488ADCCBB405A9AE088FE + + baseConfigurationReference + 34AC9AFE05C54AC79CBC5816 + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + YES + DSTROOT + /tmp/xcodeproj.dst + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + Pods-BDBOAuth1Manager-prefix.pch + GCC_VERSION + com.apple.compilers.llvm.clang.1_0 + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 7.0 + OTHER_CFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_CPLUSPLUSFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_LDFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + VALIDATE_PRODUCT + YES + + isa + XCBuildConfiguration + name + Release + + E2E8F6CD66CF440B9C7D0FDE fileRef - 11AD6073DD684803BC5513E9 + 318811E7C4064E7D955E5FA7 isa PBXBuildFile - EC3C310268DC45C5B834C1F1 + E35B92DC4D004932953E5A4C - includeInIndex - 1 + fileRef + 5D9E0B46871D47FD9689F1D3 isa - PBXFileReference - lastKnownFileType - sourcecode.c.h + PBXBuildFile + + E5FDFAA03F5243CF81D10C88 + + buildConfigurationList + 43DBFC69ED3D46F7AE144E95 + buildPhases + + 23AF226022CE413FBB31B245 + 35F3984D7618419DB710E86E + + buildRules + + dependencies + + 75834AF12BC94834A8900D23 + BF50E4E1E5614714B558E144 + ACD0E4EC541B4D2485B9F0A4 + + isa + PBXNativeTarget name - AFHTTPRequestOperation.h - path - AFNetworking/AFHTTPRequestOperation.h - sourceTree - <group> + Pods + productName + Pods + productReference + 3FF70379F3EF41C7AA8474C6 + productType + com.apple.product-type.library.static - EE46C7E685E2425A8A7187F7 + E636335B71FE4364806BF883 fileRef - 0028127B92A44A72B3F81B32 + 34494644DE7D4F9A93E9308F isa PBXBuildFile - EFC275E3743040A986D979BC + E86E3FDE21ED43AA9545C20F fileRef - F8C7E0D223F540FFACA5D61B + FC23FCE33F7F432D9F0678E8 isa PBXBuildFile settings @@ -2526,25 +2857,67 @@ -fobjc-arc - F30B59C06DAE4F2C8E0CE969 + E870255497444DCE88FB61A7 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc + path + Pods-BDBOAuth1Manager-dummy.m + sourceTree + <group> + + E881288019894153A849308E + + fileRef + 437F6530CC7E4CD8B25B4549 + isa + PBXBuildFile + + ECB619CFFF3B4BCE8E624046 + + children + + 2F576CAAD4A24FFD86361AB2 + 1D0EFA9990F5415F917F87EE + 1383686CEA9E4FC090D8E91F + A4D2E4462E0342A3BAF65DD3 + 484C07BC7E3D4D15B7671136 + 9CD36FE52A894AD5894DA56D + 61889EB8A1224F6EBEEAF479 + 7EBF107A3CFA4E2280F309D5 + + isa + PBXGroup name - UIWebView+AFNetworking.h + AFNetworking path - UIKit+AFNetworking/UIWebView+AFNetworking.h + AFNetworking + sourceTree + <group> + + ED6BC4FAC0C84994B055B053 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + UIProgressView+AFNetworking.m + path + UIKit+AFNetworking/UIProgressView+AFNetworking.m sourceTree <group> - F33F3D30CDA4453CB00ED595 + EE81CB0208CD418C9D5135F3 fileRef - F9B2B226227042FD99767222 + 72BEF4AD35A24D6DBDDC68D1 isa PBXBuildFile settings @@ -2553,59 +2926,67 @@ -fobjc-arc - F4A84EDEE6B14F7A8D61846E + EEC74490348D4DF1BEB5E4E0 fileRef - 241368771B3F42BB8EDB63C4 + 2A8B6064A3514D859DF375CB isa PBXBuildFile - F4E2B8DB00D4445890ADA4FB + EFCC5910C44945A99DD20CDD - buildConfigurations - - BBDCFCE013B24382BF49B37E - 936599475E1C405F82F3F1D8 - - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Release + fileRef + 4C2CEEE08FE84EF3BEE54104 isa - XCConfigurationList + PBXBuildFile + + F533935146214DE6815DA656 + + fileRef + 496D645D3EF6449993243BB0 + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc + + + F76A2B06012543B4ABA86388 + + isa + PBXTargetDependency + target + 9598E628DFF64FDEB1DD401D + targetProxy + 5DAD842B9AC942D3B85E67AD + + F8B5B91732284B809E122030 + + fileRef + B9578155C3F747D7A891A96D + isa + PBXBuildFile - F6E2D6F05787459B8B8C730E + FA6906D4B70140AF91D8E7FF children - 7DE14F2AA4884380A3254579 - DB7654ECECF141CFB4A35537 - D7903E4B57EB4F3C82DA7268 - 3832820606024CFD839129A5 + 3B05440FD75647CD983AA5F0 + B3D197FF92234626BEF067A0 + 251D048746FB429A92FDBDBE + CEB7FA6A96A24E788E1150AB + B6307B0788DE4EB3B5E4CDCC + 6075E624B1174CC283787E00 isa PBXGroup name - NSURLSession - sourceTree - <group> - - F8C7E0D223F540FFACA5D61B - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - name - NSDictionary+BDBOAuth1Manager.m - path - BDBOAuth1Manager/Categories/NSDictionary+BDBOAuth1Manager.m + Pods sourceTree <group> - F9B2B226227042FD99767222 + FC23FCE33F7F432D9F0678E8 includeInIndex 1 @@ -2620,21 +3001,21 @@ sourceTree <group> - FB8BAA5BA74A4D3EAAC843C4 + FD081181724D4393AC5527B3 includeInIndex 1 isa PBXFileReference lastKnownFileType - text.plist.xml + sourcecode.c.h path - Pods-acknowledgements.plist + Pods-BDBOAuth1Manager-prefix.pch sourceTree <group> rootObject - 4E3E557B13204629994D3BB8 + 972898A3F8284D459B8A3133 diff --git a/README.md b/README.md index 100678d..00aa446 100644 --- a/README.md +++ b/README.md @@ -1,83 +1,23 @@ -### Basic Yelp client +# IOS YELP +Time spent = 15 hrs -This is a headless example of how to implement an OAuth 1.0a Yelp API client. The Yelp API provides an application token that allows applications to make unauthenticated requests to their search API. +## User stories -### Next steps +* Search page + * [x] Custom cells should have the proper Auto Layout constraints + * [x] Search bar should be in the navigation bar (doesn't have to expand to show location like the real Yelp app does). + * [ ] Optional: Table rows should be dynamic height according to the content height + * [ ] Optional: infinite scroll for restaurant results + * [ ] Optional: Implement map view of restaurant results +* Filter page. + * [x] The filters you should actually have are: category, sort (best match, distance, highest rated), radius (meters), deals (on/off). + * [x] The filters table should be organized into sections as in the mock. + * [x] You can use the default UISwitch for on/off states. + * [ ] Optional: implement a custom switch + * [ ] Radius filter should expand as in the real Yelp app + * [ ] Categories should show a subset of the full list with a "See All" row to expand. Category list is here: http://www.yelp.com/developers/documentation/category_list + * [x] Clicking on the "Search" button should dismiss the filters page and trigger the search w/ the new filter settings. + * [ ] Optional: Implement the restaurant detail page. -- Check out `MainViewController.m` to see how to use the `YelpClient`. -- Augment the search method in the `YelpClient` with whatever search parameters you want to support. - -### Sample request - -``` -self.client = [[YelpClient alloc] initWithConsumerKey:kYelpConsumerKey consumerSecret:kYelpConsumerSecret accessToken:kYelpToken accessSecret:kYelpTokenSecret]; - -[self.client searchWithTerm:@"Thai" success:^(AFHTTPRequestOperation *operation, id response) { - NSLog(@"response: %@", response); -} failure:^(AFHTTPRequestOperation *operation, NSError *error) { - NSLog(@"error: %@", [error description]); -}]; -``` - -### Sample response - -``` -businesses = ( - { - categories = ( - ( - Thai, - thai - ) - ); - "display_phone" = "+1-415-931-6917"; - id = "lers-ros-thai-san-francisco"; - "image_url" = "http://s3-media2.ak.yelpcdn.com/bphoto/IStxUNVdfuPR2ddDAIPk_A/ms.jpg"; - "is_claimed" = 1; - "is_closed" = 0; - location = { - address = ( - "730 Larkin St" - ); - city = "San Francisco"; - "country_code" = US; - "cross_streets" = "Olive St & Ellis St"; - "display_address" = ( - "730 Larkin St", - "(b/t Olive St & Ellis St)", - Tenderloin, - "San Francisco, CA 94109" - ); - neighborhoods = ( - Tenderloin - ); - "postal_code" = 94109; - "state_code" = CA; - }; - "menu_date_updated" = 1387658025; - "menu_provider" = "single_platform"; - "mobile_url" = "http://m.yelp.com/biz/lers-ros-thai-san-francisco"; - name = "Lers Ros Thai"; - phone = 4159316917; - rating = 4; - "rating_img_url" = "http://s3-media4.ak.yelpcdn.com/assets/2/www/img/c2f3dd9799a5/ico/stars/v1/stars_4.png"; - "rating_img_url_large" = "http://s3-media2.ak.yelpcdn.com/assets/2/www/img/ccf2b76faa2c/ico/stars/v1/stars_large_4.png"; - "rating_img_url_small" = "http://s3-media4.ak.yelpcdn.com/assets/2/www/img/f62a5be2f902/ico/stars/v1/stars_small_4.png"; - "review_count" = 1154; - "snippet_image_url" = "http://s3-media4.ak.yelpcdn.com/photo/D40HpcJt-O6Ll654S_--6w/ms.jpg"; - "snippet_text" = "Fantastic pad-see-ew. Super rich, flavorful sauce and plenty of ginormous prawns, especially for a $12 price tag in San Francisco. I went through a pretty..."; - url = "http://www.yelp.com/biz/lers-ros-thai-san-francisco"; - } - ); - region = { - center = { - latitude = "37.7703124"; - longitude = "-122.43647245575"; - }; - span = { - "latitude_delta" = "0.06424638000000016"; - "longitude_delta" = "0.07145348265001417"; - }; - }; - total = 760; -``` +## Walkthrough +![demo](Yelp.gif) diff --git a/Yelp.gif b/Yelp.gif new file mode 100644 index 0000000..ec0cf59 Binary files /dev/null and b/Yelp.gif differ diff --git a/Yelp.xcodeproj/project.pbxproj b/Yelp.xcodeproj/project.pbxproj index 54f5e66..7565b85 100644 --- a/Yelp.xcodeproj/project.pbxproj +++ b/Yelp.xcodeproj/project.pbxproj @@ -23,6 +23,10 @@ 42FD6C6E18DC286B000BF2B9 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 42FD6C6C18DC286B000BF2B9 /* InfoPlist.strings */; }; 42FD6C7018DC286B000BF2B9 /* YelpTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 42FD6C6F18DC286B000BF2B9 /* YelpTests.m */; }; 63E591F41F684901AF8C1C19 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9DEC6D18C14F46F8AF2EA320 /* libPods.a */; }; + 79E2CAF61961A5EC00A16C82 /* YelpTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 79E2CAF41961A5EC00A16C82 /* YelpTableViewCell.m */; }; + 79E2CAF71961A5EC00A16C82 /* YelpTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 79E2CAF51961A5EC00A16C82 /* YelpTableViewCell.xib */; }; + 79E2CAFB19623EF700A16C82 /* FilterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 79E2CAF919623EF700A16C82 /* FilterViewController.m */; }; + 79E2CAFC19623EF700A16C82 /* FilterViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 79E2CAFA19623EF700A16C82 /* FilterViewController.xib */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -57,6 +61,12 @@ 42FD6C6B18DC286B000BF2B9 /* YelpTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "YelpTests-Info.plist"; sourceTree = ""; }; 42FD6C6D18DC286B000BF2B9 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 42FD6C6F18DC286B000BF2B9 /* YelpTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YelpTests.m; sourceTree = ""; }; + 79E2CAF31961A5EC00A16C82 /* YelpTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YelpTableViewCell.h; sourceTree = ""; }; + 79E2CAF41961A5EC00A16C82 /* YelpTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YelpTableViewCell.m; sourceTree = ""; }; + 79E2CAF51961A5EC00A16C82 /* YelpTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = YelpTableViewCell.xib; sourceTree = ""; }; + 79E2CAF819623EF700A16C82 /* FilterViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FilterViewController.h; sourceTree = ""; }; + 79E2CAF919623EF700A16C82 /* FilterViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FilterViewController.m; sourceTree = ""; }; + 79E2CAFA19623EF700A16C82 /* FilterViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = FilterViewController.xib; sourceTree = ""; }; 8436EC1AAEE1439D997D29F7 /* Pods.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.xcconfig; path = Pods/Pods.xcconfig; sourceTree = ""; }; 9DEC6D18C14F46F8AF2EA320 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -86,25 +96,6 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 420474F318DC297600E88E07 /* API */ = { - isa = PBXGroup; - children = ( - 420474F418DC299500E88E07 /* YelpClient.h */, - 420474F518DC299500E88E07 /* YelpClient.m */, - ); - name = API; - sourceTree = ""; - }; - 420474F718DC2A9200E88E07 /* View Controllers */ = { - isa = PBXGroup; - children = ( - 420474F818DC2B2100E88E07 /* MainViewController.h */, - 420474F918DC2B2100E88E07 /* MainViewController.m */, - 420474FA18DC2B2100E88E07 /* MainViewController.xib */, - ); - name = "View Controllers"; - sourceTree = ""; - }; 42FD6C3E18DC286A000BF2B9 = { isa = PBXGroup; children = ( @@ -140,12 +131,21 @@ 42FD6C5018DC286B000BF2B9 /* Yelp */ = { isa = PBXGroup; children = ( - 420474F318DC297600E88E07 /* API */, - 420474F718DC2A9200E88E07 /* View Controllers */, + 420474F418DC299500E88E07 /* YelpClient.h */, + 420474F518DC299500E88E07 /* YelpClient.m */, + 420474F818DC2B2100E88E07 /* MainViewController.h */, + 420474F918DC2B2100E88E07 /* MainViewController.m */, + 420474FA18DC2B2100E88E07 /* MainViewController.xib */, 42FD6C5918DC286B000BF2B9 /* AppDelegate.h */, 42FD6C5A18DC286B000BF2B9 /* AppDelegate.m */, 42FD6C5C18DC286B000BF2B9 /* Images.xcassets */, 42FD6C5118DC286B000BF2B9 /* Supporting Files */, + 79E2CAF31961A5EC00A16C82 /* YelpTableViewCell.h */, + 79E2CAF41961A5EC00A16C82 /* YelpTableViewCell.m */, + 79E2CAF51961A5EC00A16C82 /* YelpTableViewCell.xib */, + 79E2CAF819623EF700A16C82 /* FilterViewController.h */, + 79E2CAF919623EF700A16C82 /* FilterViewController.m */, + 79E2CAFA19623EF700A16C82 /* FilterViewController.xib */, ); path = Yelp; sourceTree = ""; @@ -256,7 +256,9 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 79E2CAFC19623EF700A16C82 /* FilterViewController.xib in Resources */, 42FD6C5518DC286B000BF2B9 /* InfoPlist.strings in Resources */, + 79E2CAF71961A5EC00A16C82 /* YelpTableViewCell.xib in Resources */, 420474FC18DC2B2100E88E07 /* MainViewController.xib in Resources */, 42FD6C5D18DC286B000BF2B9 /* Images.xcassets in Resources */, ); @@ -312,7 +314,9 @@ files = ( 42FD6C5B18DC286B000BF2B9 /* AppDelegate.m in Sources */, 42FD6C5718DC286B000BF2B9 /* main.m in Sources */, + 79E2CAF61961A5EC00A16C82 /* YelpTableViewCell.m in Sources */, 420474F618DC299500E88E07 /* YelpClient.m in Sources */, + 79E2CAFB19623EF700A16C82 /* FilterViewController.m in Sources */, 420474FB18DC2B2100E88E07 /* MainViewController.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/Yelp/AppDelegate.m b/Yelp/AppDelegate.m index c13ec3b..ab3d6f3 100644 --- a/Yelp/AppDelegate.m +++ b/Yelp/AppDelegate.m @@ -15,7 +15,9 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; - self.window.rootViewController = [[MainViewController alloc] init]; + UINavigationController *nvc = [[UINavigationController alloc] initWithRootViewController:[[MainViewController alloc]init]]; + self.window.rootViewController = nvc; + [[UINavigationBar appearance] setBarTintColor:[UIColor colorWithRed:0.686f green:0.024f blue:0.024f alpha:1.0f]]; self.window.backgroundColor = [UIColor whiteColor]; [self.window makeKeyAndVisible]; diff --git a/Yelp/FilterViewCell.h b/Yelp/FilterViewCell.h new file mode 100644 index 0000000..5e0e65d --- /dev/null +++ b/Yelp/FilterViewCell.h @@ -0,0 +1,13 @@ +// +// FilterViewCell.h +// Yelp +// +// Created by Harsha Badami Nagaraj on 6/30/14. +// Copyright (c) 2014 codepath. All rights reserved. +// + +#import + +@interface FilterViewCell : UITableViewCell +@property (weak, nonatomic) IBOutlet UILabel *filterLabel; +@end diff --git a/Yelp/FilterViewCell.m b/Yelp/FilterViewCell.m new file mode 100644 index 0000000..9611c86 --- /dev/null +++ b/Yelp/FilterViewCell.m @@ -0,0 +1,25 @@ +// +// FilterViewCell.m +// Yelp +// +// Created by Harsha Badami Nagaraj on 6/30/14. +// Copyright (c) 2014 codepath. All rights reserved. +// + +#import "FilterViewCell.h" + +@implementation FilterViewCell + +- (void)awakeFromNib +{ + // Initialization code +} + +- (void)setSelected:(BOOL)selected animated:(BOOL)animated +{ + [super setSelected:selected animated:animated]; + + // Configure the view for the selected state +} + +@end diff --git a/Yelp/FilterViewCell.xib b/Yelp/FilterViewCell.xib new file mode 100644 index 0000000..0143f94 --- /dev/null +++ b/Yelp/FilterViewCell.xib @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/Yelp/FilterViewController.h b/Yelp/FilterViewController.h new file mode 100644 index 0000000..2686094 --- /dev/null +++ b/Yelp/FilterViewController.h @@ -0,0 +1,22 @@ +// +// FilterViewController.h +// Yelp +// +// Created by Harsha Badami Nagaraj on 6/30/14. +// Copyright (c) 2014 codepath. All rights reserved. +// + +#import + +@class FilterViewController; + +@protocol FilterViewControllerDelegate +-(void)propagateFilters:(FilterViewController *)controller; +@end + + +@interface FilterViewController : UIViewController +@property (nonatomic, weak) id delegate; +@property (nonatomic, strong) NSMutableDictionary *filters; +@property (strong, nonatomic) NSMutableDictionary *selectedValues; +@end diff --git a/Yelp/FilterViewController.m b/Yelp/FilterViewController.m new file mode 100644 index 0000000..9d248c6 --- /dev/null +++ b/Yelp/FilterViewController.m @@ -0,0 +1,169 @@ +// +// FilterViewController.m +// Yelp +// +// Created by Harsha Badami Nagaraj on 6/30/14. +// Copyright (c) 2014 codepath. All rights reserved. +// + +#import "FilterViewController.h" + +@interface FilterViewController () + +@property (weak, nonatomic) IBOutlet UITableView *tableView; + +@end + +@implementation FilterViewController + +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil +{ + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + NSDictionary *deals = @{ + @"options":@[@"Offering Deals"], + @"values":@[@"false"] + }; + NSDictionary *sorts = @{ + @"options":@[@"Best Match", @"Distance",@"Rating"], + @"values":@[@"0",@"1",@"2"] + }; + NSDictionary *radius = @{ + @"options":@[@"5000 meters", @"10000 meters",@"15000 meters",@"25000 meters"], + @"values":@[@"5000",@"10000",@"15000",@"25000"] + }; + NSDictionary *categories = @{ + @"options":@[@"Vegan", @"Vegetarian", @"Indian", @"Thai", @"Mexican", @"Mediterranean", @"All Restaurants"], + @"values":@[@"vegan", @"vegetarian", @"indpak", @"thai", @"mexican", @"mediterranean", @"restaurants"] + }; + + self.filters = [NSMutableDictionary dictionaryWithDictionary:@{ + @"deals_filter" : deals, + @"sort" : sorts, + @"radius_filter" : radius, + @"category_filter" : categories + }]; + } + return self; +} + +- (void)viewDidLoad +{ + [super viewDidLoad]; + // Do any additional setup after loading the view from its nib. + + self.tableView.delegate = self; + self.tableView.dataSource = self; + + UILabel *label = [[UILabel alloc] initWithFrame:CGRectZero]; + label.textColor = [UIColor whiteColor]; + label.text = @"Filters"; + label.font = [UIFont boldSystemFontOfSize:20.0]; + self.navigationItem.titleView = label; + [label sizeToFit]; + + self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Cancel" style:UIBarButtonItemStyleBordered target:self action:@selector(popView)]; + self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Search" style:UIBarButtonItemStyleBordered target:self action:@selector(switchView)]; + + [self.navigationItem.leftBarButtonItem setTintColor:[UIColor whiteColor]]; + [self.navigationItem.rightBarButtonItem setTintColor:[UIColor whiteColor]]; +} + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +//Search Button +-(void) switchView { + [self.delegate propagateFilters:self]; + [self.navigationController popViewControllerAnimated:YES]; +} + +//Cancel Button +-(void) popView { + [self.navigationController popToRootViewControllerAnimated:YES]; +} + +-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + NSArray *sectionArray = [self.filters allKeys]; + //NSString *selectedOption = [self.selectedValues objectForKey:sectionArray[section]]; + + /*if ([selectedOption length] != 0) { + return 1; + }*/ + + return [[self.filters objectForKey:sectionArray[section]][@"options"] count]; +} + +-(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { + NSArray *sections = [self.filters allKeys]; + return sections[section]; +} + +-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return [self.filters count]; +} + + +-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + NSArray *sectionArray = [self.filters allKeys]; + NSDictionary *sectionOptions = [self.filters objectForKey:sectionArray[indexPath.section]]; + NSArray *options = sectionOptions[@"options"]; + NSArray *values = sectionOptions[@"values"]; + + UITableViewCell *cell = [[UITableViewCell alloc]init]; + cell.textLabel.text = options[indexPath.row]; + NSString *selectedValue = values[indexPath.row]; + + if([cell.textLabel.text isEqual: @"Offering Deals"]) + { + UISwitch *switchView = [[UISwitch alloc] initWithFrame:CGRectZero]; + cell.accessoryView = switchView; + if ([self.selectedValues[@"deals_filter"] isEqualToString:@"1"]) { + [switchView setOn:YES animated:NO]; + } else { + [switchView setOn:NO animated:NO]; + } + [switchView addTarget:self action:@selector(switchChanged:) forControlEvents:UIControlEventValueChanged]; + } else { + cell.accessoryView = NULL; + } + + if ([selectedValue isEqualToString:[self.selectedValues objectForKey:sectionArray[indexPath.section]]]) { + cell.accessoryType = UITableViewCellAccessoryCheckmark; + } else { + cell.accessoryType = UITableViewCellAccessoryNone; + } + + + return cell; +} + +-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { + [tableView deselectRowAtIndexPath:indexPath animated:YES]; + + NSArray *sectionArray = [self.filters allKeys]; + NSDictionary *sectionOptions = [self.filters objectForKey:sectionArray[indexPath.section]]; + NSArray *values = sectionOptions[@"values"]; + + if ([sectionArray[indexPath.section] isEqualToString: @"deals_filter"]) { + return; + } else { + [self.selectedValues setObject:values[indexPath.row] forKey:sectionArray[indexPath.section]]; + } + + [tableView reloadData]; +} + + +-(void)switchChanged: (id) sender { + if ([self.selectedValues[@"deals_filter"] isEqualToString:@"0"]) { + [self.selectedValues setObject:@"1" forKey:@"deals_filter"]; + } else { + [self.selectedValues setObject:@"0" forKey:@"deals_filter"]; + } +} + +@end diff --git a/Yelp/FilterViewController.xib b/Yelp/FilterViewController.xib new file mode 100644 index 0000000..33d9fcf --- /dev/null +++ b/Yelp/FilterViewController.xib @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Yelp/MainViewController.h b/Yelp/MainViewController.h index b072ae7..949fd12 100644 --- a/Yelp/MainViewController.h +++ b/Yelp/MainViewController.h @@ -7,7 +7,9 @@ // #import +#import "MBProgressHUD.h" +#import "FilterViewController.h" -@interface MainViewController : UIViewController +@interface MainViewController : UIViewController @end diff --git a/Yelp/MainViewController.m b/Yelp/MainViewController.m index 86c77a0..fa9d0c6 100644 --- a/Yelp/MainViewController.m +++ b/Yelp/MainViewController.m @@ -8,6 +8,9 @@ #import "MainViewController.h" #import "YelpClient.h" +#import "YelpTableViewCell.h" +#import "FilterViewController.h" +#import NSString * const kYelpConsumerKey = @"vxKwwcR_NMQ7WaEiQBK_CA"; NSString * const kYelpConsumerSecret = @"33QCvh5bIF5jIHR5klQr7RtBDhQ"; @@ -17,6 +20,10 @@ @interface MainViewController () @property (nonatomic, strong) YelpClient *client; +@property (weak, nonatomic) IBOutlet UITableView *tableView; +@property (nonatomic, strong) NSArray *searchResults; +@property (nonatomic, strong) NSString *searchTerm; +@property (nonatomic, strong) NSMutableDictionary *filterParams; @end @@ -26,14 +33,15 @@ - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { - // You can register for Yelp API keys here: http://www.yelp.com/developers/manage_api_keys - self.client = [[YelpClient alloc] initWithConsumerKey:kYelpConsumerKey consumerSecret:kYelpConsumerSecret accessToken:kYelpToken accessSecret:kYelpTokenSecret]; - - [self.client searchWithTerm:@"Thai" success:^(AFHTTPRequestOperation *operation, id response) { - NSLog(@"response: %@", response); - } failure:^(AFHTTPRequestOperation *operation, NSError *error) { - NSLog(@"error: %@", [error description]); - }]; + self.filterParams = [NSMutableDictionary dictionaryWithDictionary:@{ + @"term": @"", + @"ll" : @"37.4262609,-122.017313", + @"category_filter" : @"restaurants", + @"deals_filter" : @"0", + @"sort" : @"1", + @"radius_filter": @"10000" + }]; + self.searchTerm = @""; } return self; } @@ -41,7 +49,17 @@ - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil - (void)viewDidLoad { [super viewDidLoad]; - // Do any additional setup after loading the view from its nib. + + self.tableView.delegate = self; + self.tableView.dataSource = self; + + [self loadNavigationBarItems]; + [self.tableView registerNib:[UINib nibWithNibName:@"YelpTableViewCell" bundle:nil] forCellReuseIdentifier:@"YelpTableViewCell"]; + + self.client = [[YelpClient alloc] initWithConsumerKey:kYelpConsumerKey consumerSecret:kYelpConsumerSecret accessToken:kYelpToken accessSecret:kYelpTokenSecret]; + + [self fetchResults:@""]; + } - (void)didReceiveMemoryWarning @@ -50,4 +68,82 @@ - (void)didReceiveMemoryWarning // Dispose of any resources that can be recreated. } +- (void)loadNavigationBarItems { + //SearchBar + UISearchBar *searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0, 0, 200, 30)]; + searchBar.delegate = self; + searchBar.showsCancelButton = YES; + self.navigationItem.titleView = searchBar; + [self.navigationItem.titleView setTintColor:[UIColor whiteColor]]; + + //Filter + self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Filter" style:UIBarButtonItemStyleBordered target:self action:@selector(filterView)]; + [self.navigationItem.leftBarButtonItem setTintColor:[UIColor whiteColor]]; +} + +- (NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return self.searchResults.count; +} + +-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { + return 95; +} + +- (void) fetchResults:(NSString *)searchTerm { + + MBProgressHUD *hud = [[MBProgressHUD alloc] initWithView:self.view]; + [self.view addSubview:hud]; + hud.delegate = self; + hud.labelText = @"Loading Restaurants..."; + [hud show:YES]; + + [self.filterParams setObject:searchTerm forKey:@"term"]; + + [self.client searchWithTerm:self.filterParams success:^(AFHTTPRequestOperation *operation, id response) { + //NSLog(@"%@", response); + self.searchResults = response[@"businesses"]; + [self.tableView reloadData]; + [hud hide:YES]; + + } failure:^(AFHTTPRequestOperation *operation, NSError *error) { + NSLog(@"error: %@", [error description]); + + UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Problem Retrieving Results" message:[error localizedDescription] delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil]; + [alertView show]; + [hud hide:YES]; + }]; +} + + +- (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + YelpTableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier:@"YelpTableViewCell"]; + + [cell setData:self.searchResults[indexPath.row]]; + return cell; +} + +-(void)searchBarSearchButtonClicked:(UISearchBar *)searchBar { + self.searchTerm = searchBar.text; + [self fetchResults:searchBar.text]; + [searchBar resignFirstResponder]; +} + +-(void)searchBarCancelButtonClicked:(UISearchBar *)searchBar { + searchBar.text = @""; + [self.searchDisplayController setActive:NO]; + [searchBar resignFirstResponder]; +} + +-(void)filterView { + FilterViewController *fvc = [[FilterViewController alloc] initWithNibName:@"FilterViewController" bundle:nil]; + fvc.selectedValues = self.filterParams; + fvc.delegate = self; + [self.navigationController pushViewController:fvc animated:YES]; +} + +-(void) propagateFilters:(FilterViewController *)controller { + [self fetchResults:self.searchTerm]; +} + + @end diff --git a/Yelp/MainViewController.xib b/Yelp/MainViewController.xib index 75b6e65..4be93dc 100644 --- a/Yelp/MainViewController.xib +++ b/Yelp/MainViewController.xib @@ -1,11 +1,13 @@ - + + + @@ -14,17 +16,29 @@ - + + + + + + + + + + + + + + + + + + + diff --git a/Yelp/RestaurantCell.h b/Yelp/RestaurantCell.h new file mode 100644 index 0000000..6da854d --- /dev/null +++ b/Yelp/RestaurantCell.h @@ -0,0 +1,14 @@ +// +// RestaurantCell.h +// Yelp +// +// Created by Harsha Badami Nagaraj on 6/22/14. +// Copyright (c) 2014 codepath. All rights reserved. +// + +#import + +@interface RestaurantCell : UITableViewCell +@property (weak, nonatomic) IBOutlet UILabel *restaurantNameLabel; + +@end diff --git a/Yelp/RestaurantCell.m b/Yelp/RestaurantCell.m new file mode 100644 index 0000000..f8011cd --- /dev/null +++ b/Yelp/RestaurantCell.m @@ -0,0 +1,25 @@ +// +// RestaurantCell.m +// Yelp +// +// Created by Harsha Badami Nagaraj on 6/22/14. +// Copyright (c) 2014 codepath. All rights reserved. +// + +#import "RestaurantCell.h" + +@implementation RestaurantCell + +- (void)awakeFromNib +{ + // Initialization code +} + +- (void)setSelected:(BOOL)selected animated:(BOOL)animated +{ + [super setSelected:selected animated:animated]; + + // Configure the view for the selected state +} + +@end diff --git a/Yelp/RestaurantCell.xib b/Yelp/RestaurantCell.xib new file mode 100644 index 0000000..f6b6db3 --- /dev/null +++ b/Yelp/RestaurantCell.xib @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Yelp/YelpClient.h b/Yelp/YelpClient.h index 145ada1..5138837 100644 --- a/Yelp/YelpClient.h +++ b/Yelp/YelpClient.h @@ -13,6 +13,6 @@ - (id)initWithConsumerKey:(NSString *)consumerKey consumerSecret:(NSString *)consumerSecret accessToken:(NSString *)accessToken accessSecret:(NSString *)accessSecret; -- (AFHTTPRequestOperation *)searchWithTerm:(NSString *)term success:(void (^)(AFHTTPRequestOperation *operation, id response))success failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; +- (AFHTTPRequestOperation *)searchWithTerm:(NSDictionary *)parameters success:(void (^)(AFHTTPRequestOperation *operation, id response))success failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; @end diff --git a/Yelp/YelpClient.m b/Yelp/YelpClient.m index df77ec0..76779df 100644 --- a/Yelp/YelpClient.m +++ b/Yelp/YelpClient.m @@ -20,10 +20,10 @@ - (id)initWithConsumerKey:(NSString *)consumerKey consumerSecret:(NSString *)con return self; } -- (AFHTTPRequestOperation *)searchWithTerm:(NSString *)term success:(void (^)(AFHTTPRequestOperation *operation, id response))success failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure { +- (AFHTTPRequestOperation *)searchWithTerm:(NSDictionary *)parameters success:(void (^)(AFHTTPRequestOperation *operation, id response))success failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure { // For additional parameters, see http://www.yelp.com/developers/documentation/v2/search_api - NSDictionary *parameters = @{@"term": term, @"location" : @"San Francisco"}; + //NSDictionary *parameters = @{@"term": term, @"location" : @"San Francisco"}; return [self GET:@"search" parameters:parameters success:success failure:failure]; } diff --git a/Yelp/YelpTableViewCell.h b/Yelp/YelpTableViewCell.h new file mode 100644 index 0000000..a031b25 --- /dev/null +++ b/Yelp/YelpTableViewCell.h @@ -0,0 +1,23 @@ +// +// YelpTableViewCell.h +// Yelp +// +// Created by Harsha Badami Nagaraj on 6/30/14. +// Copyright (c) 2014 codepath. All rights reserved. +// + +#import + +@interface YelpTableViewCell : UITableViewCell + +@property (weak, nonatomic) IBOutlet UIImageView *thumbnailImage; +@property (weak, nonatomic) IBOutlet UILabel *nameLabel; +@property (weak, nonatomic) IBOutlet UILabel *distanceLabel; +@property (weak, nonatomic) IBOutlet UIImageView *ratingImage; +@property (weak, nonatomic) IBOutlet UILabel *reviewsLabel; +@property (weak, nonatomic) IBOutlet UILabel *addressLabel; +@property (weak, nonatomic) IBOutlet UILabel *cuisineLabel; +@property (weak, nonatomic) NSDictionary *restaurant; +-(void)setData:(NSDictionary *)listing; + +@end diff --git a/Yelp/YelpTableViewCell.m b/Yelp/YelpTableViewCell.m new file mode 100644 index 0000000..8b958ae --- /dev/null +++ b/Yelp/YelpTableViewCell.m @@ -0,0 +1,66 @@ +// +// YelpTableViewCell.m +// Yelp +// +// Created by Harsha Badami Nagaraj on 6/30/14. +// Copyright (c) 2014 codepath. All rights reserved. +// + +#import "YelpTableViewCell.h" +#import + +@implementation YelpTableViewCell + +- (void)awakeFromNib +{ + // Initialization code +} + +- (void)setSelected:(BOOL)selected animated:(BOOL)animated +{ + [super setSelected:selected animated:animated]; + + // Configure the view for the selected state +} + +- (void)setData:(NSDictionary *)listing { + NSMutableArray *categories = [NSMutableArray array]; + + //Name + self.nameLabel.text = listing[@"name"]; + + //Address + if ([listing[@"location"][@"address"] count] != 0 ) { + self.addressLabel.text = [NSString stringWithFormat:@"%@, %@", listing[@"location"][@"address"][0], listing[@"location"][@"city"]]; + } else { + self.addressLabel.text = @" "; + } + + //Categories + if ([listing[@"categories"] count] != 0) { + for (NSArray *cuisineArr in listing[@"categories"]) { + [categories addObject:cuisineArr[0]]; + } + self.cuisineLabel.text = [categories componentsJoinedByString:@", "]; + } else { + self.cuisineLabel.text = @" "; + } + + //Reviews + if(listing[@"review_count"]) { + self.reviewsLabel.text = [NSString stringWithFormat:@"%@ Reviews", listing[@"review_count"]]; + } + + //Distance + if (listing[@"distance"]) { + NSString *string = [NSString stringWithFormat:@"%@", listing[@"distance"]]; + float stringFloat = [string floatValue]; + stringFloat = stringFloat * 0.000621371; + self.distanceLabel.text = [NSString stringWithFormat:@"%.1f mi", stringFloat]; + } + + //Set Rating Image & Thumbnail Image + [self.thumbnailImage setImageWithURL:[NSURL URLWithString:listing[@"image_url"]]]; + [self.ratingImage setImageWithURL:[NSURL URLWithString:listing[@"rating_img_url"]]]; +} +@end diff --git a/Yelp/YelpTableViewCell.xib b/Yelp/YelpTableViewCell.xib new file mode 100644 index 0000000..6802218 --- /dev/null +++ b/Yelp/YelpTableViewCell.xib @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +