├── HackerBoard.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcuserdata │ └── blaketsuzaki.xcuserdatad │ └── xcschemes │ ├── HackerBoard.xcscheme │ └── xcschememanagement.plist ├── HackerBoard ├── 5b1PC5s.png ├── AFIndexedCollectionView.h ├── AFIndexedCollectionView.m ├── AFTableViewCell.h ├── AFTableViewCell.m ├── AFViewController.h ├── AFViewController.m ├── AMSlideOut │ ├── AMSlideOutGlobals.h │ ├── AMSlideOutGlobals.m │ ├── AMSlideOutNavigationController.h │ ├── AMSlideOutNavigationController.m │ ├── AMSlideTableCell.h │ ├── AMSlideTableCell.m │ ├── AMSlideTableHeader.h │ ├── AMSlideTableHeader.m │ ├── AMTableView.h │ ├── AMTableView.m │ ├── close.png │ ├── iconSlide.png │ ├── iconSlide@2x.png │ ├── iconSlideBlack.png │ └── iconSlideBlack@2x.png ├── Base.lproj │ ├── Main_iPad.storyboard │ └── Main_iPhone.storyboard ├── BaseViewController.h ├── BaseViewController.m ├── BoardDetailViewController.h ├── BoardDetailViewController.m ├── Defines.h ├── Github.png ├── GithubAuthController.h ├── GithubAuthController.m ├── GithubAuthenticatorView.h ├── GithubAuthenticatorView.m ├── HackerBoard-Info.plist ├── HackerBoard-Prefix.pch ├── HackrBoardv1_1AppDelegate.h ├── HackrBoardv1_1AppDelegate.m ├── Images.xcassets │ ├── AppIcon.appiconset │ │ ├── 5b1PC5s-120.png │ │ └── Contents.json │ └── LaunchImage.launchimage │ │ └── Contents.json ├── InfoCard.h ├── InfoCard.m ├── LoginViewController.h ├── LoginViewController.m ├── NSDictionary+UrlEncoding.h ├── NSDictionary+UrlEncoding.m ├── Parse.framework │ ├── Headers │ ├── Parse │ ├── Resources │ ├── Versions │ │ ├── 1.2.19 │ │ │ ├── Headers │ │ │ │ ├── PFACL.h │ │ │ │ ├── PFAnalytics.h │ │ │ │ ├── PFAnonymousUtils.h │ │ │ │ ├── PFCloud.h │ │ │ │ ├── PFConstants.h │ │ │ │ ├── PFFacebookUtils.h │ │ │ │ ├── PFFile.h │ │ │ │ ├── PFGeoPoint.h │ │ │ │ ├── PFImageView.h │ │ │ │ ├── PFInstallation.h │ │ │ │ ├── PFLogInView.h │ │ │ │ ├── PFLogInViewController.h │ │ │ │ ├── PFObject+Subclass.h │ │ │ │ ├── PFObject.h │ │ │ │ ├── PFProduct.h │ │ │ │ ├── PFProductTableViewController.h │ │ │ │ ├── PFPurchase.h │ │ │ │ ├── PFPurchaseTableViewCell.h │ │ │ │ ├── PFPush.h │ │ │ │ ├── PFQuery.h │ │ │ │ ├── PFQueryTableViewController.h │ │ │ │ ├── PFRelation.h │ │ │ │ ├── PFRole.h │ │ │ │ ├── PFSignUpView.h │ │ │ │ ├── PFSignUpViewController.h │ │ │ │ ├── PFSubclassing.h │ │ │ │ ├── PFTableViewCell.h │ │ │ │ ├── PFTwitterUtils.h │ │ │ │ ├── PFUser.h │ │ │ │ ├── PF_EGORefreshTableHeaderView.h │ │ │ │ ├── PF_MBProgressHUD.h │ │ │ │ ├── PF_Twitter.h │ │ │ │ └── Parse.h │ │ │ ├── Parse │ │ │ └── Resources │ │ │ │ ├── Info.plist │ │ │ │ └── Localizable.strings │ │ └── Current │ └── third_party_licenses.txt ├── Plus.png ├── ProfileTableView.h ├── ProfileTableView.m ├── ProfileViewController.h ├── ProfileViewController.m ├── SCU.jpg ├── SizerView.h ├── SizerView.m ├── TeamViewController.h ├── TeamViewController.m ├── UIImage+RoundedImage.h ├── UIImage+RoundedImage.m ├── UserSearchViewController.h ├── UserSearchViewController.m ├── en.lproj │ └── InfoPlist.strings ├── lahacks.png ├── main.m ├── pauley.jpg └── star.png └── HackerBoardTests ├── HackerBoardTests-Info.plist ├── HackerBoardTests.m └── en.lproj └── InfoPlist.strings /HackerBoard.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /HackerBoard.xcodeproj/xcuserdata/blaketsuzaki.xcuserdatad/xcschemes/HackerBoard.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 61 | 62 | 68 | 69 | 70 | 71 | 72 | 73 | 79 | 80 | 86 | 87 | 88 | 89 | 91 | 92 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /HackerBoard.xcodeproj/xcuserdata/blaketsuzaki.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | HackerBoard.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 12E7409818F967E600875AB4 16 | 17 | primary 18 | 19 | 20 | 12E740BC18F967E600875AB4 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /HackerBoard/5b1PC5s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HackingEDU/hackingedu-ios/6cde43b08ca8135defc3fe2029d8290c7a2ed6e0/HackerBoard/5b1PC5s.png -------------------------------------------------------------------------------- /HackerBoard/AFIndexedCollectionView.h: -------------------------------------------------------------------------------- 1 | // 2 | // AFIndexedCollectionView.h 3 | // AFTabledCollectionView 4 | // 5 | // Created by Ash Furrow on 2013-03-14. 6 | // Copyright (c) 2013 Ash Furrow. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AFIndexedCollectionView : UICollectionView 12 | 13 | @property (nonatomic, assign) NSInteger index; 14 | @property NSInteger type; 15 | @end 16 | -------------------------------------------------------------------------------- /HackerBoard/AFIndexedCollectionView.m: -------------------------------------------------------------------------------- 1 | // 2 | // AFIndexedCollectionView.m 3 | // AFTabledCollectionView 4 | // 5 | // Created by Ash Furrow on 2013-03-14. 6 | // Copyright (c) 2013 Ash Furrow. All rights reserved. 7 | // 8 | 9 | #import "AFIndexedCollectionView.h" 10 | 11 | @implementation AFIndexedCollectionView 12 | 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /HackerBoard/AFTableViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // AFTableViewCell.h 3 | // AFTabledCollectionView 4 | // 5 | // Created by Ash Furrow on 2013-03-14. 6 | // Copyright (c) 2013 Ash Furrow. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AFIndexedCollectionView.h" 11 | 12 | static NSString *CollectionViewCellIdentifier = @"CollectionViewCellIdentifier"; 13 | 14 | @interface AFTableViewCell : UITableViewCell 15 | 16 | @property (nonatomic, strong) AFIndexedCollectionView *collectionView; 17 | 18 | -(void)setCollectionViewDataSourceDelegate:(id)dataSourceDelegate index:(NSInteger)index; 19 | -(void)setType:(NSInteger)type; 20 | @end 21 | -------------------------------------------------------------------------------- /HackerBoard/AFTableViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // AFTableViewCell.m 3 | // AFTabledCollectionView 4 | // 5 | // Created by Ash Furrow on 2013-03-14. 6 | // Copyright (c) 2013 Ash Furrow. All rights reserved. 7 | // 8 | 9 | #import "AFTableViewCell.h" 10 | 11 | @implementation AFTableViewCell 12 | 13 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier 14 | { 15 | if (!(self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])) return nil; 16 | 17 | UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; 18 | //layout.sectionInset = UIEdgeInsetsMake(10, 10, 9, 10); 19 | layout.itemSize = CGSizeMake(240, 120); 20 | layout.scrollDirection = UICollectionViewScrollDirectionHorizontal; 21 | self.collectionView = [[AFIndexedCollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout]; 22 | [self.collectionView registerClass:[UICollectionViewCell class] forCellWithReuseIdentifier:CollectionViewCellIdentifier]; 23 | self.collectionView.backgroundColor = [UIColor clearColor]; 24 | self.collectionView.showsHorizontalScrollIndicator = NO; 25 | [self.contentView addSubview:self.collectionView]; 26 | 27 | return self; 28 | } 29 | 30 | -(void)setType:(NSInteger)type{ 31 | self.collectionView.type = type; 32 | } 33 | 34 | 35 | 36 | -(void)layoutSubviews 37 | { 38 | [super layoutSubviews]; 39 | 40 | //self.collectionView.frame = self.contentView.bounds; 41 | self.collectionView.frame = CGRectMake(0, 20, 320, 140); 42 | } 43 | 44 | -(void)setCollectionViewDataSourceDelegate:(id)dataSourceDelegate index:(NSInteger)index 45 | { 46 | self.collectionView.dataSource = dataSourceDelegate; 47 | self.collectionView.delegate = dataSourceDelegate; 48 | self.collectionView.index = index; 49 | 50 | [self.collectionView reloadData]; 51 | } 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /HackerBoard/AFViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // AFViewController.h 3 | // AFTabledCollectionView 4 | // 5 | // Created by Ash Furrow on 2013-03-14. 6 | // Copyright (c) 2013 Ash Furrow. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AFViewController : UITableView 12 | -(void)loadView; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /HackerBoard/AMSlideOut/AMSlideOutGlobals.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMSlideOutGlobals.h 3 | // SlideOut 4 | // 5 | // Created by Andrea on 14/08/12. 6 | // Copyright (c) 2012 Andrea Mazzini. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a 9 | // copy of this software and associated documentation files (the "Software"), 10 | // to deal in the Software without restriction, including 11 | // without limitation the rights to use, copy, modify, merge, publish, 12 | // distribute, sublicense, and/or sell copies of the Software, and to 13 | // permit persons to whom the Software is furnished to do so, subject to 14 | // the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included 17 | // in all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | 27 | #define kSOViewTitle @"title" 28 | #define kSOController @"controller" 29 | #define kSOViewIcon @"icon" 30 | #define kSOViewTag @"tag" 31 | #define kSOViewBadge @"badge" 32 | #define kSOSection @"section" 33 | #define kSOBeforeBlock @"before" 34 | #define kSOAfterBlock @"after" 35 | #define kSOSectionTitle @"title" 36 | #define kSOSectionClass @"headerClass" 37 | #define kSOSectionHeight @"headerHeight" 38 | #define kSOItemIsAction @"isAction" 39 | #define kSOItemClass @"itemClass" 40 | #define kSOItemNibName @"itemNibName" 41 | 42 | // This is to support prior versions where there was a typo in this option definition: 43 | #define AMOptionsTableOffestY AMOptionsTableOffsetY 44 | 45 | #ifndef SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO 46 | #define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending) 47 | #endif 48 | 49 | #define SCREEN_HEIGHT ((([UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationPortrait) || ([UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationPortraitUpsideDown)) ? [[UIScreen mainScreen] bounds].size.height : [[UIScreen mainScreen] bounds].size.width) 50 | 51 | FOUNDATION_EXPORT NSString *const AMOptionsEnableGesture; 52 | FOUNDATION_EXPORT NSString *const AMOptionsEnableShadow; 53 | FOUNDATION_EXPORT NSString *const AMOptionsSetButtonDone; 54 | FOUNDATION_EXPORT NSString *const AMOptionsUseBorderedButton; 55 | FOUNDATION_EXPORT NSString *const AMOptionsButtonIcon; 56 | FOUNDATION_EXPORT NSString *const AMOptionsNavBarImage; 57 | FOUNDATION_EXPORT NSString *const AMOptionsTableBackground; 58 | FOUNDATION_EXPORT NSString *const AMOptionsTableOffsetY; 59 | FOUNDATION_EXPORT NSString *const AMOptionsTableInsetX; 60 | FOUNDATION_EXPORT NSString *const AMOptionsUseDefaultTitles; 61 | 62 | FOUNDATION_EXPORT NSString *const AMOptionsSlideValue; 63 | FOUNDATION_EXPORT NSString *const AMOptionsBackground; 64 | FOUNDATION_EXPORT NSString *const AMOptionsSelectionBackground; 65 | 66 | FOUNDATION_EXPORT NSString *const AMOptionsHeaderHeight; 67 | FOUNDATION_EXPORT NSString *const AMOptionsHeaderFont; 68 | FOUNDATION_EXPORT NSString *const AMOptionsHeaderFontColor; 69 | FOUNDATION_EXPORT NSString *const AMOptionsHeaderShadowColor; 70 | FOUNDATION_EXPORT NSString *const AMOptionsHeaderPadding; 71 | FOUNDATION_EXPORT NSString *const AMOptionsHeaderGradientUp; 72 | FOUNDATION_EXPORT NSString *const AMOptionsHeaderGradientDown; 73 | FOUNDATION_EXPORT NSString *const AMOptionsHeaderSeparatorUpper; 74 | FOUNDATION_EXPORT NSString *const AMOptionsHeaderSeparatorLower; 75 | 76 | FOUNDATION_EXPORT NSString *const AMOptionsCellFont; 77 | FOUNDATION_EXPORT NSString *const AMOptionsCellFontColor; 78 | FOUNDATION_EXPORT NSString *const AMOptionsCellBadgeFont; 79 | FOUNDATION_EXPORT NSString *const AMOptionsCellBackground; 80 | FOUNDATION_EXPORT NSString *const AMOptionsCellSeparatorUpper; 81 | FOUNDATION_EXPORT NSString *const AMOptionsCellSeparatorLower; 82 | FOUNDATION_EXPORT NSString *const AMOptionsShowCellSeparatorLowerBeforeHeader; 83 | FOUNDATION_EXPORT NSString *const AMOptionsCellShadowColor; 84 | 85 | FOUNDATION_EXPORT NSString *const AMOptionsImagePadding; 86 | FOUNDATION_EXPORT NSString *const AMOptionsImageLeftPadding; 87 | FOUNDATION_EXPORT NSString *const AMOptionsImageHeight; 88 | FOUNDATION_EXPORT NSString *const AMOptionsImageOffsetByY; 89 | FOUNDATION_EXPORT NSString *const AMOptionsTextPadding; 90 | FOUNDATION_EXPORT NSString *const AMOptionsBadgePosition; 91 | 92 | FOUNDATION_EXPORT NSString *const AMOptionsDisableMenuScroll; 93 | 94 | // Animations 95 | FOUNDATION_EXPORT NSString *const AMOptionsAnimationShrink; 96 | FOUNDATION_EXPORT NSString *const AMOptionsAnimationShrinkValue; 97 | FOUNDATION_EXPORT NSString *const AMOptionsAnimationDarken; 98 | FOUNDATION_EXPORT NSString *const AMOptionsAnimationDarkenValue; 99 | FOUNDATION_EXPORT NSString *const AMOptionsAnimationDarkenColor; 100 | FOUNDATION_EXPORT NSString *const AMOptionsAnimationSlide; 101 | FOUNDATION_EXPORT NSString *const AMOptionsAnimationSlidePercentage; 102 | 103 | // Custom classes 104 | FOUNDATION_EXPORT NSString *const AMOptionsTableHeaderClass; 105 | FOUNDATION_EXPORT NSString *const AMOptionsTableCellClass; 106 | 107 | FOUNDATION_EXPORT NSString *const AMOptionsTableCellHeight; 108 | FOUNDATION_EXPORT NSString *const AMOptionsTableIconMaxSize; 109 | FOUNDATION_EXPORT NSString *const AMOptionsSlideoutTime; 110 | FOUNDATION_EXPORT NSString *const AMOptionsTableBadgeHeight; 111 | FOUNDATION_EXPORT NSString *const AMOptionsSlideShadowOffset; 112 | FOUNDATION_EXPORT NSString *const AMOptionsSlideShadowOpacity; 113 | 114 | FOUNDATION_EXPORT NSString *const AMOptionsBadgeShowTotal; 115 | FOUNDATION_EXPORT NSString *const AMOptionsBadgeGlobalFont; 116 | FOUNDATION_EXPORT NSString *const AMOptionsBadgeGlobalPositionX; 117 | FOUNDATION_EXPORT NSString *const AMOptionsBadgeGlobalPositionY; 118 | FOUNDATION_EXPORT NSString *const AMOptionsBadgeGlobalPositionW; 119 | FOUNDATION_EXPORT NSString *const AMOptionsBadgeGlobalPositionH; 120 | FOUNDATION_EXPORT NSString *const AMOptionsBadgeGlobalTextColor; 121 | FOUNDATION_EXPORT NSString *const AMOptionsBadgeGlobalBackColor; 122 | FOUNDATION_EXPORT NSString *const AMOptionsBadgeGlobalShadowColor; 123 | FOUNDATION_EXPORT NSString *const AMOptionsCellBadgeFontColor; 124 | FOUNDATION_EXPORT NSString *const AMOptionsCellBadgeBackColor; 125 | FOUNDATION_EXPORT NSString *const AMOptionsNavbarTranslucent; 126 | 127 | // Notifications 128 | 129 | #define kAMSlideOutMenuWillShow @"SlideOutMenuWillShow" 130 | #define kAMSlideOutDidShow @"SlideOutMenuDidShow" 131 | #define kAMSlideOutWillHide @"SlideOutMenuWillHide" 132 | #define kAMSlideOutDidHide @"SlideOutMenuDidHide" 133 | 134 | @class AMSlideTableHeader; 135 | 136 | @protocol AMSlideOutAccessibilityDelegate 137 | 138 | @optional 139 | - (void)applyAccessibilityPropertiesToHeaderView: (AMSlideTableHeader*)headerView fromSection: (NSInteger)section; 140 | - (void)applyAccessibilityPropertiesToSlideOutCell: (UITableViewCell*)slideOutCell withTag: (int)tag fromSection: (NSInteger)section; 141 | - (void)applyAccessibilityPropertiesToSlideOutButton: (NSObject*)accessibleButton; 142 | @end 143 | 144 | @interface AMSlideOutGlobals : NSObject 145 | 146 | + (NSDictionary*)defaultOptions; 147 | + (NSDictionary*)defaultFlatOptions; 148 | 149 | @end 150 | -------------------------------------------------------------------------------- /HackerBoard/AMSlideOut/AMSlideOutNavigationController.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMSlideOutNavigationController.h 3 | // AMSlideOutNavigationController 4 | // 5 | // Created by Andrea on 12/08/12. 6 | // Copyright (c) 2012 Andrea Mazzini. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a 9 | // copy of this software and associated documentation files (the "Software"), 10 | // to deal in the Software without restriction, including 11 | // without limitation the rights to use, copy, modify, merge, publish, 12 | // distribute, sublicense, and/or sell copies of the Software, and to 13 | // permit persons to whom the Software is furnished to do so, subject to 14 | // the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included 17 | // in all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | 27 | #import 28 | #import 29 | #import "AMSlideOutGlobals.h" 30 | #import "AMTableView.h" 31 | 32 | typedef void (^AMSlideOutBeforeHandler)(void); 33 | typedef void (^AMSlideOutCompletionHandler)(void); 34 | 35 | @interface AMSlideOutNavigationController : UIViewController 36 | 37 | @property (weak, nonatomic) UIViewController* currentViewController; 38 | @property (readonly, nonatomic) NSInteger currentTag; 39 | @property (strong, nonatomic) NSMutableArray* menuItems; 40 | @property (strong, nonatomic) UINavigationController* contentController; 41 | 42 | @property (assign, nonatomic) NSInteger startingControllerTag; 43 | 44 | @property (nonatomic, assign) Class navigationControllerClass; 45 | @property (nonatomic, assign) Class navigationBarClass; 46 | @property (nonatomic, assign) Class navigationToolbarClass; 47 | 48 | @property (weak, nonatomic) id accessibilityDelegate; 49 | 50 | /**----------------------------------------------------------------------------- 51 | * @name Instantiating AMSlideOutNavigationController 52 | * ----------------------------------------------------------------------------- 53 | */ 54 | 55 | /** Instantiate with a given array of menu items. 56 | * 57 | * @param items The items array. 58 | */ 59 | + (id)slideOutNavigationWithMenuItems:(NSArray*)items; 60 | 61 | /** Instantiate an empty menu */ 62 | + (id)slideOutNavigation; 63 | 64 | /** Instantiate with a given array of menu items. 65 | * 66 | * @param items The items array. 67 | */ 68 | - (id)initWithMenuItems:(NSArray*)items; 69 | 70 | /** Setups the slideout options 71 | * 72 | * @param options The options dictionary. 73 | */ 74 | - (void)setSlideoutOptions:(NSDictionary *)options; 75 | 76 | /** Sets container view to a view controller without adding it to the menu **/ 77 | - (void)setContentViewController:(UIViewController *)controller; 78 | 79 | - (void)addViewControllerToLastSection:(UIViewController*)controller tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon; 80 | - (void)addViewControllerToLastSection:(UIViewController*)controller tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon beforeChange:(void(^)())before onCompletition:(void(^)())after; 81 | - (void)addActionToLastSection:(void(^)())action tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon; 82 | - (void)addViewControllerClassToLastSection:(Class)cls withNibName:(NSString*)nibName tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon; 83 | - (void)addViewControllerClassToLastSection:(Class)cls withNibName:(NSString*)nibName tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon beforeChange:(void(^)())before onCompletition:(void(^)())after; 84 | 85 | - (void)addViewController:(UIViewController*)controller tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon toSection:(NSInteger)section; 86 | - (void)addViewController:(UIViewController*)controller tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon toSection:(NSInteger)section beforeChange:(void(^)())before onCompletition:(void(^)())after; 87 | - (void)addAction:(void(^)())action tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon toSection:(NSInteger)section; 88 | // Controller will created only when it will picked from menu, and destroyed when user pick another controller 89 | - (void)addViewControllerClass:(Class)cls withNibName:(NSString*)nibName tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon toSection:(NSInteger)section; 90 | - (void)addViewControllerClass:(Class)cls withNibName:(NSString*)nibName tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon toSection:(NSInteger)section beforeChange:(void(^)())before onCompletition:(void(^)())after; 91 | 92 | - (void)switchToControllerTagged:(int)tag andPerformSelector:(SEL)selector withObject:(id)obj; 93 | - (void)switchToControllerTagged:(int)tag andPerformSelector:(SEL)selector withObject:(id)obj afterDelay:(NSTimeInterval)delay; 94 | 95 | - (void)addSectionWithTitle:(NSString*)title; 96 | - (void)addSectionWithTitle:(NSString*)title andHeaderClassName:(NSString*)klass withHeight:(CGFloat)height; 97 | 98 | /** Sets the value for a specific menu item's badge 99 | * 100 | * If AMOptionsBadgeShowTotal is set to YES, the global badge will be updated with the 101 | * badge count of each menu item, when applicable. 102 | * 103 | * @param value The string that will be displayed in the item's badge. 104 | * @param tag The tag number of the menu item. 105 | */ 106 | - (void)setBadgeValue:(NSString*)value forTag:(int)tag; 107 | 108 | /** Sets a custom value in the bar button's badge. 109 | * 110 | * Make sure that AMOptionsBadgeShowTotal is set to NO, or the value will be overriden when a new 111 | * badge value is set for any menu item. 112 | * Pass a nil value to hide the badge. 113 | * 114 | * @param value The string that will be displayed in the bar button's badge. 115 | */ 116 | - (void)setBadgeTotalValue:(NSString*)value; 117 | 118 | /** Opens the menu's tray */ 119 | - (void)showSideMenu; 120 | 121 | /** Closes the menu's tray */ 122 | - (void)hideSideMenu; 123 | 124 | /** Manually reloads the menu item's table */ 125 | - (void)reloadTableView; 126 | 127 | /** Enables or disables the vertical scrolling of the slide menu. 128 | * 129 | * When the scroll is disabled, the value is ignored if the view's content size is greater 130 | * then the table size 131 | * 132 | * @param enabled The enabled/disabled boolean flag. 133 | */ 134 | - (void)setMenuScrollingEnabled:(BOOL)enabled; 135 | 136 | /** Sets a custom left bar button item 137 | * 138 | * @param barButton The custom UIBarButtonItem instance. 139 | */ 140 | - (void)setLeftBarButton:(UIBarButtonItem*)barButton; 141 | 142 | - (id)getControllerWithTag:(int)tag; 143 | 144 | - (void)disableGesture; 145 | - (void)enableGesture; 146 | 147 | @end 148 | -------------------------------------------------------------------------------- /HackerBoard/AMSlideOut/AMSlideTableCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMSlideTableCell.h 3 | // SlideOut 4 | // 5 | // Created by Andrea on 14/08/12. 6 | // Copyright (c) 2012 Andrea Mazzini. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a 9 | // copy of this software and associated documentation files (the "Software"), 10 | // to deal in the Software without restriction, including 11 | // without limitation the rights to use, copy, modify, merge, publish, 12 | // distribute, sublicense, and/or sell copies of the Software, and to 13 | // permit persons to whom the Software is furnished to do so, subject to 14 | // the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included 17 | // in all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | 27 | #import 28 | #import 29 | 30 | @interface AMSlideTableCell : UITableViewCell 31 | 32 | @property (nonatomic, weak) NSDictionary* options; 33 | 34 | - (void)setBadgeText:(NSString*)text; 35 | 36 | @property (nonatomic, assign) BOOL isCellBeforeHeader; 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /HackerBoard/AMSlideOut/AMSlideTableCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // AMSlideTableCell.m 3 | // SlideOut 4 | // 5 | // Created by Andrea on 14/08/12. 6 | // Copyright (c) 2012 Andrea Mazzini. All rights reserved. 7 | // 8 | 9 | #import "AMSlideTableCell.h" 10 | #import "AMSlideOutGlobals.h" 11 | 12 | @interface AMSlideTableCell() 13 | 14 | @property (nonatomic, strong) UILabel* badge; 15 | @property (nonatomic, strong) UIView* upperBorder; 16 | @property (nonatomic, strong) UIView* lowerBorder; 17 | 18 | @end 19 | 20 | @implementation AMSlideTableCell 21 | 22 | @synthesize badge = _badgeValue; 23 | @synthesize upperBorder = _upperBorder; 24 | @synthesize lowerBorder = _lowerBorder; 25 | 26 | - (UIView *) upperBorder { 27 | 28 | if (!_upperBorder) { 29 | _upperBorder = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, 1.0)]; 30 | _upperBorder.backgroundColor = self.options[AMOptionsCellSeparatorUpper]; 31 | } 32 | return _upperBorder; 33 | } 34 | 35 | - (UIView *) lowerBorder { 36 | 37 | if (!_lowerBorder) { 38 | _lowerBorder = [[UIView alloc] initWithFrame:CGRectMake(0, self.bounds.size.height, self.bounds.size.width, 1.0)]; 39 | _lowerBorder.backgroundColor = self.options[AMOptionsCellSeparatorLower]; 40 | } 41 | return _lowerBorder; 42 | } 43 | 44 | - (void)layoutSubviews 45 | { 46 | 47 | [self addSubview:self.upperBorder]; 48 | [self addSubview:self.lowerBorder]; 49 | 50 | self.textLabel.backgroundColor = [UIColor clearColor]; 51 | self.textLabel.textColor = self.options[AMOptionsCellFontColor]; 52 | self.textLabel.shadowOffset = CGSizeMake(0, 1); 53 | self.textLabel.shadowColor = self.options[AMOptionsCellShadowColor]; 54 | self.textLabel.font = self.options[AMOptionsCellFont]; 55 | [self setBackgroundColor:self.options[AMOptionsCellBackground]]; 56 | if (self.imageView.image) { 57 | CGFloat imageOffsetByY = [self.options[AMOptionsImageOffsetByY] floatValue]; 58 | CGFloat imageHeight = [self.options[AMOptionsImageHeight] floatValue]; 59 | 60 | if (imageHeight > [self.options[AMOptionsTableIconMaxSize] floatValue]) { 61 | imageHeight = [self.options[AMOptionsTableIconMaxSize] floatValue]; 62 | } 63 | 64 | self.imageView.frame = CGRectMake([self.options[AMOptionsImageLeftPadding] floatValue], imageOffsetByY, [self.options[AMOptionsTableIconMaxSize] floatValue], imageHeight); 65 | self.textLabel.frame = CGRectMake([self.options[AMOptionsImagePadding] floatValue], 0, [self.options[AMOptionsSlideValue] floatValue] - [self.options[AMOptionsImagePadding] floatValue], [self.options[AMOptionsTableCellHeight] floatValue]); 66 | } else { 67 | self.textLabel.frame = CGRectMake([self.options[AMOptionsTextPadding] floatValue], 0, [self.options[AMOptionsSlideValue] floatValue] - [self.options[AMOptionsTextPadding] floatValue], [self.options[AMOptionsTableCellHeight] floatValue]); 68 | } 69 | 70 | self.imageView.contentMode = UIViewContentModeScaleAspectFit; 71 | 72 | // Set badge properties 73 | self.badge.font = self.options[AMOptionsCellBadgeFont]; 74 | self.badge.textColor = self.options[AMOptionsCellBadgeFontColor]; 75 | self.badge.adjustsFontSizeToFitWidth = YES; 76 | if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"6.0")) { 77 | self.badge.textAlignment = NSTextAlignmentCenter; 78 | } else { 79 | #pragma clang diagnostic push 80 | #pragma clang diagnostic ignored "-Wdeprecated-declarations" 81 | self.badge.textAlignment = UITextAlignmentCenter; 82 | #pragma clang diagnostic pop 83 | } 84 | self.badge.opaque = YES; 85 | self.badge.backgroundColor = [UIColor clearColor]; 86 | self.badge.shadowOffset = CGSizeMake(0, 1); 87 | self.badge.shadowColor = self.options[AMOptionsCellShadowColor]; 88 | self.badge.layer.cornerRadius = 8; 89 | self.badge.layer.backgroundColor = [self.options[AMOptionsCellBadgeBackColor] CGColor]; 90 | } 91 | 92 | - (UILabel*)badge 93 | { 94 | if (_badgeValue == nil) { 95 | _badgeValue = [[UILabel alloc] init]; 96 | [self addSubview:_badgeValue]; 97 | } 98 | return _badgeValue; 99 | } 100 | 101 | - (void)setBadgeText:(NSString*)text 102 | { 103 | if (text == nil || [text isEqualToString:@""]) { 104 | [self.badge setAlpha:0]; 105 | } else { 106 | CGSize fontSize; 107 | #ifdef __IPHONE_7 108 | if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0")) { 109 | fontSize = [text sizeWithAttributes: @{NSFontAttributeName: self.options[AMOptionsCellBadgeFont]}]; 110 | } else { 111 | #pragma clang diagnostic push 112 | #pragma clang diagnostic ignored "-Wdeprecated-declarations" 113 | fontSize = [text sizeWithFont:self.options[AMOptionsCellBadgeFont]]; 114 | #pragma clang diagnostic pop 115 | } 116 | #else 117 | fontSize = [text sizeWithFont:self.options[AMOptionsCellBadgeFont]]; 118 | #endif 119 | float y = [self.options[AMOptionsTableCellHeight] floatValue] / 2 - [self.options[AMOptionsTableBadgeHeight] floatValue] / 2; 120 | CGRect badgeFrame = CGRectMake([self.options[AMOptionsBadgePosition] floatValue] - (fontSize.width + 15.0) / 2.0, 121 | y, 122 | fontSize.width + 15.0, 123 | [self.options[AMOptionsTableBadgeHeight] floatValue]); 124 | self.badge.frame = badgeFrame; 125 | self.badge.text = text; 126 | [self.badge setAlpha:1]; 127 | } 128 | } 129 | 130 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated 131 | { 132 | [super setSelected:selected animated:animated]; 133 | } 134 | 135 | - (void)drawRect:(CGRect)aRect 136 | { 137 | CGContextRef context = UIGraphicsGetCurrentContext(); 138 | 139 | CGContextSetFillColorWithColor(context, ((UIColor*)self.options[AMOptionsCellBackground]).CGColor); 140 | CGContextFillRect(context, self.bounds); 141 | 142 | CGContextSetStrokeColorWithColor(context, ((UIColor*)self.options[AMOptionsCellSeparatorUpper]).CGColor); 143 | CGContextBeginPath(context); 144 | CGContextSetLineWidth(context, 2.0); 145 | CGContextMoveToPoint(context, 0, 0); 146 | CGContextAddLineToPoint(context, self.bounds.size.width, 0); 147 | CGContextStrokePath(context); 148 | 149 | if([self.options[AMOptionsShowCellSeparatorLowerBeforeHeader] boolValue] == YES || [self isCellBeforeHeader] == NO) 150 | { 151 | CGContextSetStrokeColorWithColor(context, ((UIColor*)self.options[AMOptionsCellSeparatorLower]).CGColor); 152 | CGContextBeginPath(context); 153 | CGContextSetLineWidth(context, 2.0); 154 | CGContextMoveToPoint(context, 0, self.bounds.size.height); 155 | CGContextAddLineToPoint(context, self.bounds.size.width, self.bounds.size.height); 156 | CGContextStrokePath(context); 157 | } 158 | 159 | } 160 | 161 | @end 162 | -------------------------------------------------------------------------------- /HackerBoard/AMSlideOut/AMSlideTableHeader.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMSlideTableHeader.h 3 | // SlideOut 4 | // 5 | // Created by Andrea on 14/08/12. 6 | // Copyright (c) 2012 Andrea Mazzini. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a 9 | // copy of this software and associated documentation files (the "Software"), 10 | // to deal in the Software without restriction, including 11 | // without limitation the rights to use, copy, modify, merge, publish, 12 | // distribute, sublicense, and/or sell copies of the Software, and to 13 | // permit persons to whom the Software is furnished to do so, subject to 14 | // the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included 17 | // in all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | 27 | @interface AMSlideTableHeader : UIView 28 | 29 | @property (nonatomic, retain) UILabel* titleLabel; 30 | @property (nonatomic, weak) NSDictionary* options; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /HackerBoard/AMSlideOut/AMSlideTableHeader.m: -------------------------------------------------------------------------------- 1 | // 2 | // AMSlideTableHeader.m 3 | // SlideOut 4 | // 5 | // Created by Andrea on 14/08/12. 6 | // Copyright (c) 2012 Andrea Mazzini. All rights reserved. 7 | // 8 | 9 | #import "AMSlideTableHeader.h" 10 | #import "AMSlideOutGlobals.h" 11 | 12 | @implementation AMSlideTableHeader 13 | 14 | - (id)init { 15 | if ((self = [super init])) { 16 | self.titleLabel = [[UILabel alloc] init]; 17 | [self addSubview:_titleLabel]; 18 | } 19 | return self; 20 | } 21 | 22 | - (void)layoutSubviews 23 | { 24 | [super layoutSubviews]; 25 | 26 | self.titleLabel.backgroundColor = [UIColor clearColor]; 27 | self.titleLabel.font = self.options[AMOptionsHeaderFont]; 28 | self.titleLabel.textColor = self.options[AMOptionsHeaderFontColor]; 29 | self.titleLabel.shadowColor = self.options[AMOptionsHeaderShadowColor]; 30 | self.titleLabel.shadowOffset = CGSizeMake(0, 1); 31 | self.titleLabel.frame = CGRectMake([self.options[AMOptionsHeaderPadding] floatValue], 0, [self.options[AMOptionsSlideValue] floatValue] - [self.options[AMOptionsHeaderPadding] floatValue], self.bounds.size.height); 32 | } 33 | 34 | - (void)drawRect:(CGRect)rect 35 | { 36 | CGContextRef context = UIGraphicsGetCurrentContext(); 37 | 38 | UIColor* startColor = self.options[AMOptionsHeaderGradientUp]; 39 | UIColor* endColor = self.options[AMOptionsHeaderGradientDown]; 40 | 41 | CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); 42 | CGFloat locations[] = { 0.0, 1.0 }; 43 | 44 | NSArray *colors = @[(__bridge id)startColor.CGColor, (__bridge id)endColor.CGColor]; 45 | 46 | CGGradientRef gradient = CGGradientCreateWithColors(colorSpace, (__bridge CFArrayRef)colors, locations); 47 | 48 | CGPoint startPoint = CGPointMake(CGRectGetMidX(rect), CGRectGetMinY(rect)); 49 | CGPoint endPoint = CGPointMake(CGRectGetMidX(rect), CGRectGetMaxY(rect)); 50 | 51 | CGContextSaveGState(context); 52 | CGContextAddRect(context, rect); 53 | CGContextClip(context); 54 | CGContextDrawLinearGradient(context, gradient, startPoint, endPoint, 0); 55 | CGContextRestoreGState(context); 56 | 57 | CGGradientRelease(gradient); 58 | CGColorSpaceRelease(colorSpace); 59 | 60 | CGContextSetStrokeColorWithColor(context, ((UIColor*)self.options[AMOptionsHeaderSeparatorUpper]).CGColor); 61 | CGContextBeginPath(context); 62 | CGContextSetLineWidth(context, 2.0); 63 | CGContextMoveToPoint(context, 0, 0); 64 | CGContextAddLineToPoint(context, self.bounds.size.width, 0); 65 | CGContextStrokePath(context); 66 | 67 | CGContextSetStrokeColorWithColor(context, ((UIColor*)self.options[AMOptionsHeaderSeparatorLower]).CGColor); 68 | CGContextBeginPath(context); 69 | CGContextSetLineWidth(context, 2.0); 70 | CGContextMoveToPoint(context, 0, self.bounds.size.height); 71 | CGContextAddLineToPoint(context, self.bounds.size.width, self.bounds.size.height); 72 | CGContextStrokePath(context); 73 | } 74 | 75 | @end 76 | -------------------------------------------------------------------------------- /HackerBoard/AMSlideOut/AMTableView.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMTableView.h 3 | // SlideOutSample 4 | // 5 | // Created by Andrea on 13/04/13. 6 | // Copyright (c) 2013 Andrea Mazzini. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AMTableView : UITableView 12 | 13 | @property (nonatomic, weak) NSDictionary* options; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /HackerBoard/AMSlideOut/AMTableView.m: -------------------------------------------------------------------------------- 1 | // 2 | // AMTableView.m 3 | // SlideOutSample 4 | // 5 | // Created by Andrea on 13/04/13. 6 | // Copyright (c) 2013 Andrea Mazzini. All rights reserved. 7 | // 8 | 9 | #import "AMTableView.h" 10 | #import "AMSlideOutGlobals.h" 11 | 12 | @implementation AMTableView 13 | 14 | - (void)drawRect:(CGRect)rect 15 | { 16 | if (self.options[AMOptionsTableBackground]) { 17 | CGContextRef context = UIGraphicsGetCurrentContext(); 18 | CGImageRef texture; 19 | UIImage* image = self.options[AMOptionsTableBackground]; 20 | texture = (image.CGImage); 21 | CGContextSetBlendMode (context, 0); 22 | CGContextClipToRect(context, rect); 23 | CGContextDrawTiledImage(context, CGRectMake(0,0, image.size.width, image.size.height), texture); 24 | } 25 | } 26 | 27 | - (void)layoutSubviews 28 | { 29 | [super layoutSubviews]; 30 | [self setBackgroundColor:[UIColor clearColor]]; 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /HackerBoard/AMSlideOut/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HackingEDU/hackingedu-ios/6cde43b08ca8135defc3fe2029d8290c7a2ed6e0/HackerBoard/AMSlideOut/close.png -------------------------------------------------------------------------------- /HackerBoard/AMSlideOut/iconSlide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HackingEDU/hackingedu-ios/6cde43b08ca8135defc3fe2029d8290c7a2ed6e0/HackerBoard/AMSlideOut/iconSlide.png -------------------------------------------------------------------------------- /HackerBoard/AMSlideOut/iconSlide@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HackingEDU/hackingedu-ios/6cde43b08ca8135defc3fe2029d8290c7a2ed6e0/HackerBoard/AMSlideOut/iconSlide@2x.png -------------------------------------------------------------------------------- /HackerBoard/AMSlideOut/iconSlideBlack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HackingEDU/hackingedu-ios/6cde43b08ca8135defc3fe2029d8290c7a2ed6e0/HackerBoard/AMSlideOut/iconSlideBlack.png -------------------------------------------------------------------------------- /HackerBoard/AMSlideOut/iconSlideBlack@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HackingEDU/hackingedu-ios/6cde43b08ca8135defc3fe2029d8290c7a2ed6e0/HackerBoard/AMSlideOut/iconSlideBlack@2x.png -------------------------------------------------------------------------------- /HackerBoard/Base.lproj/Main_iPad.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /HackerBoard/BaseViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // BaseViewController.h 3 | // HackerBoard 4 | // 5 | // Created by Blake Tsuzaki on 4/12/14. 6 | // Copyright (c) 2014 Swag. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AFViewController.h" 11 | @interface BaseViewController : UIViewController 12 | @property (retain, nonatomic) IBOutlet AFViewController *tableView; 13 | @property (strong, nonatomic) IBOutlet UIImageView *logoImage; 14 | @property (strong, nonatomic) IBOutlet UIScrollView *bannerView; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /HackerBoard/BaseViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // BaseViewController.m 3 | // HackerBoard 4 | // 5 | // Created by Blake Tsuzaki on 4/12/14. 6 | // Copyright (c) 2014 Swag. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | #import "BoardDetailViewController.h" 11 | #import "LoginViewController.h" 12 | @interface BaseViewController (){ 13 | BOOL moveRight; 14 | } 15 | @property (strong, nonatomic) UILabel *nameLabel; 16 | @property (strong, nonatomic) UILabel *locationLabel; 17 | @property (strong, nonatomic) UILabel *durationLabel; 18 | @property (strong, nonatomic) UITextView *descriptionLabel; 19 | 20 | 21 | @end 22 | 23 | @implementation BaseViewController 24 | 25 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 26 | { 27 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 28 | if (self) { 29 | // Custom initialization 30 | } 31 | return self; 32 | } 33 | 34 | - (void)viewDidLoad 35 | { 36 | 37 | [self performSegueWithIdentifier:@"Show Login" sender:self]; 38 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(startSlideshow) name:@"StartSlide" object:nil]; 39 | [super viewDidLoad]; 40 | moveRight = YES; 41 | [[NSNotificationCenter defaultCenter] addObserver:self 42 | selector:@selector(pushToDetail) 43 | name:@"BaseDetail" 44 | object:nil]; 45 | // Do any additional setup after loading the view. 46 | 47 | self.bannerView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 320, 440 )]; 48 | [self.bannerView setPagingEnabled:YES]; 49 | [self.bannerView setBackgroundColor:[UIColor blackColor]]; 50 | [self.bannerView setContentSize:CGSizeMake(320*3, 440)]; 51 | [self.view addSubview:self.bannerView]; 52 | [self.view sendSubviewToBack:self.bannerView]; 53 | for (int i = 0; i<3; i++){ 54 | UIImageView *image = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"pauley.jpg"]]; 55 | [image setContentMode:UIViewContentModeScaleAspectFill]; 56 | [image setClipsToBounds:YES]; 57 | [image setFrame:CGRectMake(320*i, 0, 320, 440)]; 58 | [self.bannerView addSubview:image]; 59 | } 60 | dispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ 61 | //[self startSlideshow]; 62 | }); 63 | self.nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 200, 300, 30)]; 64 | [self.nameLabel setTextColor:[UIColor whiteColor]]; 65 | [self.nameLabel setBackgroundColor:[UIColor colorWithWhite:0.2 alpha:0.8]]; 66 | [self.nameLabel setText:@" LA Hacks"]; 67 | [self.view addSubview:self.nameLabel]; 68 | 69 | self.locationLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 240, 300, 30)]; 70 | [self.locationLabel setTextColor:[UIColor whiteColor]]; 71 | [self.locationLabel setBackgroundColor:[UIColor colorWithWhite:0.2 alpha:0.8]]; 72 | [self.locationLabel setText:@" Location: Pauley Pavilion, UCLA"]; 73 | [self.view addSubview:self.locationLabel]; 74 | 75 | self.durationLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 280, 300, 30)]; 76 | [self.durationLabel setTextColor:[UIColor whiteColor]]; 77 | [self.durationLabel setBackgroundColor:[UIColor colorWithWhite:0.2 alpha:0.8]]; 78 | [self.durationLabel setFont:[UIFont systemFontOfSize:14]]; 79 | [self.durationLabel setText:@" Fri Apr 11 6:00PM - Sun Apr 13 5:00PM"]; 80 | [self.view addSubview:self.durationLabel]; 81 | 82 | self.descriptionLabel = [[UITextView alloc] initWithFrame:CGRectMake(10, 320, 300, 70)]; 83 | [self.descriptionLabel setTextColor:[UIColor whiteColor]]; 84 | [self.descriptionLabel setBackgroundColor:[UIColor colorWithWhite:0.2 alpha:0.8]]; 85 | [self.descriptionLabel setEditable:NO]; 86 | [self.descriptionLabel setUserInteractionEnabled:YES]; 87 | [self.descriptionLabel setFont:[UIFont systemFontOfSize:12]]; 88 | [self.descriptionLabel setText:@"Description:"]; 89 | [self.view addSubview:self.descriptionLabel]; 90 | 91 | self.tableView = [[AFViewController alloc] initWithFrame:CGRectMake(0, 0, 320, 504)]; 92 | [self.view addSubview:self.tableView]; 93 | [self.tableView setDelegate:self.tableView]; 94 | [self.tableView setDataSource:self.tableView]; 95 | [self.tableView loadView]; 96 | } 97 | 98 | - (void)startSlideshow{ 99 | dispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ 100 | //[self startSlideshow]; 101 | 102 | while(0){ 103 | sleep(2); 104 | if(moveRight){ 105 | [self.bannerView setContentOffset:CGPointMake(self.bannerView.contentOffset.x+320, 0) animated:YES]; 106 | moveRight = NO; 107 | } 108 | else{ 109 | [self.bannerView setContentOffset:CGPointMake(0, 0) animated:YES]; 110 | moveRight = YES; 111 | } 112 | } 113 | }); 114 | } 115 | - (void)pushToDetail{ 116 | [self performSegueWithIdentifier:@"DetailViewSegue" sender:self]; 117 | } 118 | 119 | - (void)didReceiveMemoryWarning 120 | { 121 | [super didReceiveMemoryWarning]; 122 | // Dispose of any resources that can be recreated. 123 | } 124 | 125 | /* 126 | #pragma mark - Navigation 127 | 128 | // In a storyboard-based application, you will often want to do a little preparation before navigation 129 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender 130 | { 131 | // Get the new view controller using [segue destinationViewController]. 132 | // Pass the selected object to the new view controller. 133 | } 134 | */ 135 | 136 | @end 137 | -------------------------------------------------------------------------------- /HackerBoard/BoardDetailViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // BoardDetailViewController.h 3 | // HackerBoard 4 | // 5 | // Created by Blake Tsuzaki on 4/12/14. 6 | // Copyright (c) 2014 Swag. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface BoardDetailViewController : UIViewController 12 | - (IBAction)doneButtonPressed:(id)sender; 13 | @property (strong, nonatomic) IBOutlet UIButton *doneButton; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /HackerBoard/BoardDetailViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // BoardDetailViewController.m 3 | // HackerBoard 4 | // 5 | // Created by Blake Tsuzaki on 4/12/14. 6 | // Copyright (c) 2014 Swag. All rights reserved. 7 | // 8 | 9 | #import "BoardDetailViewController.h" 10 | #import 11 | @interface BoardDetailViewController () 12 | 13 | @end 14 | 15 | @implementation BoardDetailViewController 16 | 17 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 18 | { 19 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 20 | if (self) { 21 | // Custom initialization 22 | } 23 | return self; 24 | } 25 | 26 | - (void)viewDidLoad 27 | { 28 | [super viewDidLoad]; 29 | // Do any additional setup after loading the view. 30 | [self flashOn:self.doneButton]; 31 | 32 | } 33 | 34 | - (void)flashOff:(UIView *)v 35 | { 36 | [UIView animateWithDuration:1.5 delay:0 options:UIViewAnimationOptionAllowUserInteraction animations:^ { 37 | v.alpha = .1; //don't animate alpha to 0, otherwise you won't be able to interact with it 38 | } completion:^(BOOL finished) { 39 | [self flashOn:v]; 40 | }]; 41 | } 42 | 43 | - (void)flashOn:(UIView *)v 44 | { 45 | [UIView animateWithDuration:1.5 delay:0 options:UIViewAnimationOptionAllowUserInteraction animations:^ { 46 | v.alpha = 0.8; 47 | } completion:^(BOOL finished) { 48 | [self flashOff:v]; 49 | }]; 50 | } 51 | 52 | 53 | - (void)didReceiveMemoryWarning 54 | { 55 | [super didReceiveMemoryWarning]; 56 | // Dispose of any resources that can be recreated. 57 | } 58 | 59 | /* 60 | #pragma mark - Navigation 61 | 62 | // In a storyboard-based application, you will often want to do a little preparation before navigation 63 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender 64 | { 65 | // Get the new view controller using [segue destinationViewController]. 66 | // Pass the selected object to the new view controller. 67 | } 68 | */ 69 | 70 | - (IBAction)doneButtonPressed:(id)sender { 71 | [self dismissViewControllerAnimated:YES completion:nil]; 72 | } 73 | @end 74 | -------------------------------------------------------------------------------- /HackerBoard/Defines.h: -------------------------------------------------------------------------------- 1 | // 2 | // Defines.h 3 | // Github-Auth-iOS 4 | // 5 | // Created by buza on 9/27/12. 6 | // Copyright (c) 2012 BuzaMoto. All rights reserved. 7 | // 8 | // Redistribution and use in source and binary forms, with or without 9 | // modification, are permitted provided that the following conditions are met: 10 | // 11 | // 1. Redistributions of source code must retain the above copyright notice, 12 | // this list of conditions and the following disclaimer. 13 | // 2. Redistributions in binary form must reproduce the above copyright notice, 14 | // this list of conditions and the following disclaimer in the documentation 15 | // and/or other materials provided with the distribution. 16 | // 17 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 21 | // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | // POSSIBILITY OF SUCH DAMAGE. 28 | 29 | #ifndef Github_Auth_iOS_Defines_h 30 | #define Github_Auth_iOS_Defines_h 31 | 32 | typedef void (^BMBlockVoid)(void); 33 | 34 | static NSString *const GITHUB_CALLBACK_URL = @"hackrhub://callback"; 35 | static NSString *const GITHUB_CLIENT_ID = @"0a4cefa9d3a80b8b5252"; 36 | static NSString *const GITHUB_CLIENT_SECRET = @"1eb56634d308a9b187f60960b9f891d5b76947ec"; 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /HackerBoard/Github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HackingEDU/hackingedu-ios/6cde43b08ca8135defc3fe2029d8290c7a2ed6e0/HackerBoard/Github.png -------------------------------------------------------------------------------- /HackerBoard/GithubAuthController.h: -------------------------------------------------------------------------------- 1 | // 2 | // GithubAuthController.h 3 | // Github-Auth-iOS 4 | // 5 | // Created by buza on 9/27/12. 6 | // Copyright (c) 2012 BuzaMoto. All rights reserved. 7 | // 8 | // Redistribution and use in source and binary forms, with or without 9 | // modification, are permitted provided that the following conditions are met: 10 | // 11 | // 1. Redistributions of source code must retain the above copyright notice, 12 | // this list of conditions and the following disclaimer. 13 | // 2. Redistributions in binary form must reproduce the above copyright notice, 14 | // this list of conditions and the following disclaimer in the documentation 15 | // and/or other materials provided with the distribution. 16 | // 17 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 21 | // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | // POSSIBILITY OF SUCH DAMAGE. 28 | #import 29 | #import "Defines.h" 30 | 31 | @protocol GitAuthDelegate 32 | -(void) didAuth:(NSString*)token; 33 | @end 34 | 35 | @protocol FrameChangeDelegate 36 | -(void) frameChanged:(CGRect)frame; 37 | @end 38 | 39 | @interface GithubAuthController : UIViewController 40 | 41 | @property(nonatomic, copy) BMBlockVoid completionBlock; 42 | @property(nonatomic, weak) id authDelegate; 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /HackerBoard/GithubAuthController.m: -------------------------------------------------------------------------------- 1 | // 2 | // GithubAuthController.m 3 | // Github-Auth-iOS 4 | // 5 | // Created by buza on 9/27/12. 6 | // Copyright (c) 2012 BuzaMoto. All rights reserved. 7 | // 8 | // Redistribution and use in source and binary forms, with or without 9 | // modification, are permitted provided that the following conditions are met: 10 | // 11 | // 1. Redistributions of source code must retain the above copyright notice, 12 | // this list of conditions and the following disclaimer. 13 | // 2. Redistributions in binary form must reproduce the above copyright notice, 14 | // this list of conditions and the following disclaimer in the documentation 15 | // and/or other materials provided with the distribution. 16 | // 17 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 21 | // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | // POSSIBILITY OF SUCH DAMAGE. 28 | 29 | #import "GithubAuthController.h" 30 | 31 | #import "GithubAuthenticatorView.h" 32 | 33 | #import "SizerView.h" 34 | 35 | @interface GithubAuthController () 36 | 37 | @end 38 | 39 | @implementation GithubAuthController 40 | 41 | @synthesize completionBlock; 42 | @synthesize authDelegate; 43 | 44 | - (id)init 45 | { 46 | self = [super init]; 47 | if (self) 48 | { 49 | //We use a special view that will tell us what the proper frame size is so we can 50 | //make sure the login view is centered in the modal view controller. 51 | self.view = [[SizerView alloc] initWithFrame:CGRectZero frameChangeDelegate:self]; 52 | self.authDelegate = nil; 53 | } 54 | return self; 55 | } 56 | 57 | -(void) dealloc 58 | { 59 | } 60 | 61 | -(void) didAuth:(NSString*)token 62 | { 63 | [self.authDelegate didAuth:token]; 64 | self.completionBlock(); 65 | } 66 | 67 | -(void) frameChanged:(CGRect)frame 68 | { 69 | GithubAuthenticatorView *gha = [[GithubAuthenticatorView alloc] initWithFrame:CGRectMake(0, 20, frame.size.width, frame.size.height)]; 70 | gha.authDelegate = self; 71 | [self.view addSubview:gha]; 72 | } 73 | 74 | - (void)viewDidLoad 75 | { 76 | [super viewDidLoad]; 77 | } 78 | 79 | - (void)viewDidUnload 80 | { 81 | [super viewDidUnload]; 82 | } 83 | 84 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 85 | { 86 | return YES; 87 | } 88 | 89 | 90 | @end 91 | -------------------------------------------------------------------------------- /HackerBoard/GithubAuthenticatorView.h: -------------------------------------------------------------------------------- 1 | // 2 | // GithubAuthenticator.h 3 | // Github-Auth-iOS 4 | // 5 | // Created by buza on 9/27/12. 6 | // Copyright (c) 2012 BuzaMoto. All rights reserved. 7 | // 8 | // Redistribution and use in source and binary forms, with or without 9 | // modification, are permitted provided that the following conditions are met: 10 | // 11 | // 1. Redistributions of source code must retain the above copyright notice, 12 | // this list of conditions and the following disclaimer. 13 | // 2. Redistributions in binary form must reproduce the above copyright notice, 14 | // this list of conditions and the following disclaimer in the documentation 15 | // and/or other materials provided with the distribution. 16 | // 17 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 21 | // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | // POSSIBILITY OF SUCH DAMAGE. 28 | 29 | #import 30 | 31 | #import "GithubAuthController.h" 32 | 33 | @interface GithubAuthenticatorView : UIWebView 34 | 35 | @property(nonatomic, weak) id authDelegate; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /HackerBoard/GithubAuthenticatorView.m: -------------------------------------------------------------------------------- 1 | // 2 | // GithubAuthenticatorView.m 3 | // Github-Auth-iOS 4 | // 5 | // Created by buza on 9/27/12. 6 | // Copyright (c) 2012 BuzaMoto. All rights reserved. 7 | // 8 | // Redistribution and use in source and binary forms, with or without 9 | // modification, are permitted provided that the following conditions are met: 10 | // 11 | // 1. Redistributions of source code must retain the above copyright notice, 12 | // this list of conditions and the following disclaimer. 13 | // 2. Redistributions in binary form must reproduce the above copyright notice, 14 | // this list of conditions and the following disclaimer in the documentation 15 | // and/or other materials provided with the distribution. 16 | // 17 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 21 | // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | // POSSIBILITY OF SUCH DAMAGE. 28 | 29 | #import "GithubAuthenticatorView.h" 30 | 31 | #import "NSDictionary+UrlEncoding.h" 32 | 33 | @interface GithubAuthenticatorView() 34 | @property(nonatomic, strong) NSMutableData *data; 35 | @property(nonatomic, strong) NSURLConnection *tokenRequestConnection; 36 | @end 37 | 38 | @implementation GithubAuthenticatorView 39 | 40 | @synthesize data; 41 | @synthesize authDelegate; 42 | @synthesize tokenRequestConnection; 43 | 44 | -(id) initWithFrame:(CGRect)frame 45 | { 46 | self = [super initWithFrame:frame]; 47 | 48 | if(self) 49 | { 50 | self.authDelegate = nil; 51 | self.tokenRequestConnection = nil; 52 | self.data = [NSMutableData data]; 53 | self.scalesPageToFit = YES; 54 | [self authorize]; 55 | } 56 | 57 | return self; 58 | } 59 | 60 | -(void) dealloc 61 | { 62 | [tokenRequestConnection cancel]; 63 | self.delegate = nil; 64 | } 65 | 66 | -(void) authorize 67 | { 68 | //Scopes: http://developer.github.com/v3/oauth/#scopes 69 | //user 70 | //public_repo 71 | //repo 72 | //repo:status 73 | //delete_repo 74 | //gist 75 | 76 | NSString *scope = @"user"; 77 | 78 | NSString *requestURL = [NSString stringWithFormat:@"https://github.com/login/oauth/authorize?client_id=%@&redirect_uri=%@&scope=%@", GITHUB_CLIENT_ID, GITHUB_CALLBACK_URL, scope]; 79 | 80 | NSURLRequest *urlReq = [NSURLRequest requestWithURL:[NSURL URLWithString:requestURL]]; 81 | self.delegate = self; 82 | [self loadRequest:urlReq]; 83 | } 84 | 85 | - (void)webViewDidStartLoad:(UIWebView *)webView 86 | { 87 | } 88 | 89 | - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType 90 | { 91 | NSString *responseURL = [request.URL absoluteString]; 92 | 93 | NSString *codeString = [NSString stringWithFormat:@"%@/?code=", GITHUB_CALLBACK_URL]; 94 | if([responseURL hasPrefix:codeString]) 95 | { 96 | NSInteger strLen = [codeString length]; 97 | NSString *code = [responseURL substringFromIndex:strLen]; 98 | 99 | //Request the token. 100 | NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@"https://github.com/login/oauth/access_token"]]; 101 | 102 | NSDictionary *paramDict = [NSDictionary dictionaryWithObjectsAndKeys:code, @"code", 103 | GITHUB_CLIENT_ID, @"client_id", 104 | GITHUB_CALLBACK_URL, @"redirect_uri", 105 | GITHUB_CLIENT_SECRET, @"client_secret", nil]; 106 | 107 | NSString *paramString = [paramDict urlEncodedString]; 108 | 109 | NSString *charset = (NSString *)CFStringConvertEncodingToIANACharSetName(CFStringConvertNSStringEncodingToEncoding(NSUTF8StringEncoding)); 110 | 111 | [request setHTTPMethod:@"POST"]; 112 | [request addValue:[NSString stringWithFormat:@"application/x-www-form-urlencoded; charset=%@",charset] forHTTPHeaderField:@"Content-Type"]; 113 | [request addValue:@"application/json" forHTTPHeaderField:@"Accept"]; 114 | [request setHTTPBody:[paramString dataUsingEncoding:NSUTF8StringEncoding]]; 115 | 116 | self.tokenRequestConnection = [[NSURLConnection alloc] initWithRequest:request delegate:self]; 117 | 118 | [tokenRequestConnection start]; 119 | 120 | return NO; 121 | } 122 | 123 | return YES; 124 | } 125 | 126 | - (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error 127 | { 128 | 129 | } 130 | 131 | - (void)webViewDidFinishLoad:(UIWebView *)webView 132 | { 133 | 134 | } 135 | 136 | 137 | #pragma Mark NSURLConnection delegates 138 | 139 | - (NSCachedURLResponse *)connection:(NSURLConnection *)connection willCacheResponse:(NSCachedURLResponse *)cachedResponse 140 | { 141 | return cachedResponse; 142 | } 143 | 144 | - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)_data 145 | { 146 | [self.data appendData:_data]; 147 | } 148 | 149 | - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response 150 | { 151 | 152 | } 153 | 154 | - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error 155 | { 156 | [self.data setLength:0]; 157 | } 158 | 159 | - (void)connectionDidFinishLoading:(NSURLConnection *)connection 160 | { 161 | NSError *jsonError = nil; 162 | id jsonData = [NSJSONSerialization JSONObjectWithData:self.data options:0 error:&jsonError]; 163 | if(jsonData && [NSJSONSerialization isValidJSONObject:jsonData]) 164 | { 165 | NSString *accesstoken = [jsonData objectForKey:@"access_token"]; 166 | if(accesstoken) 167 | { 168 | [self.authDelegate didAuth:accesstoken]; 169 | return; 170 | } 171 | } 172 | 173 | [self.authDelegate didAuth:nil]; 174 | } 175 | 176 | - (NSURLRequest *)connection:(NSURLConnection *)connection willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse 177 | { 178 | return request; 179 | } 180 | 181 | 182 | 183 | @end 184 | -------------------------------------------------------------------------------- /HackerBoard/HackerBoard-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | org.Swag.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleURLTypes 24 | 25 | 26 | CFBundleTypeRole 27 | Editor 28 | CFBundleURLName 29 | com.HackrHub 30 | CFBundleURLSchemes 31 | 32 | HackrHub 33 | 34 | 35 | 36 | CFBundleVersion 37 | 1.0 38 | LSRequiresIPhoneOS 39 | 40 | UIMainStoryboardFile 41 | Main_iPhone 42 | UIMainStoryboardFile~ipad 43 | Main_iPad 44 | UIRequiredDeviceCapabilities 45 | 46 | armv7 47 | 48 | UISupportedInterfaceOrientations 49 | 50 | UIInterfaceOrientationPortrait 51 | UIInterfaceOrientationPortraitUpsideDown 52 | 53 | UISupportedInterfaceOrientations~ipad 54 | 55 | UIInterfaceOrientationPortrait 56 | UIInterfaceOrientationPortraitUpsideDown 57 | UIInterfaceOrientationLandscapeLeft 58 | UIInterfaceOrientationLandscapeRight 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /HackerBoard/HackerBoard-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /HackerBoard/HackrBoardv1_1AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // HackrBoardv1_1AppDelegate.h 3 | // HackerBoard 4 | // 5 | // Created by Blake Tsuzaki on 4/12/14. 6 | // Copyright (c) 2014 Swag. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class AMSlideOutNavigationController; 12 | 13 | @interface HackrBoardv1_1AppDelegate : UIResponder 14 | 15 | @property (strong, nonatomic) UIWindow *window; 16 | @property (strong, nonatomic) AMSlideOutNavigationController* slideoutController; 17 | 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /HackerBoard/HackrBoardv1_1AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // HackrBoardv1_1AppDelegate.m 3 | // HackerBoard 4 | // 5 | // Created by Blake Tsuzaki on 4/12/14. 6 | // Copyright (c) 2014 Swag. All rights reserved. 7 | // 8 | 9 | #import "HackrBoardv1_1AppDelegate.h" 10 | #import "AMSlideOutNavigationController.h" 11 | #import "BaseViewController.h" 12 | #import "ProfileViewController.h" 13 | #import 14 | 15 | @implementation HackrBoardv1_1AppDelegate 16 | 17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 18 | { 19 | // Override point for customization after application launch. 20 | 21 | [Parse setApplicationId:@"1ODY0KDOt0JC4nDTb7Ze1eGy1O5W9d5gWAuLDHtg" 22 | clientKey:@"bPvFMkzYP60QpTClNsaKSFn8G9eb30Ic56J0yC2a"]; 23 | 24 | [application registerForRemoteNotificationTypes:UIRemoteNotificationTypeBadge| 25 | UIRemoteNotificationTypeAlert| 26 | UIRemoteNotificationTypeSound]; 27 | 28 | 29 | UIStoryboard *storybaord = [UIStoryboard storyboardWithName:@"Main_iPhone" bundle:nil]; 30 | 31 | self.slideoutController = [AMSlideOutNavigationController slideOutNavigation]; 32 | if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0")) { 33 | [self.slideoutController setSlideoutOptions:[AMSlideOutGlobals defaultFlatOptions]]; 34 | } 35 | [self.slideoutController addSectionWithTitle:nil]; 36 | 37 | UIViewController *controller; 38 | controller = [storybaord instantiateViewControllerWithIdentifier:@"Feed"]; 39 | [self.slideoutController addViewControllerToLastSection:controller tagged:1 withTitle:@"Event Feed" andIcon:@""]; 40 | 41 | UIViewController *controller2; 42 | controller2 = [storybaord instantiateViewControllerWithIdentifier:@"Profile"]; 43 | [self.slideoutController addViewControllerToLastSection:controller2 tagged:2 withTitle:@"Profile" andIcon:@""]; 44 | 45 | UIViewController *controller3; 46 | controller3 = [storybaord instantiateViewControllerWithIdentifier:@"Team"]; 47 | [self.slideoutController addViewControllerToLastSection:controller3 tagged:3 withTitle:@"Team" andIcon:@""]; 48 | 49 | [self.window setRootViewController:self.slideoutController]; 50 | 51 | return YES; 52 | } 53 | 54 | - (void)applicationWillResignActive:(UIApplication *)application 55 | { 56 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 57 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 58 | } 59 | 60 | - (void)applicationDidEnterBackground:(UIApplication *)application 61 | { 62 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 63 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 64 | } 65 | 66 | - (void)applicationWillEnterForeground:(UIApplication *)application 67 | { 68 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 69 | } 70 | 71 | - (void)applicationDidBecomeActive:(UIApplication *)application 72 | { 73 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 74 | } 75 | 76 | - (void)applicationWillTerminate:(UIApplication *)application 77 | { 78 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 79 | } 80 | - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url{ 81 | NSLog(@"%@",url); 82 | NSString *code = [[[url absoluteString] componentsSeparatedByString:@"="] lastObject]; 83 | NSLog(@"%@",code); 84 | [[NSNotificationCenter defaultCenter] postNotificationName:@"URLParsed" object:code]; 85 | return YES; 86 | } 87 | 88 | - (void)application:(UIApplication *)application 89 | didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken 90 | { 91 | // Store the deviceToken in the current installation and save it to Parse. 92 | PFInstallation *currentInstallation = [PFInstallation currentInstallation]; 93 | [currentInstallation setDeviceTokenFromData:deviceToken]; 94 | [currentInstallation saveInBackground]; 95 | } 96 | 97 | - (void)application:(UIApplication *)application 98 | didReceiveRemoteNotification:(NSDictionary *)userInfo { 99 | [PFPush handlePush:userInfo]; 100 | } 101 | @end 102 | -------------------------------------------------------------------------------- /HackerBoard/Images.xcassets/AppIcon.appiconset/5b1PC5s-120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HackingEDU/hackingedu-ios/6cde43b08ca8135defc3fe2029d8290c7a2ed6e0/HackerBoard/Images.xcassets/AppIcon.appiconset/5b1PC5s-120.png -------------------------------------------------------------------------------- /HackerBoard/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "size" : "60x60", 15 | "idiom" : "iphone", 16 | "filename" : "5b1PC5s-120.png", 17 | "scale" : "2x" 18 | }, 19 | { 20 | "idiom" : "ipad", 21 | "size" : "29x29", 22 | "scale" : "1x" 23 | }, 24 | { 25 | "idiom" : "ipad", 26 | "size" : "29x29", 27 | "scale" : "2x" 28 | }, 29 | { 30 | "idiom" : "ipad", 31 | "size" : "40x40", 32 | "scale" : "1x" 33 | }, 34 | { 35 | "idiom" : "ipad", 36 | "size" : "40x40", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "idiom" : "ipad", 41 | "size" : "76x76", 42 | "scale" : "1x" 43 | }, 44 | { 45 | "idiom" : "ipad", 46 | "size" : "76x76", 47 | "scale" : "2x" 48 | } 49 | ], 50 | "info" : { 51 | "version" : 1, 52 | "author" : "xcode" 53 | } 54 | } -------------------------------------------------------------------------------- /HackerBoard/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "orientation" : "portrait", 20 | "idiom" : "ipad", 21 | "extent" : "full-screen", 22 | "minimum-system-version" : "7.0", 23 | "scale" : "1x" 24 | }, 25 | { 26 | "orientation" : "landscape", 27 | "idiom" : "ipad", 28 | "extent" : "full-screen", 29 | "minimum-system-version" : "7.0", 30 | "scale" : "1x" 31 | }, 32 | { 33 | "orientation" : "portrait", 34 | "idiom" : "ipad", 35 | "extent" : "full-screen", 36 | "minimum-system-version" : "7.0", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "orientation" : "landscape", 41 | "idiom" : "ipad", 42 | "extent" : "full-screen", 43 | "minimum-system-version" : "7.0", 44 | "scale" : "2x" 45 | } 46 | ], 47 | "info" : { 48 | "version" : 1, 49 | "author" : "xcode" 50 | } 51 | } -------------------------------------------------------------------------------- /HackerBoard/InfoCard.h: -------------------------------------------------------------------------------- 1 | // 2 | // InfoCard.h 3 | // HackerBoard 4 | // 5 | // Created by Blake Tsuzaki on 4/13/14. 6 | // Copyright (c) 2014 Swag. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface InfoCard : UIView 12 | - (InfoCard *)initWithData:(NSString*)message :(UIImage*)image; 13 | - (InfoCard *)initWithMessage:(NSString*)message; 14 | - (InfoCard *)initWithImage:(UIImage*)image; 15 | @end -------------------------------------------------------------------------------- /HackerBoard/InfoCard.m: -------------------------------------------------------------------------------- 1 | // 2 | // InfoCard.m 3 | // HackerBoard 4 | // 5 | // Created by Blake Tsuzaki on 4/13/14. 6 | // Copyright (c) 2014 Swag. All rights reserved. 7 | // 8 | 9 | #import "InfoCard.h" 10 | 11 | @implementation InfoCard 12 | 13 | - (id)initWithFrame:(CGRect)frame 14 | { 15 | self = [super initWithFrame:frame]; 16 | if (self) { 17 | // Initialization code 18 | } 19 | return self; 20 | } 21 | 22 | - (InfoCard *)initWithData:(NSString*)message :(UIImage*)image{ 23 | UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 240, 120)]; 24 | [imageView setImage:image]; 25 | [self addSubview:imageView]; 26 | UITextView *label = [[UITextView alloc] initWithFrame:CGRectMake(0, 0, 240, 120)]; 27 | [label setText:message]; 28 | [label setTextAlignment:NSTextAlignmentCenter]; 29 | [self addSubview:label]; 30 | return self; 31 | } 32 | - (InfoCard *)initWithMessage:(NSString*)message{ 33 | UITextView *label = [[UITextView alloc] initWithFrame:CGRectMake(0, 0, 240, 120)]; 34 | [label setText:message]; 35 | [label setTextAlignment:NSTextAlignmentCenter]; 36 | [self addSubview:label]; 37 | return self; 38 | } 39 | - (InfoCard *)initWithImage:(UIImage *)image{ 40 | UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 240, 120)]; 41 | [imageView setImage:image]; 42 | [self addSubview:imageView]; 43 | return self; 44 | } 45 | 46 | /* 47 | // Only override drawRect: if you perform custom drawing. 48 | // An empty implementation adversely affects performance during animation. 49 | - (void)drawRect:(CGRect)rect 50 | { 51 | // Drawing code 52 | } 53 | */ 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /HackerBoard/LoginViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // LoginViewController.h 3 | // HackerBoardv1 4 | // 5 | // Created by Blake Tsuzaki on 4/12/14. 6 | // Copyright (c) 2014 Swag. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "GithubAuthController.h" 11 | #import 12 | 13 | @interface LoginViewController : UIViewController 14 | - (IBAction)skipLogin:(id)sender; 15 | - (IBAction)signIn:(id)sender; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /HackerBoard/NSDictionary+UrlEncoding.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+UrlEncoding.h 3 | // 4 | // Created by buza on 2/8/09. 5 | // Copyright (c) 2009 BuzaMoto. All rights reserved. 6 | // 7 | // Redistribution and use in source and binary forms, with or without 8 | // modification, are permitted provided that the following conditions are met: 9 | // 10 | // 1. Redistributions of source code must retain the above copyright notice, 11 | // this list of conditions and the following disclaimer. 12 | // 2. Redistributions in binary form must reproduce the above copyright notice, 13 | // this list of conditions and the following disclaimer in the documentation 14 | // and/or other materials provided with the distribution. 15 | // 16 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 20 | // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | // POSSIBILITY OF SUCH DAMAGE. 27 | 28 | #import 29 | 30 | @interface NSDictionary (UrlEncoding) 31 | 32 | -(NSString*) urlEncodedString; 33 | 34 | @end -------------------------------------------------------------------------------- /HackerBoard/NSDictionary+UrlEncoding.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+UrlEncoding.m 3 | // 4 | // Created by buza on 2/8/09. 5 | // Copyright (c) 2009 BuzaMoto. All rights reserved. 6 | // 7 | // Redistribution and use in source and binary forms, with or without 8 | // modification, are permitted provided that the following conditions are met: 9 | // 10 | // 1. Redistributions of source code must retain the above copyright notice, 11 | // this list of conditions and the following disclaimer. 12 | // 2. Redistributions in binary form must reproduce the above copyright notice, 13 | // this list of conditions and the following disclaimer in the documentation 14 | // and/or other materials provided with the distribution. 15 | // 16 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 20 | // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | // POSSIBILITY OF SUCH DAMAGE. 27 | 28 | #import "NSDictionary+UrlEncoding.h" 29 | 30 | static NSString *toString(id object) 31 | { 32 | return [NSString stringWithFormat:@"%@", object]; 33 | } 34 | 35 | static NSString *urlEncode(id object) 36 | { 37 | NSString *string = toString(object); 38 | return [string stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding]; 39 | } 40 | 41 | @implementation NSDictionary (UrlEncoding) 42 | 43 | -(NSString*) urlEncodedString 44 | { 45 | NSMutableArray *parts = [NSMutableArray array]; 46 | for (id key in self) 47 | { 48 | id value = [self objectForKey: key]; 49 | NSString *part = [NSString stringWithFormat: @"%@=%@", urlEncode(key), urlEncode(value)]; 50 | [parts addObject: part]; 51 | } 52 | return [parts componentsJoinedByString: @"&"]; 53 | } 54 | 55 | @end -------------------------------------------------------------------------------- /HackerBoard/Parse.framework/Headers: -------------------------------------------------------------------------------- 1 | Versions/Current/Headers -------------------------------------------------------------------------------- /HackerBoard/Parse.framework/Parse: -------------------------------------------------------------------------------- 1 | Versions/Current/Parse -------------------------------------------------------------------------------- /HackerBoard/Parse.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /HackerBoard/Parse.framework/Versions/1.2.19/Headers/PFACL.h: -------------------------------------------------------------------------------- 1 | // PFACL.h 2 | // Copyright 2011 Parse, Inc. All rights reserved. 3 | 4 | #import 5 | 6 | @class PFUser; 7 | @class PFRole; 8 | 9 | /*! 10 | A PFACL is used to control which users can access or modify a particular 11 | object. Each PFObject can have its own PFACL. You can grant 12 | read and write permissions separately to specific users, to groups of users 13 | that belong to roles, or you can grant permissions to "the public" so that, 14 | for example, any user could read a particular object but only a particular 15 | set of users could write to that object. 16 | */ 17 | @interface PFACL : NSObject 18 | 19 | /** @name Creating an ACL */ 20 | 21 | /*! 22 | Creates an ACL with no permissions granted. 23 | */ 24 | + (PFACL *)ACL; 25 | 26 | /*! 27 | Creates an ACL where only the provided user has access. 28 | */ 29 | + (PFACL *)ACLWithUser:(PFUser *)user; 30 | 31 | /** @name Controlling Public Access */ 32 | 33 | /*! 34 | Set whether the public is allowed to read this object. 35 | */ 36 | - (void)setPublicReadAccess:(BOOL)allowed; 37 | 38 | /*! 39 | Gets whether the public is allowed to read this object. 40 | */ 41 | - (BOOL)getPublicReadAccess; 42 | 43 | /*! 44 | Set whether the public is allowed to write this object. 45 | */ 46 | - (void)setPublicWriteAccess:(BOOL)allowed; 47 | 48 | /*! 49 | Gets whether the public is allowed to write this object. 50 | */ 51 | - (BOOL)getPublicWriteAccess; 52 | 53 | /** @name Controlling Access Per-User */ 54 | 55 | /*! 56 | Set whether the given user id is allowed to read this object. 57 | */ 58 | - (void)setReadAccess:(BOOL)allowed forUserId:(NSString *)userId; 59 | 60 | /*! 61 | Gets whether the given user id is *explicitly* allowed to read this object. 62 | Even if this returns NO, the user may still be able to access it if getPublicReadAccess returns YES 63 | or if the user belongs to a role that has access. 64 | */ 65 | - (BOOL)getReadAccessForUserId:(NSString *)userId; 66 | 67 | /*! 68 | Set whether the given user id is allowed to write this object. 69 | */ 70 | - (void)setWriteAccess:(BOOL)allowed forUserId:(NSString *)userId; 71 | 72 | /*! 73 | Gets whether the given user id is *explicitly* allowed to write this object. 74 | Even if this returns NO, the user may still be able to write it if getPublicWriteAccess returns YES 75 | or if the user belongs to a role that has access. 76 | */ 77 | - (BOOL)getWriteAccessForUserId:(NSString *)userId; 78 | 79 | /*! 80 | Set whether the given user is allowed to read this object. 81 | */ 82 | - (void)setReadAccess:(BOOL)allowed forUser:(PFUser *)user; 83 | 84 | /*! 85 | Gets whether the given user is *explicitly* allowed to read this object. 86 | Even if this returns NO, the user may still be able to access it if getPublicReadAccess returns YES 87 | or if the user belongs to a role that has access. 88 | */ 89 | - (BOOL)getReadAccessForUser:(PFUser *)user; 90 | 91 | /*! 92 | Set whether the given user is allowed to write this object. 93 | */ 94 | - (void)setWriteAccess:(BOOL)allowed forUser:(PFUser *)user; 95 | 96 | /*! 97 | Gets whether the given user is *explicitly* allowed to write this object. 98 | Even if this returns NO, the user may still be able to write it if getPublicWriteAccess returns YES 99 | or if the user belongs to a role that has access. 100 | */ 101 | - (BOOL)getWriteAccessForUser:(PFUser *)user; 102 | 103 | /** @name Controlling Access Per-Role */ 104 | 105 | /*! 106 | Get whether users belonging to the role with the given name are allowed 107 | to read this object. Even if this returns false, the role may still 108 | be able to read it if a parent role has read access. 109 | 110 | @param name The name of the role. 111 | @return YES if the role has read access. NO otherwise. 112 | */ 113 | - (BOOL)getReadAccessForRoleWithName:(NSString *)name; 114 | 115 | /*! 116 | Set whether users belonging to the role with the given name are allowed 117 | to read this object. 118 | 119 | @param name The name of the role. 120 | @param allowed Whether the given role can read this object. 121 | */ 122 | - (void)setReadAccess:(BOOL)allowed forRoleWithName:(NSString *)name; 123 | 124 | /*! 125 | Get whether users belonging to the role with the given name are allowed 126 | to write this object. Even if this returns false, the role may still 127 | be able to write it if a parent role has write access. 128 | 129 | @param name The name of the role. 130 | @return YES if the role has read access. NO otherwise. 131 | */ 132 | - (BOOL)getWriteAccessForRoleWithName:(NSString *)name; 133 | 134 | /*! 135 | Set whether users belonging to the role with the given name are allowed 136 | to write this object. 137 | 138 | @param name The name of the role. 139 | @param allowed Whether the given role can write this object. 140 | */ 141 | - (void)setWriteAccess:(BOOL)allowed forRoleWithName:(NSString *)name; 142 | 143 | /*! 144 | Get whether users belonging to the given role are allowed to read this 145 | object. Even if this returns NO, the role may still be able to 146 | read it if a parent role has read access. The role must already be saved on 147 | the server and its data must have been fetched in order to use this method. 148 | 149 | @param role The name of the role. 150 | @return YES if the role has read access. NO otherwise. 151 | */ 152 | - (BOOL)getReadAccessForRole:(PFRole *)role; 153 | 154 | /*! 155 | Set whether users belonging to the given role are allowed to read this 156 | object. The role must already be saved on the server and its data must have 157 | been fetched in order to use this method. 158 | 159 | @param role The role to assign access. 160 | @param allowed Whether the given role can read this object. 161 | */ 162 | - (void)setReadAccess:(BOOL)allowed forRole:(PFRole *)role; 163 | 164 | /*! 165 | Get whether users belonging to the given role are allowed to write this 166 | object. Even if this returns NO, the role may still be able to 167 | write it if a parent role has write access. The role must already be saved on 168 | the server and its data must have been fetched in order to use this method. 169 | 170 | @param role The name of the role. 171 | @return YES if the role has write access. NO otherwise. 172 | */ 173 | - (BOOL)getWriteAccessForRole:(PFRole *)role; 174 | 175 | /*! 176 | Set whether users belonging to the given role are allowed to write this 177 | object. The role must already be saved on the server and its data must have 178 | been fetched in order to use this method. 179 | 180 | @param role The role to assign access. 181 | @param allowed Whether the given role can write this object. 182 | */ 183 | - (void)setWriteAccess:(BOOL)allowed forRole:(PFRole *)role; 184 | 185 | /** @name Setting Access Defaults */ 186 | 187 | /*! 188 | Sets a default ACL that will be applied to all PFObjects when they are created. 189 | @param acl The ACL to use as a template for all PFObjects created after setDefaultACL has been called. 190 | This value will be copied and used as a template for the creation of new ACLs, so changes to the 191 | instance after setDefaultACL has been called will not be reflected in new PFObjects. 192 | @param currentUserAccess If true, the PFACL that is applied to newly-created PFObjects will 193 | provide read and write access to the currentUser at the time of creation. If false, 194 | the provided ACL will be used without modification. If acl is nil, this value is ignored. 195 | */ 196 | + (void)setDefaultACL:(PFACL *)acl withAccessForCurrentUser:(BOOL)currentUserAccess; 197 | 198 | @end 199 | -------------------------------------------------------------------------------- /HackerBoard/Parse.framework/Versions/1.2.19/Headers/PFAnalytics.h: -------------------------------------------------------------------------------- 1 | // 2 | // PFAnalytics.h 3 | // Parse 4 | // 5 | // Created by Christine Yen on 1/29/13. 6 | // Copyright (c) 2013 Parse Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /*! 12 | PFAnalytics provides an interface to Parse's logging and analytics backend. 13 | 14 | Methods will return immediately and cache the request (+ timestamp) to be 15 | handled "eventually." That is, the request will be sent immediately if possible 16 | or the next time a network connection is available otherwise. 17 | */ 18 | @interface PFAnalytics : NSObject 19 | 20 | /*! 21 | Tracks this application being launched. If this happened as the result of the 22 | user opening a push notification, this method sends along information to 23 | correlate this open with that push. 24 | 25 | Pass in nil to track a standard "application opened" event. 26 | 27 | @param launchOptions The dictionary indicating the reason the application was 28 | launched, if any. This value can be found as a parameter to various 29 | UIApplicationDelegate methods, and can be empty or nil. 30 | */ 31 | + (void)trackAppOpenedWithLaunchOptions:(NSDictionary *)launchOptions; 32 | 33 | /*! 34 | Tracks this application being launched. If this happened as the result of the 35 | user opening a push notification, this method sends along information to 36 | correlate this open with that push. 37 | 38 | @param userInfo The Remote Notification payload, if any. This value can be 39 | found either under UIApplicationLaunchOptionsRemoteNotificationKey on 40 | launchOptions, or as a parameter to application:didReceiveRemoteNotification:. 41 | This can be empty or nil. 42 | */ 43 | + (void)trackAppOpenedWithRemoteNotificationPayload:(NSDictionary *)userInfo; 44 | 45 | /*! 46 | Tracks the occurrence of a custom event. Parse will store a data point at the 47 | time of invocation with the given event name. 48 | 49 | @param name The name of the custom event to report to Parse as having happened. 50 | */ 51 | + (void)trackEvent:(NSString *)name; 52 | 53 | /*! 54 | Tracks the occurrence of a custom event with additional dimensions. Parse will 55 | store a data point at the time of invocation with the given event name. 56 | 57 | Dimensions will allow segmentation of the occurrences of this custom event. 58 | Keys and values should be NSStrings, and will throw otherwise. 59 | 60 | To track a user signup along with additional metadata, consider the following: 61 | NSDictionary *dimensions = @{ @"gender": @"m", 62 | @"source": @"web", 63 | @"dayType": @"weekend" }; 64 | [PFAnalytics trackEvent:@"signup" dimensions:dimensions]; 65 | 66 | There is a default limit of 4 dimensions per event tracked. 67 | 68 | @param name The name of the custom event to report to Parse as having happened. 69 | @param dimensions The dictionary of information by which to segment this event. 70 | */ 71 | + (void)trackEvent:(NSString *)name dimensions:(NSDictionary *)dimensions; 72 | 73 | @end 74 | -------------------------------------------------------------------------------- /HackerBoard/Parse.framework/Versions/1.2.19/Headers/PFAnonymousUtils.h: -------------------------------------------------------------------------------- 1 | // 2 | // PFAnonymousUtils.h 3 | // Parse 4 | // 5 | // Created by David Poll on 3/20/12. 6 | // Copyright (c) 2012 Parse, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "PFUser.h" 11 | #import "PFConstants.h" 12 | 13 | /*! 14 | Provides utility functions for working with Anonymously logged-in users. Anonymous users have some unique characteristics: 15 |
    16 |
  • Anonymous users don't need a user name or password.
  • 17 |
  • Once logged out, an anonymous user cannot be recovered.
  • 18 |
  • When the current user is anonymous, the following methods can be used to switch to a different user or convert the 19 | anonymous user into a regular one: 20 |
      21 |
    • signUp converts an anonymous user to a standard user with the given username and password. 22 | Data associated with the anonymous user is retained.
    • 23 |
    • logIn switches users without converting the anonymous user. Data associated with the anonymous user will be lost.
    • 24 |
    • Service logIn (e.g. Facebook, Twitter) will attempt to convert the anonymous user into a standard user by linking it to the service. 25 | If a user already exists that is linked to the service, it will instead switch to the existing user.
    • 26 |
    • Service linking (e.g. Facebook, Twitter) will convert the anonymous user into a standard user by linking it to the service.
    • 27 |
    28 |
29 | */ 30 | @interface PFAnonymousUtils : NSObject 31 | 32 | /*! @name Creating an Anonymous User */ 33 | 34 | /*! 35 | Creates an anonymous user. 36 | @param block The block to execute when anonymous user creation is complete. The block should have the following argument signature: 37 | (PFUser *user, NSError *error) 38 | */ 39 | + (void)logInWithBlock:(PFUserResultBlock)block; 40 | 41 | /*! 42 | Creates an anonymous user. The selector for the callback should look like: (PFUser *)user error:(NSError *)error 43 | @param target Target object for the selector. 44 | @param selector The selector that will be called when the asynchronous request is complete. 45 | */ 46 | + (void)logInWithTarget:(id)target selector:(SEL)selector; 47 | 48 | /*! @name Determining Whether a PFUser is Anonymous */ 49 | 50 | /*! 51 | Whether the user is logged in anonymously. 52 | @param user User to check for anonymity. The user must be logged in on this device. 53 | @result True if the user is anonymous. False if the user is not the current user or is not anonymous. 54 | */ 55 | + (BOOL)isLinkedWithUser:(PFUser *)user; 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /HackerBoard/Parse.framework/Versions/1.2.19/Headers/PFCloud.h: -------------------------------------------------------------------------------- 1 | // 2 | // PFCloud.h 3 | // Parse 4 | // 5 | // Created by Shyam Jayaraman on 8/20/12. 6 | // Copyright (c) 2012 Parse Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "PFConstants.h" 11 | 12 | @interface PFCloud : NSObject 13 | 14 | /*! 15 | Calls the given cloud function with the parameters passed in. 16 | @param function The function name to call. 17 | @param parameters The parameters to send to the function. 18 | @result The response from the cloud function. 19 | */ 20 | + (id)callFunction:(NSString *)function withParameters:(NSDictionary *)parameters; 21 | 22 | /*! 23 | Calls the given cloud function with the parameters passed in and sets the error if there is one. 24 | @param function The function name to call. 25 | @param parameters The parameters to send to the function. 26 | @param error Pointer to an NSError that will be set if necessary. 27 | @result The response from the cloud function. This result could be a NSDictionary, an NSArray, NSInteger or NSString. 28 | */ 29 | + (id)callFunction:(NSString *)function withParameters:(NSDictionary *)parameters error:(NSError **)error; 30 | 31 | /*! 32 | Calls the given cloud function with the parameters provided asynchronously and calls the given block when it is done. 33 | @param function The function name to call. 34 | @param parameters The parameters to send to the function. 35 | @param block The block to execute. The block should have the following argument signature:(id result, NSError *error). 36 | */ 37 | + (void)callFunctionInBackground:(NSString *)function withParameters:(NSDictionary *)parameters block:(PFIdResultBlock)block; 38 | 39 | /*! 40 | Calls the given cloud function with the parameters provided asynchronously and runs the callback when it is done. 41 | @param function The function name to call. 42 | @param parameters The parameters to send to the function. 43 | @param target The object to call the selector on. 44 | @param selector The selector to call. It should have the following signature: (void)callbackWithResult:(id) result error:(NSError *)error. result will be nil if error is set and vice versa. 45 | */ 46 | + (void)callFunctionInBackground:(NSString *)function withParameters:(NSDictionary *)parameters target:(id)target selector:(SEL)selector; 47 | @end 48 | -------------------------------------------------------------------------------- /HackerBoard/Parse.framework/Versions/1.2.19/Headers/PFConstants.h: -------------------------------------------------------------------------------- 1 | // PFConstants.h 2 | // Copyright 2011 Parse, Inc. All rights reserved. 3 | 4 | #import 5 | @class PFObject; 6 | @class PFUser; 7 | 8 | // Version 9 | #define PARSE_VERSION @"1.2.19" 10 | 11 | extern NSInteger const PARSE_API_VERSION; 12 | 13 | // Platform 14 | #define PARSE_IOS_ONLY (TARGET_OS_IPHONE) 15 | #define PARSE_OSX_ONLY (TARGET_OS_MAC && !(TARGET_OS_IPHONE)) 16 | 17 | extern NSString *const kPFDeviceType; 18 | 19 | #if PARSE_IOS_ONLY 20 | #import 21 | #else 22 | #import 23 | @compatibility_alias UIImage NSImage; 24 | @compatibility_alias UIColor NSColor; 25 | @compatibility_alias UIView NSView; 26 | #endif 27 | 28 | // Server 29 | extern NSString *const kPFParseServer; 30 | 31 | // Cache policies 32 | typedef enum { 33 | kPFCachePolicyIgnoreCache = 0, 34 | kPFCachePolicyCacheOnly, 35 | kPFCachePolicyNetworkOnly, 36 | kPFCachePolicyCacheElseNetwork, 37 | kPFCachePolicyNetworkElseCache, 38 | kPFCachePolicyCacheThenNetwork 39 | } PFCachePolicy; 40 | 41 | // Errors 42 | 43 | /*! @abstract 1: Internal server error. No information available. */ 44 | extern NSInteger const kPFErrorInternalServer; 45 | 46 | /*! @abstract 100: The connection to the Parse servers failed. */ 47 | extern NSInteger const kPFErrorConnectionFailed; 48 | /*! @abstract 101: Object doesn't exist, or has an incorrect password. */ 49 | extern NSInteger const kPFErrorObjectNotFound; 50 | /*! @abstract 102: You tried to find values matching a datatype that doesn't support exact database matching, like an array or a dictionary. */ 51 | extern NSInteger const kPFErrorInvalidQuery; 52 | /*! @abstract 103: Missing or invalid classname. Classnames are case-sensitive. They must start with a letter, and a-zA-Z0-9_ are the only valid characters. */ 53 | extern NSInteger const kPFErrorInvalidClassName; 54 | /*! @abstract 104: Missing object id. */ 55 | extern NSInteger const kPFErrorMissingObjectId; 56 | /*! @abstract 105: Invalid key name. Keys are case-sensitive. They must start with a letter, and a-zA-Z0-9_ are the only valid characters. */ 57 | extern NSInteger const kPFErrorInvalidKeyName; 58 | /*! @abstract 106: Malformed pointer. Pointers must be arrays of a classname and an object id. */ 59 | extern NSInteger const kPFErrorInvalidPointer; 60 | /*! @abstract 107: Malformed json object. A json dictionary is expected. */ 61 | extern NSInteger const kPFErrorInvalidJSON; 62 | /*! @abstract 108: Tried to access a feature only available internally. */ 63 | extern NSInteger const kPFErrorCommandUnavailable; 64 | /*! @abstract 111: Field set to incorrect type. */ 65 | extern NSInteger const kPFErrorIncorrectType; 66 | /*! @abstract 112: Invalid channel name. A channel name is either an empty string (the broadcast channel) or contains only a-zA-Z0-9_ characters and starts with a letter. */ 67 | extern NSInteger const kPFErrorInvalidChannelName; 68 | /*! @abstract 114: Invalid device token. */ 69 | extern NSInteger const kPFErrorInvalidDeviceToken; 70 | /*! @abstract 115: Push is misconfigured. See details to find out how. */ 71 | extern NSInteger const kPFErrorPushMisconfigured; 72 | /*! @abstract 116: The object is too large. */ 73 | extern NSInteger const kPFErrorObjectTooLarge; 74 | /*! @abstract 119: That operation isn't allowed for clients. */ 75 | extern NSInteger const kPFErrorOperationForbidden; 76 | /*! @abstract 120: The results were not found in the cache. */ 77 | extern NSInteger const kPFErrorCacheMiss; 78 | /*! @abstract 121: Keys in NSDictionary values may not include '$' or '.'. */ 79 | extern NSInteger const kPFErrorInvalidNestedKey; 80 | /*! @abstract 122: Invalid file name. A file name contains only a-zA-Z0-9_. characters and is between 1 and 36 characters. */ 81 | extern NSInteger const kPFErrorInvalidFileName; 82 | /*! @abstract 123: Invalid ACL. An ACL with an invalid format was saved. This should not happen if you use PFACL. */ 83 | extern NSInteger const kPFErrorInvalidACL; 84 | /*! @abstract 124: The request timed out on the server. Typically this indicates the request is too expensive. */ 85 | extern NSInteger const kPFErrorTimeout; 86 | /*! @abstract 125: The email address was invalid. */ 87 | extern NSInteger const kPFErrorInvalidEmailAddress; 88 | /*! @abstract 137: A unique field was given a value that is already taken. */ 89 | extern NSInteger const kPFErrorDuplicateValue; 90 | /*! @abstract 139: Role's name is invalid. */ 91 | extern NSInteger const kPFErrorInvalidRoleName; 92 | /*! @abstract 140: Exceeded an application quota. Upgrade to resolve. */ 93 | extern NSInteger const kPFErrorExceededQuota; 94 | /*! @abstract 141: Cloud Code script had an error. */ 95 | extern NSInteger const kPFScriptError; 96 | /*! @abstract 142: Cloud Code validation failed. */ 97 | extern NSInteger const kPFValidationError; 98 | /*! @abstract 143: Product purchase receipt is missing */ 99 | extern NSInteger const kPFErrorReceiptMissing; 100 | /*! @abstract 144: Product purchase receipt is invalid */ 101 | extern NSInteger const kPFErrorInvalidPurchaseReceipt; 102 | /*! @abstract 145: Payment is disabled on this device */ 103 | extern NSInteger const kPFErrorPaymentDisabled; 104 | /*! @abstract 146: The product identifier is invalid */ 105 | extern NSInteger const kPFErrorInvalidProductIdentifier; 106 | /*! @abstract 147: The product is not found in the App Store */ 107 | extern NSInteger const kPFErrorProductNotFoundInAppStore; 108 | /*! @abstract 148: The Apple server response is not valid */ 109 | extern NSInteger const kPFErrorInvalidServerResponse; 110 | /*! @abstract 149: Product fails to download due to file system error */ 111 | extern NSInteger const kPFErrorProductDownloadFileSystemFailure; 112 | /*! @abstract 150: Fail to convert data to image. */ 113 | extern NSInteger const kPFErrorInvalidImageData; 114 | /*! @abstract 151: Unsaved file. */ 115 | extern NSInteger const kPFErrorUnsavedFile; 116 | /*! @abstract 153: Fail to delete file. */ 117 | extern NSInteger const kPFErrorFileDeleteFailure; 118 | 119 | /*! @abstract 200: Username is missing or empty */ 120 | extern NSInteger const kPFErrorUsernameMissing; 121 | /*! @abstract 201: Password is missing or empty */ 122 | extern NSInteger const kPFErrorUserPasswordMissing; 123 | /*! @abstract 202: Username has already been taken */ 124 | extern NSInteger const kPFErrorUsernameTaken; 125 | /*! @abstract 203: Email has already been taken */ 126 | extern NSInteger const kPFErrorUserEmailTaken; 127 | /*! @abstract 204: The email is missing, and must be specified */ 128 | extern NSInteger const kPFErrorUserEmailMissing; 129 | /*! @abstract 205: A user with the specified email was not found */ 130 | extern NSInteger const kPFErrorUserWithEmailNotFound; 131 | /*! @abstract 206: The user cannot be altered by a client without the session. */ 132 | extern NSInteger const kPFErrorUserCannotBeAlteredWithoutSession; 133 | /*! @abstract 207: Users can only be created through sign up */ 134 | extern NSInteger const kPFErrorUserCanOnlyBeCreatedThroughSignUp; 135 | /*! @abstract 208: An existing Facebook account already linked to another user. */ 136 | extern NSInteger const kPFErrorFacebookAccountAlreadyLinked; 137 | /*! @abstract 208: An existing account already linked to another user. */ 138 | extern NSInteger const kPFErrorAccountAlreadyLinked; 139 | /*! @abstract 209: User ID mismatch */ 140 | extern NSInteger const kPFErrorUserIdMismatch; 141 | /*! @abstract 250: Facebook id missing from request */ 142 | extern NSInteger const kPFErrorFacebookIdMissing; 143 | /*! @abstract 250: Linked id missing from request */ 144 | extern NSInteger const kPFErrorLinkedIdMissing; 145 | /*! @abstract 251: Invalid Facebook session */ 146 | extern NSInteger const kPFErrorFacebookInvalidSession; 147 | /*! @abstract 251: Invalid linked session */ 148 | extern NSInteger const kPFErrorInvalidLinkedSession; 149 | 150 | typedef void (^PFBooleanResultBlock)(BOOL succeeded, NSError *error); 151 | typedef void (^PFIntegerResultBlock)(int number, NSError *error); 152 | typedef void (^PFArrayResultBlock)(NSArray *objects, NSError *error); 153 | typedef void (^PFObjectResultBlock)(PFObject *object, NSError *error); 154 | typedef void (^PFSetResultBlock)(NSSet *channels, NSError *error); 155 | typedef void (^PFUserResultBlock)(PFUser *user, NSError *error); 156 | typedef void (^PFDataResultBlock)(NSData *data, NSError *error); 157 | typedef void (^PFDataStreamResultBlock)(NSInputStream *stream, NSError *error); 158 | typedef void (^PFStringResultBlock)(NSString *string, NSError *error); 159 | typedef void (^PFIdResultBlock)(id object, NSError *error); 160 | typedef void (^PFProgressBlock)(int percentDone); 161 | -------------------------------------------------------------------------------- /HackerBoard/Parse.framework/Versions/1.2.19/Headers/PFGeoPoint.h: -------------------------------------------------------------------------------- 1 | // 2 | // PFGeoPoint.h 3 | // Parse 4 | // 5 | // Created by Henele Adams on 12/1/11. 6 | // Copyright (c) 2011 Parse, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | /*! 13 | Object which may be used to embed a latitude / longitude point as the value for a key in a PFObject. 14 | PFObjects with a PFGeoPoint field may be queried in a geospatial manner using PFQuery's whereKey:nearGeoPoint:. 15 | 16 | This is also used as a point specifier for whereKey:nearGeoPoint: queries. 17 | 18 | Currently, object classes may only have one key associated with a GeoPoint type. 19 | */ 20 | 21 | @interface PFGeoPoint : NSObject 22 | 23 | /** @name Creating a PFGeoPoint */ 24 | /*! 25 | Create a PFGeoPoint object. Latitude and longitude are set to 0.0. 26 | @result Returns a new PFGeoPoint. 27 | */ 28 | + (PFGeoPoint *)geoPoint; 29 | 30 | /*! 31 | Creates a new PFGeoPoint object for the given CLLocation, set to the location's 32 | coordinates. 33 | @param location CLLocation object, with set latitude and longitude. 34 | @result Returns a new PFGeoPoint at specified location. 35 | */ 36 | + (PFGeoPoint *)geoPointWithLocation:(CLLocation *)location; 37 | 38 | /*! 39 | Creates a new PFGeoPoint object with the specified latitude and longitude. 40 | @param latitude Latitude of point in degrees. 41 | @param longitude Longitude of point in degrees. 42 | @result New point object with specified latitude and longitude. 43 | */ 44 | + (PFGeoPoint *)geoPointWithLatitude:(double)latitude longitude:(double)longitude; 45 | 46 | /*! 47 | Fetches the user's current location and returns a new PFGeoPoint object via the 48 | provided block. 49 | @param geoPointHandler A block which takes the newly created PFGeoPoint as an 50 | argument. 51 | */ 52 | + (void)geoPointForCurrentLocationInBackground:(void(^)(PFGeoPoint *geoPoint, NSError *error))geoPointHandler; 53 | 54 | /** @name Controlling Position */ 55 | 56 | /// Latitude of point in degrees. Valid range (-90.0, 90.0). 57 | @property (nonatomic) double latitude; 58 | /// Longitude of point in degrees. Valid range (-180.0, 180.0). 59 | @property (nonatomic) double longitude; 60 | 61 | /** @name Calculating Distance */ 62 | 63 | /*! 64 | Get distance in radians from this point to specified point. 65 | @param point PFGeoPoint location of other point. 66 | @result distance in radians 67 | */ 68 | - (double)distanceInRadiansTo:(PFGeoPoint*)point; 69 | 70 | /*! 71 | Get distance in miles from this point to specified point. 72 | @param point PFGeoPoint location of other point. 73 | @result distance in miles 74 | */ 75 | - (double)distanceInMilesTo:(PFGeoPoint*)point; 76 | 77 | /*! 78 | Get distance in kilometers from this point to specified point. 79 | @param point PFGeoPoint location of other point. 80 | @result distance in kilometers 81 | */ 82 | - (double)distanceInKilometersTo:(PFGeoPoint*)point; 83 | 84 | 85 | @end 86 | -------------------------------------------------------------------------------- /HackerBoard/Parse.framework/Versions/1.2.19/Headers/PFImageView.h: -------------------------------------------------------------------------------- 1 | // 2 | // PFImageView.h 3 | // Parse 4 | // 5 | // Created by Qian Wang on 5/16/12. 6 | // Copyright (c) 2012 Parse Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "PFFile.h" 11 | 12 | /*! 13 | An image view that downloads and displays remote image stored on Parse's server. 14 | */ 15 | @interface PFImageView : UIImageView 16 | 17 | /// The remote file on Parse's server that stores the image. 18 | /// Note that the download does not start until loadInBackground: is called. 19 | @property (nonatomic, retain) PFFile *file; 20 | 21 | /*! 22 | Initiate downloading of the remote image. Once the download completes, the remote image will be displayed. 23 | */ 24 | - (void)loadInBackground; 25 | 26 | /*! 27 | Initiate downloading of the remote image. Once the download completes, the remote image will be displayed. 28 | @param completion the completion block. 29 | */ 30 | - (void)loadInBackground:(void (^)(UIImage *image, NSError *error))completion; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /HackerBoard/Parse.framework/Versions/1.2.19/Headers/PFInstallation.h: -------------------------------------------------------------------------------- 1 | // 2 | // PFInstallation.h 3 | // Parse 4 | // 5 | // Created by Brian Jacokes on 6/4/12. 6 | // Copyright (c) 2012 Parse, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "PFObject.h" 11 | #import "PFSubclassing.h" 12 | 13 | /*! 14 | A Parse Framework Installation Object that is a local representation of an 15 | installation persisted to the Parse cloud. This class is a subclass of a 16 | PFObject, and retains the same functionality of a PFObject, but also extends 17 | it with installation-specific fields and related immutability and validity 18 | checks. 19 | 20 | A valid PFInstallation can only be instantiated via 21 | [PFInstallation currentInstallation] because the required identifier fields 22 | are readonly. The timeZone and badge fields are also readonly properties which 23 | are automatically updated to match the device's time zone and application badge 24 | when the PFInstallation is saved, thus these fields might not reflect the 25 | latest device state if the installation has not recently been saved. 26 | 27 | PFInstallation objects which have a valid deviceToken and are saved to 28 | the Parse cloud can be used to target push notifications. 29 | 30 | This class is currently for iOS only. There is no PFInstallation for Parse 31 | applications running on OS X, because they cannot receive push notifications. 32 | */ 33 | 34 | @interface PFInstallation : PFObject 35 | 36 | /*! The name of the Installation class in the REST API. This is a required 37 | * PFSubclassing method */ 38 | + (NSString *)parseClassName; 39 | 40 | /** @name Targeting Installations */ 41 | 42 | /*! 43 | Creates a query for PFInstallation objects. The resulting query can only 44 | be used for targeting a PFPush. Calling find methods on the resulting query 45 | will raise an exception. 46 | */ 47 | + (PFQuery *)query; 48 | 49 | /** @name Accessing the Current Installation */ 50 | 51 | /*! 52 | Gets the currently-running installation from disk and returns an instance of 53 | it. If this installation is not stored on disk, returns a PFInstallation 54 | with deviceType and installationId fields set to those of the 55 | current installation. 56 | @result Returns a PFInstallation that represents the currently-running 57 | installation. 58 | */ 59 | + (instancetype)currentInstallation; 60 | 61 | /*! 62 | Sets the device token string property from an NSData-encoded token. 63 | */ 64 | - (void)setDeviceTokenFromData:(NSData *)deviceTokenData; 65 | 66 | /** @name Properties */ 67 | 68 | /// The device type for the PFInstallation. 69 | @property (nonatomic, readonly, retain) NSString *deviceType; 70 | 71 | /// The installationId for the PFInstallation. 72 | @property (nonatomic, readonly, retain) NSString *installationId; 73 | 74 | /// The device token for the PFInstallation. 75 | @property (nonatomic, retain) NSString *deviceToken; 76 | 77 | /// The badge for the PFInstallation. 78 | @property (nonatomic, assign) NSInteger badge; 79 | 80 | /// The timeZone for the PFInstallation. 81 | @property (nonatomic, readonly, retain) NSString *timeZone; 82 | 83 | /// The channels for the PFInstallation. 84 | @property (nonatomic, retain) NSArray *channels; 85 | 86 | @end 87 | -------------------------------------------------------------------------------- /HackerBoard/Parse.framework/Versions/1.2.19/Headers/PFLogInView.h: -------------------------------------------------------------------------------- 1 | // 2 | // PFLogInView.h 3 | // Parse 4 | // 5 | // Created by Qian Wang on 3/9/12. 6 | // Copyright (c) 2012. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef enum { 12 | PFLogInFieldsNone = 0, 13 | PFLogInFieldsUsernameAndPassword = 1 << 0, 14 | PFLogInFieldsPasswordForgotten = 1 << 1, 15 | PFLogInFieldsLogInButton = 1 << 2, 16 | PFLogInFieldsFacebook = 1 << 3, 17 | PFLogInFieldsTwitter = 1 << 4, 18 | PFLogInFieldsSignUpButton = 1 << 5, 19 | PFLogInFieldsDismissButton = 1 << 6, 20 | 21 | PFLogInFieldsDefault = PFLogInFieldsUsernameAndPassword | PFLogInFieldsLogInButton | PFLogInFieldsSignUpButton | PFLogInFieldsPasswordForgotten | PFLogInFieldsDismissButton 22 | } PFLogInFields; 23 | 24 | /*! 25 | The class provides a standard log in interface for authenticating a PFUser. 26 | */ 27 | @interface PFLogInView : UIView 28 | 29 | /*! @name Creating Log In View */ 30 | /*! 31 | Initializes the view with the specified log in elements. 32 | @param fields A bitmask specifying the log in elements which are enabled in the view 33 | */ 34 | - (id)initWithFields:(PFLogInFields) fields; 35 | 36 | /// The view controller that will present this view. 37 | /// Used to lay out elements correctly when the presenting view controller has translucent elements. 38 | @property (nonatomic, retain) UIViewController *presentingViewController; 39 | 40 | /*! @name Customizing the Logo */ 41 | 42 | /// The logo. By default, it is the Parse logo. 43 | @property (nonatomic, retain) UIView *logo; 44 | 45 | /*! @name Accessing Log In Elements */ 46 | 47 | /// The bitmask which specifies the enabled log in elements in the view 48 | @property (nonatomic, readonly, assign) PFLogInFields fields; 49 | 50 | /// The username text field. It is nil if the element is not enabled. 51 | @property (nonatomic, readonly, retain) UITextField *usernameField; 52 | 53 | /// The password text field. It is nil if the element is not enabled. 54 | @property (nonatomic, readonly, retain) UITextField *passwordField; 55 | 56 | /// The password forgotten button. It is nil if the element is not enabled. 57 | @property (nonatomic, readonly, retain) UIButton *passwordForgottenButton; 58 | 59 | /// The log in button. It is nil if the element is not enabled. 60 | @property (nonatomic, readonly, retain) UIButton *logInButton; 61 | 62 | /// The Facebook button. It is nil if the element is not enabled. 63 | @property (nonatomic, readonly, retain) UIButton *facebookButton; 64 | 65 | /// The Twitter button. It is nil if the element is not enabled. 66 | @property (nonatomic, readonly, retain) UIButton *twitterButton; 67 | 68 | /// The sign up button. It is nil if the element is not enabled. 69 | @property (nonatomic, readonly, retain) UIButton *signUpButton; 70 | 71 | /// The dismiss button. It is nil if the element is not enabled. 72 | @property (nonatomic, readonly, retain) UIButton *dismissButton; 73 | 74 | /// The facebook/twitter login label. It is only shown if the external login is enabled. 75 | @property (nonatomic, readonly, retain) UILabel *externalLogInLabel; 76 | 77 | /// The sign up label. It is only shown if sign up button is enabled. 78 | @property (nonatomic, readonly, retain) UILabel *signUpLabel; 79 | 80 | @end 81 | 82 | 83 | -------------------------------------------------------------------------------- /HackerBoard/Parse.framework/Versions/1.2.19/Headers/PFLogInViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PFLogInViewController.h 3 | // Parse 4 | // 5 | // Created by Andrew Wang on 3/8/12. 6 | // Copyright (c) 2012. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "PFLogInView.h" 11 | #import "PFSignUpViewController.h" 12 | #import "PFUser.h" 13 | 14 | @protocol PFLogInViewControllerDelegate; 15 | 16 | /*! 17 | The class that presents and manages a standard authentication interface for logging in a PFUser. 18 | */ 19 | @interface PFLogInViewController : UIViewController 20 | 21 | /*! @name Configuring Log In Elements */ 22 | 23 | /*! 24 | A bitmask specifying the log in elements which are enabled in the view. 25 | enum { 26 | PFLogInFieldsNone = 0, 27 | PFLogInFieldsUsernameAndPassword = 1 << 0, 28 | PFLogInFieldsPasswordForgotten = 1 << 1, 29 | PFLogInFieldsLogInButton = 1 << 2, 30 | PFLogInFieldsFacebook = 1 << 3, 31 | PFLogInFieldsTwitter = 1 << 4, 32 | PFLogInFieldsSignUpButton = 1 << 5, 33 | PFLogInFieldsDismissButton = 1 << 6, 34 | PFLogInFieldsDefault = PFLogInFieldsUsernameAndPassword | PFLogInFieldsLogInButton | PFLogInFieldsSignUpButton | PFLogInFieldsPasswordForgotten | PFLogInFieldsDismissButton 35 | }; 36 | */ 37 | @property (nonatomic) PFLogInFields fields; 38 | 39 | /// The log in view. It contains all the enabled log in elements. 40 | @property (nonatomic, readonly, retain) PFLogInView *logInView; 41 | 42 | /*! @name Configuring Log In Behaviors */ 43 | /// The delegate that responds to the control events of PFLogInViewController. 44 | @property (nonatomic, assign) id delegate; 45 | 46 | /// The facebook permissions that Facebook log in requests for. 47 | /// If unspecified, the default is basic facebook permissions. 48 | @property (nonatomic, retain) NSArray *facebookPermissions; 49 | 50 | /// The sign up controller if sign up is enabled. 51 | /// Use this to configure the sign up view, and the transition animation to the sign up view. 52 | /// The default is a sign up view with a username, a password, a dismiss button and a sign up button. 53 | @property (nonatomic, retain) PFSignUpViewController *signUpController; 54 | 55 | @end 56 | 57 | /*! @name Notifications */ 58 | /// The notification is posted immediately after the log in succeeds. 59 | extern NSString *const PFLogInSuccessNotification; 60 | 61 | /// The notification is posted immediately after the log in fails. 62 | /// If the delegate prevents the log in from starting, the notification is not sent. 63 | extern NSString *const PFLogInFailureNotification; 64 | 65 | /// The notification is posted immediately after the log in is cancelled. 66 | extern NSString *const PFLogInCancelNotification; 67 | 68 | /*! 69 | The protocol defines methods a delegate of a PFLogInViewController should implement. 70 | All methods of the protocol are optional. 71 | */ 72 | @protocol PFLogInViewControllerDelegate 73 | @optional 74 | 75 | /*! @name Customizing Behavior */ 76 | 77 | /*! 78 | Sent to the delegate to determine whether the log in request should be submitted to the server. 79 | @param username the username the user tries to log in with. 80 | @param password the password the user tries to log in with. 81 | @result a boolean indicating whether the log in should proceed. 82 | */ 83 | - (BOOL)logInViewController:(PFLogInViewController *)logInController shouldBeginLogInWithUsername:(NSString *)username password:(NSString *)password; 84 | 85 | /*! @name Responding to Actions */ 86 | /// Sent to the delegate when a PFUser is logged in. 87 | - (void)logInViewController:(PFLogInViewController *)logInController didLogInUser:(PFUser *)user; 88 | 89 | /// Sent to the delegate when the log in attempt fails. 90 | - (void)logInViewController:(PFLogInViewController *)logInController didFailToLogInWithError:(NSError *)error; 91 | 92 | /// Sent to the delegate when the log in screen is dismissed. 93 | - (void)logInViewControllerDidCancelLogIn:(PFLogInViewController *)logInController; 94 | @end 95 | 96 | -------------------------------------------------------------------------------- /HackerBoard/Parse.framework/Versions/1.2.19/Headers/PFObject+Subclass.h: -------------------------------------------------------------------------------- 1 | // 2 | // PFObject+Subclass.h 3 | // Parse 4 | // 5 | // Created by Thomas Bouldin on 2/17/13. 6 | // Copyright (c) 2013 Parse Inc. All rights reserved. 7 | // 8 | 9 | #import "PFObject.h" 10 | 11 | @class PFQuery; 12 | 13 | /*! 14 |

Subclassing Notes

15 | 16 | Developers can subclass PFObject for a more native object-oriented class structure. Strongly-typed subclasses of PFObject must conform to the PFSubclassing protocol and must call registerSubclass to be returned by PFQuery and other PFObject factories. All methods in PFSubclassing except for [PFSubclassing parseClassName] are already implemented in the PFObject(Subclass) category. Inculding PFObject+Subclass.h in your implementation file provides these implementations automatically. 17 | 18 | Subclasses support simpler initializers, query syntax, and dynamic synthesizers. The following shows an example subclass: 19 | 20 | @interface MYGame : PFObject< PFSubclassing > 21 | // Accessing this property is the same as objectForKey:@"title" 22 | @property (retain) NSString *title; 23 | + (NSString *)parseClassName; 24 | @end 25 | 26 | @implementation MYGame 27 | @dynamic title; 28 | + (NSString *)parseClassName { 29 | return @"Game"; 30 | } 31 | @end 32 | 33 | MYGame *game = [[MYGame alloc] init]; 34 | game.title = @"Bughouse"; 35 | [game saveInBackground]; 36 | 37 | */ 38 | @interface PFObject(Subclass) 39 | 40 | /*! @name Methods for Subclasses */ 41 | 42 | /*! 43 | Designated initializer for subclasses. 44 | This method can only be called on subclasses which conform to PFSubclassing. 45 | This method should not be overridden. 46 | */ 47 | - (id)init; 48 | 49 | /*! 50 | Creates an instance of the registered subclass with this class's parseClassName. 51 | This helps a subclass ensure that it can be subclassed itself. For example, [PFUser object] will 52 | return a MyUser object if MyUser is a registered subclass of PFUser. For this reason, [MyClass object] is 53 | preferred to [[MyClass alloc] init]. 54 | This method can only be called on subclasses which conform to PFSubclassing. 55 | A default implementation is provided by PFObject which should always be sufficient. 56 | */ 57 | + (instancetype)object; 58 | 59 | /*! 60 | Creates a reference to an existing PFObject for use in creating associations between PFObjects. Calling isDataAvailable on this 61 | object will return NO until fetchIfNeeded or refresh has been called. No network request will be made. 62 | This method can only be called on subclasses which conform to PFSubclassing. 63 | A default implementation is provided by PFObject which should always be sufficient. 64 | @param objectId The object id for the referenced object. 65 | @result A PFObject without data. 66 | */ 67 | + (id)objectWithoutDataWithObjectId:(NSString *)objectId; 68 | 69 | /*! 70 | Registers an Objective-C class for Parse to use for representing a given Parse class. 71 | Once this is called on a PFObject subclass, any PFObject Parse creates with a class 72 | name matching [self parseClassName] will be an instance of subclass. 73 | This method can only be called on subclasses which conform to PFSubclassing. 74 | A default implementation is provided by PFObject which should always be sufficient. 75 | */ 76 | + (void)registerSubclass; 77 | 78 | /*! 79 | Returns a query for objects of type +parseClassName. 80 | This method can only be called on subclasses which conform to PFSubclassing. 81 | A default implementation is provided by PFObject which should always be sufficient. 82 | */ 83 | + (PFQuery *)query; 84 | 85 | @end 86 | -------------------------------------------------------------------------------- /HackerBoard/Parse.framework/Versions/1.2.19/Headers/PFProduct.h: -------------------------------------------------------------------------------- 1 | // 2 | // PFProduct.h 3 | // Parse 4 | // 5 | // Created by Qian Wang on 6/7/12. 6 | // Copyright (c) 2012 Parse Inc. All rights reserved. 7 | // 8 | 9 | #import "PFObject.h" 10 | #import "PFSubclassing.h" 11 | #import "PFFile.h" 12 | 13 | /*! 14 | Represents an in-app purchase product on the Parse server. 15 | By default, products can only be created via the data browser; saving a PFProduct 16 | will result in error. However, the products' metadata information can be queried 17 | and viewed. 18 | 19 | This class is currently for iOS only. 20 | */ 21 | @interface PFProduct : PFObject 22 | 23 | /*! The name of the Product class in the REST API. This is a required 24 | * PFSubclassing method */ 25 | + (NSString *)parseClassName; 26 | 27 | /** @name Querying for Products */ 28 | /*! 29 | A query that fetches all product instances registered on Parse's server. 30 | */ 31 | + (PFQuery *)query; 32 | 33 | /** @name Accessing Product-specific Properties */ 34 | /*! 35 | The product identifier of the product. 36 | This should match the product identifier in iTunes Connect exactly. 37 | */ 38 | @property (nonatomic, retain) NSString *productIdentifier; 39 | 40 | /*! 41 | The icon of the product. 42 | */ 43 | @property (nonatomic, retain) PFFile *icon; 44 | 45 | /*! 46 | The title of the product. 47 | */ 48 | @property (nonatomic, retain) NSString *title; 49 | 50 | /*! 51 | The subtitle of the product. 52 | */ 53 | @property (nonatomic, retain) NSString *subtitle; 54 | 55 | /*! 56 | The order in which the product information is displayed in PFProductTableViewController. 57 | The product with a smaller order is displayed earlier in the PFProductTableViewController. 58 | */ 59 | @property (nonatomic, retain) NSNumber *order; 60 | 61 | /*! 62 | The name of the associated download. If there is no downloadable asset, it should be nil. 63 | */ 64 | @property (nonatomic, readonly) NSString *downloadName; 65 | 66 | 67 | @end 68 | -------------------------------------------------------------------------------- /HackerBoard/Parse.framework/Versions/1.2.19/Headers/PFProductTableViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PFProductsTableViewController.h 3 | // Parse 4 | // 5 | // Created by Qian Wang on 5/15/12. 6 | // Copyright (c) 2012 Parse Inc. All rights reserved. 7 | // 8 | 9 | #import "PFQueryTableViewController.h" 10 | 11 | /*! 12 | PFProductTableViewController displays in-app purchase products stored on Parse. 13 | In addition to setting up in-app purchases in iTunesConnect, the app developer needs 14 | to register product information on Parse, in the Product class. 15 | */ 16 | @interface PFProductTableViewController : PFQueryTableViewController 17 | 18 | /*! 19 | Initializes a product table view controller. 20 | */ 21 | - (id)init; 22 | @end 23 | -------------------------------------------------------------------------------- /HackerBoard/Parse.framework/Versions/1.2.19/Headers/PFPurchase.h: -------------------------------------------------------------------------------- 1 | // 2 | // PFPurchase.h 3 | // Parse 4 | // 5 | // Created by Qian Wang on 5/2/12. 6 | // Copyright (c) 2012 Parse Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import "PFConstants.h" 12 | 13 | /*! 14 | PFPurchase provides a set of APIs for working with in-app purchases. 15 | 16 | This class is currently for iOS only. 17 | */ 18 | @interface PFPurchase : NSObject 19 | 20 | /*! 21 | Use this method to add application logic block which is run when buying a product. 22 | This method should be called once for each product, and should be called before 23 | calling buyProduct:block. All invocations to addObserverForProduct:block: should happen within 24 | the same method, and on the main thread. It is recommended to place all invocations of this method 25 | in application:didFinishLaunchingWithOptions:. 26 | @param productIdentifier the product identifier 27 | @param completion the completion block 28 | */ 29 | + (void)addObserverForProduct:(NSString *)productIdentifier block:(void(^)(SKPaymentTransaction *transaction))block; 30 | 31 | /*! 32 | Asynchronously initiates the purchase for the product. 33 | @param productIdentifier the product identifier 34 | @param block the completion block. 35 | */ 36 | + (void)buyProduct:(NSString *)productIdentifier block:(void(^)(NSError *error))block; 37 | 38 | /*! 39 | Asynchronously download the purchased asset, which is stored on Parse's server. 40 | Parse verifies the receipt with Apple and delivers the content only if the receipt is valid. 41 | @param transaction the transaction, which contains the receipt. 42 | @param completion the completion block. 43 | */ 44 | + (void)downloadAssetForTransaction:(SKPaymentTransaction *)transaction completion:(void(^)(NSString *filePath, NSError *error))completion; 45 | 46 | /*! 47 | Asynchronously download the purchased asset, which is stored on Parse's server. 48 | Parse verifies the receipt with Apple and delivers the content only if the receipt is valid. 49 | @param transaction the transaction, which contains the receipt. 50 | @param completion the completion block. 51 | @param progress the progress block, which is called multiple times to reveal progress of the download. 52 | */ 53 | + (void)downloadAssetForTransaction:(SKPaymentTransaction *)transaction completion:(void(^)(NSString *filePath, NSError *error))completion progress:(PFProgressBlock)progress; 54 | 55 | /*! 56 | Asynchronously restore completed transactions for the current user. 57 | Note: This method is only important to developers who want to preserve purchase states across 58 | different installations of the same app. 59 | Only nonconsumable purchases are restored. If observers for the products have been added before 60 | calling this method, invoking the method reruns the application logic associated with the purchase. 61 | */ 62 | + (void)restore; 63 | @end 64 | -------------------------------------------------------------------------------- /HackerBoard/Parse.framework/Versions/1.2.19/Headers/PFPurchaseTableViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // PFPurchaseTableViewCell.h 3 | // Parse 4 | // 5 | // Created by Qian Wang on 5/21/12. 6 | // Copyright (c) 2012 Parse Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "PFTableViewCell.h" 11 | 12 | typedef enum { 13 | PFPurchaseTableViewCellStateNormal, 14 | PFPurchaseTableViewCellStateDownloading, 15 | PFPurchaseTableViewCellStateDownloaded 16 | } PFPurchaseTableViewCellState; 17 | 18 | @interface PFPurchaseTableViewCell : PFTableViewCell 19 | @property (nonatomic, assign) PFPurchaseTableViewCellState state; 20 | @property (nonatomic, retain, readonly) UILabel *priceLabel; 21 | @property (nonatomic, retain, readonly) UIProgressView *progressView; 22 | @end 23 | -------------------------------------------------------------------------------- /HackerBoard/Parse.framework/Versions/1.2.19/Headers/PFQueryTableViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PFUITableViewController.h 3 | // Posse 4 | // 5 | // Created by James Yu on 11/20/11. 6 | // Copyright (c) 2011 Parse Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "PFQuery.h" 11 | #import "PFTableViewCell.h" 12 | #import "PF_EGORefreshTableHeaderView.h" 13 | 14 | @interface PFQueryTableViewController : UITableViewController 15 | 16 | /*! @name Creating a PFQueryTableViewController */ 17 | 18 | /*! 19 | The designated initializer. 20 | Initializes with a class name of the PFObjects that will be associated with this table. 21 | @param style The UITableViewStyle for the table 22 | @param aClassName The class name of the PFObjects that this table will display 23 | @result The initialized PFQueryTableViewController 24 | */ 25 | - (id)initWithStyle:(UITableViewStyle)style className:(NSString *)aClassName; 26 | 27 | /*! 28 | Initializes with a class name of the PFObjects that will be associated with this table. 29 | @param aClassName The class name of the PFObjects that this table will display 30 | @result The initialized PFQueryTableViewController 31 | */ 32 | - (id)initWithClassName:(NSString *)aClassName; 33 | 34 | /*! @name Configuring Behavior */ 35 | 36 | /// The class of the PFObject this table will use as a datasource 37 | @property (nonatomic, retain) NSString *parseClassName; 38 | 39 | /// The key to use to display for the cell text label. This won't apply if you override tableView:cellForRowAtIndexPath:object: 40 | @property (nonatomic, retain) NSString *textKey; 41 | 42 | /// The key to use to display for the cell image view. This won't apply if you override tableView:cellForRowAtIndexPath:object: 43 | @property (nonatomic, retain) NSString *imageKey; 44 | 45 | /// The image to use as a placeholder for the cell images. This won't apply if you override tableView:cellForRowAtIndexPath:object: 46 | @property (nonatomic, retain) UIImage *placeholderImage; 47 | 48 | /// Whether the table should use the default loading view (default:YES) 49 | @property (nonatomic, assign) BOOL loadingViewEnabled; 50 | 51 | /// Whether the table should use the built-in pull-to-refresh feature (default:YES) 52 | @property (nonatomic, assign) BOOL pullToRefreshEnabled; 53 | 54 | /// Whether the table should use the built-in pagination feature (default:YES) 55 | @property (nonatomic, assign) BOOL paginationEnabled; 56 | 57 | /// The number of objects to show per page (default: 25) 58 | @property (nonatomic, assign) NSUInteger objectsPerPage; 59 | 60 | /// Whether the table is actively loading new data from the server 61 | @property (nonatomic, assign) BOOL isLoading; 62 | 63 | /*! @name Responding to Events */ 64 | 65 | /*! 66 | Called when objects have loaded from Parse. If you override this method, you must 67 | call [super objectsDidLoad:] in your implementation. 68 | @param error The Parse error from running the PFQuery, if there was any. 69 | */ 70 | - (void)objectsDidLoad:(NSError *)error; 71 | 72 | /*! 73 | Called when objects will loaded from Parse. If you override this method, you must 74 | call [super objectsWillLoad] in your implementation. 75 | */ 76 | - (void)objectsWillLoad; 77 | 78 | /*! @name Accessing Results */ 79 | 80 | /// The array of PFObjects that is the UITableView data source 81 | @property (nonatomic, retain, readonly) NSArray *objects; 82 | 83 | /*! 84 | Returns an object at a particular indexPath. The default impementation returns 85 | the object at indexPath.row. If you want to return objects in a different 86 | indexPath order, like for sections, override this method. 87 | @param indexPath The indexPath 88 | @result The object at the specified index 89 | */ 90 | - (PFObject *)objectAtIndexPath:(NSIndexPath *)indexPath; 91 | 92 | /*! @name Querying */ 93 | 94 | /*! 95 | Override to construct your own custom PFQuery to get the objects. 96 | @result PFQuery that loadObjects will use to the objects for this table. 97 | */ 98 | - (PFQuery *)queryForTable; 99 | 100 | /*! 101 | Clears the table of all objects. 102 | */ 103 | - (void)clear; 104 | 105 | /*! 106 | Clears the table and loads the first page of objects. 107 | */ 108 | - (void)loadObjects; 109 | 110 | /*! 111 | Loads the objects of the className at the specified page and appends it to the 112 | objects already loaded and refreshes the table. 113 | @param page The page of objects to load. 114 | @param clear Whether to clear the table after receiving the objects. 115 | */ 116 | - (void)loadObjects:(NSInteger)page clear:(BOOL)clear; 117 | 118 | /*! 119 | Loads the next page of objects, appends to table, and refreshes. 120 | */ 121 | - (void)loadNextPage; 122 | 123 | /*! @name Data Source Methods */ 124 | 125 | /*! 126 | Override this method to customize each cell given a PFObject that is loaded. If you 127 | don't override this method, it will use a default style cell and display either 128 | the first data key from the object, or it will display the key as specified 129 | with keyToDisplay. 130 | 131 | The cell should inherit from PFTableViewCell which is a subclass of UITableViewCell. 132 | 133 | @param tableView The table view object associated with this controller. 134 | @param indexPath The indexPath of the cell. 135 | @param object The PFObject that is associated with the cell. 136 | @result The cell that represents this object. 137 | */ 138 | - (PFTableViewCell *)tableView:(UITableView *)tableView 139 | cellForRowAtIndexPath:(NSIndexPath *)indexPath 140 | object:(PFObject *)object; 141 | 142 | /*! 143 | Override this method to customize the cell that allows the user to load the 144 | next page when pagination is turned on. 145 | @param tableView The table view object associated with this controller. 146 | @param indexPath The indexPath of the cell. 147 | @result The cell that allows the user to paginate. 148 | */ 149 | - (PFTableViewCell *)tableView:(UITableView *)tableView cellForNextPageAtIndexPath:(NSIndexPath *)indexPath; 150 | 151 | 152 | @end 153 | -------------------------------------------------------------------------------- /HackerBoard/Parse.framework/Versions/1.2.19/Headers/PFRelation.h: -------------------------------------------------------------------------------- 1 | // 2 | // PFRelation.h 3 | // Parse 4 | // 5 | // Created by Shyam Jayaraman on 5/11/12. 6 | // Copyright (c) 2012 Parse Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "PFObject.h" 11 | #import "PFQuery.h" 12 | 13 | /*! 14 | A class that is used to access all of the children of a many-to-many relationship. Each instance 15 | of PFRelation is associated with a particular parent object and key. 16 | */ 17 | @interface PFRelation : NSObject 18 | 19 | @property (nonatomic, retain) NSString *targetClass; 20 | 21 | 22 | #pragma mark Accessing objects 23 | /*! 24 | @return A ParseQuery that can be used to get objects in this relation. 25 | */ 26 | - (PFQuery *)query; 27 | 28 | 29 | #pragma mark Modifying relations 30 | 31 | /*! 32 | Adds a relation to the passed in object. 33 | @param object ParseObject to add relation to. 34 | */ 35 | - (void)addObject:(PFObject *)object; 36 | 37 | /*! 38 | Removes a relation to the passed in object. 39 | @param object ParseObject to add relation to. 40 | */ 41 | - (void)removeObject:(PFObject *)object; 42 | @end 43 | 44 | 45 | -------------------------------------------------------------------------------- /HackerBoard/Parse.framework/Versions/1.2.19/Headers/PFRole.h: -------------------------------------------------------------------------------- 1 | // 2 | // PFRole.h 3 | // Parse 4 | // 5 | // Created by David Poll on 5/17/12. 6 | // Copyright (c) 2012 Parse Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "PFObject.h" 12 | #import "PFSubclassing.h" 13 | 14 | /*! 15 | Represents a Role on the Parse server. PFRoles represent groupings 16 | of PFUsers for the purposes of granting permissions (e.g. specifying a 17 | PFACL for a PFObject). Roles are specified by their sets of child users 18 | and child roles, all of which are granted any permissions that the 19 | parent role has.
20 |
21 | Roles must have a name (which cannot be changed after creation of the role), 22 | and must specify an ACL. 23 | */ 24 | @interface PFRole : PFObject 25 | 26 | #pragma mark Creating a New Role 27 | 28 | /** @name Creating a New Role */ 29 | 30 | /*! 31 | Constructs a new PFRole with the given name. If no default ACL has been 32 | specified, you must provide an ACL for the role. 33 | 34 | @param name The name of the Role to create. 35 | */ 36 | - (id)initWithName:(NSString *)name; 37 | 38 | /*! 39 | Constructs a new PFRole with the given name. 40 | 41 | @param name The name of the Role to create. 42 | @param acl The ACL for this role. Roles must have an ACL. 43 | */ 44 | - (id)initWithName:(NSString *)name acl:(PFACL *)acl; 45 | 46 | /*! 47 | Constructs a new PFRole with the given name. If no default ACL has been 48 | specified, you must provide an ACL for the role. 49 | 50 | @param name The name of the Role to create. 51 | */ 52 | + (instancetype)roleWithName:(NSString *)name; 53 | 54 | /*! 55 | Constructs a new PFRole with the given name. 56 | 57 | @param name The name of the Role to create. 58 | @param acl The ACL for this role. Roles must have an ACL. 59 | */ 60 | + (instancetype)roleWithName:(NSString *)name acl:(PFACL *)acl; 61 | 62 | #pragma mark - 63 | #pragma mark Role-specific Properties 64 | 65 | /** @name Role-specific Properties */ 66 | 67 | /*! 68 | Gets or sets the name for a role. This value must be set before the role 69 | has been saved to the server, and cannot be set once the role has been 70 | saved.
71 |
72 | A role's name can only contain alphanumeric characters, _, -, and spaces. 73 | */ 74 | @property (nonatomic, copy) NSString *name; 75 | 76 | /*! 77 | Gets the PFRelation for the PFUsers that are direct children of this role. 78 | These users are granted any privileges that this role has been granted 79 | (e.g. read or write access through ACLs). You can add or remove users from 80 | the role through this relation. 81 | */ 82 | @property (nonatomic, readonly, retain) PFRelation *users; 83 | 84 | /*! 85 | Gets the PFRelation for the PFRoles that are direct children of this role. 86 | These roles' users are granted any privileges that this role has been granted 87 | (e.g. read or write access through ACLs). You can add or remove child roles 88 | from this role through this relation. 89 | */ 90 | @property (nonatomic, readonly, retain) PFRelation *roles; 91 | 92 | #pragma mark - 93 | #pragma mark Querying for Roles 94 | 95 | /** @name Querying for Roles */ 96 | + (PFQuery *)query; 97 | 98 | @end 99 | -------------------------------------------------------------------------------- /HackerBoard/Parse.framework/Versions/1.2.19/Headers/PFSignUpView.h: -------------------------------------------------------------------------------- 1 | // 2 | // PFLogInView.h 3 | // Parse 4 | // 5 | // Created by Qian Wang on 3/9/12. 6 | // Copyright (c) 2012. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef enum { 12 | PFSignUpFieldsUsernameAndPassword = 0, 13 | PFSignUpFieldsEmail = 1 << 0, 14 | PFSignUpFieldsAdditional = 1 << 1, // this field can be used for something else 15 | PFSignUpFieldsSignUpButton = 1 << 2, 16 | PFSignUpFieldsDismissButton = 1 << 3, 17 | PFSignUpFieldsDefault = PFSignUpFieldsUsernameAndPassword | PFSignUpFieldsEmail | PFSignUpFieldsSignUpButton | PFSignUpFieldsDismissButton 18 | } PFSignUpFields; 19 | 20 | /*! 21 | The class provides a standard sign up interface for authenticating a PFUser. 22 | */ 23 | @interface PFSignUpView : UIScrollView 24 | 25 | /*! @name Creating Sign Up View */ 26 | /*! 27 | Initializes the view with the specified sign up elements. 28 | @param fields A bitmask specifying the sign up elements which are enabled in the view 29 | */ 30 | - (id)initWithFields:(PFSignUpFields) fields; 31 | 32 | /// The view controller that will present this view. 33 | /// Used to lay out elements correctly when the presenting view controller has translucent elements. 34 | @property (nonatomic, retain) UIViewController *presentingViewController; 35 | 36 | /*! @name Customizing the Logo */ 37 | 38 | /// The logo. By default, it is the Parse logo. 39 | @property (nonatomic, retain) UIView *logo; 40 | 41 | /*! @name Accessing Sign Up Elements */ 42 | 43 | /// The bitmask which specifies the enabled sign up elements in the view 44 | @property (nonatomic, readonly, assign) PFSignUpFields fields; 45 | 46 | /// The username text field. 47 | @property (nonatomic, readonly, retain) UITextField *usernameField; 48 | 49 | /// The password text field. 50 | @property (nonatomic, readonly, retain) UITextField *passwordField; 51 | 52 | /// The email text field. It is nil if the element is not enabled. 53 | @property (nonatomic, readonly, retain) UITextField *emailField; 54 | 55 | /// The additional text field. It is nil if the element is not enabled. 56 | /// This field is intended to be customized. 57 | @property (nonatomic, readonly, retain) UITextField *additionalField; 58 | 59 | /// The sign up button. It is nil if the element is not enabled. 60 | @property (nonatomic, readonly, retain) UIButton *signUpButton; 61 | 62 | /// The dismiss button. It is nil if the element is not enabled. 63 | @property (nonatomic, readonly, retain) UIButton *dismissButton; 64 | @end 65 | 66 | 67 | -------------------------------------------------------------------------------- /HackerBoard/Parse.framework/Versions/1.2.19/Headers/PFSignUpViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PFLogInViewController.h 3 | // Parse 4 | // 5 | // Created by Andrew Wang on 3/8/12. 6 | // Copyright (c) 2012. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "PFSignUpView.h" 11 | #import "PFUser.h" 12 | 13 | @protocol PFSignUpViewControllerDelegate; 14 | 15 | /*! 16 | The class that presents and manages a standard authentication interface for signing up a PFUser. 17 | */ 18 | @interface PFSignUpViewController : UIViewController 19 | 20 | /*! @name Configuring Sign Up Elements */ 21 | 22 | /// 23 | /*! 24 | A bitmask specifying the log in elements which are enabled in the view. 25 | enum { 26 | PFSignUpFieldsUsernameAndPassword = 0, 27 | PFSignUpFieldsEmail = 1 << 0, 28 | PFSignUpFieldsAdditional = 1 << 1, // this field can be used for something else 29 | PFSignUpFieldsSignUpButton = 1 << 2, 30 | PFSignUpFieldsDismissButton = 1 << 3, 31 | PFSignUpFieldsDefault = PFSignUpFieldsUsernameAndPassword | PFSignUpFieldsEmail | PFSignUpFieldsSignUpButton | PFSignUpFieldsDismissButton 32 | }; 33 | */ 34 | @property (nonatomic) PFSignUpFields fields; 35 | 36 | /// The sign up view. It contains all the enabled log in elements. 37 | @property (nonatomic, readonly, retain) PFSignUpView *signUpView; 38 | 39 | /*! @name Configuring Sign Up Behaviors */ 40 | /// The delegate that responds to the control events of PFSignUpViewController. 41 | @property (nonatomic, assign) id delegate; 42 | 43 | @end 44 | 45 | /*! @name Notifications */ 46 | /// The notification is posted immediately after the sign up succeeds. 47 | extern NSString *const PFSignUpSuccessNotification; 48 | 49 | /// The notification is posted immediately after the sign up fails. 50 | /// If the delegate prevents the sign up to start, the notification is not sent. 51 | extern NSString *const PFSignUpFailureNotification; 52 | 53 | /// The notification is posted immediately after the user cancels sign up. 54 | extern NSString *const PFSignUpCancelNotification; 55 | 56 | /*! 57 | The protocol defines methods a delegate of a PFSignUpViewController should implement. 58 | All methods of the protocol are optional. 59 | */ 60 | @protocol PFSignUpViewControllerDelegate 61 | @optional 62 | 63 | /*! @name Customizing Behavior */ 64 | 65 | /*! 66 | Sent to the delegate to determine whether the sign up request should be submitted to the server. 67 | @param info a dictionary which contains all sign up information that the user entered. 68 | @result a boolean indicating whether the sign up should proceed. 69 | */ 70 | - (BOOL)signUpViewController:(PFSignUpViewController *)signUpController shouldBeginSignUp:(NSDictionary *)info; 71 | 72 | /// Sent to the delegate when a PFUser is signed up. 73 | - (void)signUpViewController:(PFSignUpViewController *)signUpController didSignUpUser:(PFUser *)user; 74 | 75 | /// Sent to the delegate when the sign up attempt fails. 76 | - (void)signUpViewController:(PFSignUpViewController *)signUpController didFailToSignUpWithError:(NSError *)error; 77 | 78 | /// Sent to the delegate when the sign up screen is dismissed. 79 | - (void)signUpViewControllerDidCancelSignUp:(PFSignUpViewController *)signUpController; 80 | @end 81 | 82 | -------------------------------------------------------------------------------- /HackerBoard/Parse.framework/Versions/1.2.19/Headers/PFSubclassing.h: -------------------------------------------------------------------------------- 1 | // 2 | // PFSubclassing.h 3 | // Parse 4 | // 5 | // Created by Thomas Bouldin on 3/11/13. 6 | // Copyright (c) 2013 Parse Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class PFQuery; 12 | 13 | /*! 14 | If a subclass of PFObject conforms to PFSubclassing and calls registerSubclass, Parse will be able to use that class as the native class for a Parse cloud object. 15 | 16 | Classes conforming to this protocol should subclass PFObject and include PFObject+Subclass.h in their implementation file. This ensures the methods in the Subclass category of PFObject are exposed in its subclasses only. 17 | */ 18 | @protocol PFSubclassing 19 | 20 | /*! 21 | Constructs an object of the most specific class known to implement parseClassName. 22 | This method takes care to help PFObject subclasses be subclassed themselves. 23 | For example, [PFUser object] returns a PFUser by default but will return an 24 | object of a registered subclass instead if one is known. 25 | A default implementation is provided by PFObject which should always be sufficient. 26 | @result Returns the object that is instantiated. 27 | */ 28 | + (instancetype)object; 29 | 30 | /*! 31 | Creates a reference to an existing PFObject for use in creating associations between PFObjects. Calling isDataAvailable on this 32 | object will return NO until fetchIfNeeded or refresh has been called. No network request will be made. 33 | A default implementation is provided by PFObject which should always be sufficient. 34 | @param objectId The object id for the referenced object. 35 | @result A PFObject without data. 36 | */ 37 | + (instancetype)objectWithoutDataWithObjectId:(NSString *)objectId; 38 | 39 | /*! The name of the class as seen in the REST API. */ 40 | + (NSString *)parseClassName; 41 | 42 | /*! 43 | Create a query which returns objects of this type. 44 | A default implementation is provided by PFObject which should always be sufficient. 45 | */ 46 | + (PFQuery *)query; 47 | 48 | /*! 49 | Lets Parse know this class should be used to instantiate all objects with class type parseClassName. 50 | This method must be called before [Parse setApplicationId:clientKey:] 51 | */ 52 | + (void)registerSubclass; 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /HackerBoard/Parse.framework/Versions/1.2.19/Headers/PFTableViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // PFImageViewCell.h 3 | // Parse 4 | // 5 | // Created by Qian Wang on 5/16/12. 6 | // Copyright (c) 2012 Parse Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "PFImageView.h" 11 | 12 | /*! 13 | The PFTableViewCell is a table view cell which can download and display remote images stored on Parse's server. When used in a PFQueryTableViewController, the downloading and displaying of the remote images are automatically managed by the PFQueryTableViewController. 14 | */ 15 | @interface PFTableViewCell : UITableViewCell 16 | 17 | /// The imageView of the table view cell. PFImageView supports remote image downloading. 18 | @property (nonatomic, readonly, retain) PFImageView *imageView; 19 | @end 20 | -------------------------------------------------------------------------------- /HackerBoard/Parse.framework/Versions/1.2.19/Headers/PFTwitterUtils.h: -------------------------------------------------------------------------------- 1 | // 2 | // PFTwitterUtils.h 3 | // Copyright (c) 2012 Parse, Inc. All rights reserved. 4 | // 5 | 6 | #import 7 | #import "PF_Twitter.h" 8 | #import "PFUser.h" 9 | #import "PFConstants.h" 10 | 11 | /*! 12 | Provides utility functions for working with Twitter in a Parse application. 13 | 14 | This class is currently for iOS only. 15 | */ 16 | @interface PFTwitterUtils : NSObject 17 | 18 | /** @name Interacting With Twitter */ 19 | 20 | /*! 21 | Gets the instance of the Twitter object that Parse uses. 22 | @result The Twitter instance. 23 | */ 24 | + (PF_Twitter *)twitter; 25 | 26 | /*! 27 | Initializes the Twitter singleton. You must invoke this in order to use the Twitter functionality in Parse. 28 | @param consumerKey Your Twitter application's consumer key. 29 | @param consumerSecret Your Twitter application's consumer secret. 30 | */ 31 | + (void)initializeWithConsumerKey:(NSString *)consumerKey 32 | consumerSecret:(NSString *)consumerSecret; 33 | 34 | /*! 35 | Whether the user has their account linked to Twitter. 36 | @param user User to check for a Twitter link. The user must be logged in on this device. 37 | @result True if the user has their account linked to Twitter. 38 | */ 39 | + (BOOL)isLinkedWithUser:(PFUser *)user; 40 | 41 | /** @name Logging In & Creating Twitter-Linked Users */ 42 | 43 | /*! 44 | Logs in a user using Twitter. This method delegates to Twitter to authenticate 45 | the user, and then automatically logs in (or creates, in the case where it is a new user) 46 | a PFUser. 47 | @param block The block to execute. The block should have the following argument signature: 48 | (PFUser *user, NSError *error) 49 | */ 50 | + (void)logInWithBlock:(PFUserResultBlock)block; 51 | 52 | /*! 53 | Logs in a user using Twitter. This method delegates to Twitter to authenticate 54 | the user, and then automatically logs in (or creates, in the case where it is a new user) 55 | a PFUser. The selector for the callback should look like: (PFUser *)user error:(NSError **)error 56 | @param target Target object for the selector 57 | @param selector The selector that will be called when the asynchrounous request is complete. 58 | */ 59 | + (void)logInWithTarget:(id)target selector:(SEL)selector; 60 | 61 | /*! 62 | Logs in a user using Twitter. Allows you to handle user login to Twitter, then provide authentication 63 | data to log in (or create, in the case where it is a new user) the PFUser. 64 | @param twitterId The id of the Twitter user being linked 65 | @param screenName The screen name of the Twitter user being linked 66 | @param authToken The auth token for the user's session 67 | @param authTokenSecret The auth token secret for the user's session 68 | @param block The block to execute. The block should have the following argument signature: 69 | (PFUser *user, NSError *error) 70 | */ 71 | + (void)logInWithTwitterId:(NSString *)twitterId 72 | screenName:(NSString *)screenName 73 | authToken:(NSString *)authToken 74 | authTokenSecret:(NSString *)authTokenSecret 75 | block:(PFUserResultBlock)block; 76 | 77 | /*! 78 | Logs in a user using Twitter. Allows you to handle user login to Twitter, then provide authentication 79 | data to log in (or create, in the case where it is a new user) the PFUser. 80 | The selector for the callback should look like: (PFUser *)user error:(NSError *)error 81 | @param twitterId The id of the Twitter user being linked 82 | @param screenName The screen name of the Twitter user being linked 83 | @param authToken The auth token for the user's session 84 | @param authTokenSecret The auth token secret for the user's session 85 | @param target Target object for the selector 86 | @param selector The selector that will be called when the asynchronous request is complete 87 | */ 88 | + (void)logInWithTwitterId:(NSString *)twitterId 89 | screenName:(NSString *)screenName 90 | authToken:(NSString *)authToken 91 | authTokenSecret:(NSString *)authTokenSecret 92 | target:(id)target 93 | selector:(SEL)selector; 94 | 95 | /** @name Linking Users with Twitter */ 96 | 97 | /*! 98 | Links Twitter to an existing PFUser. This method delegates to Twitter to authenticate 99 | the user, and then automatically links the account to the PFUser. 100 | @param user User to link to Twitter. 101 | */ 102 | + (void)linkUser:(PFUser *)user; 103 | 104 | /*! 105 | Links Twitter to an existing PFUser. This method delegates to Twitter to authenticate 106 | the user, and then automatically links the account to the PFUser. 107 | @param user User to link to Twitter. 108 | @param block The block to execute. The block should have the following argument signature: 109 | (BOOL *success, NSError *error) 110 | */ 111 | + (void)linkUser:(PFUser *)user block:(PFBooleanResultBlock)block; 112 | 113 | /*! 114 | Links Twitter to an existing PFUser. This method delegates to Twitter to authenticate 115 | the user, and then automatically links the account to the PFUser. 116 | The selector for the callback should look like: (NSNumber *)result error:(NSError *)error 117 | @param user User to link to Twitter. 118 | @param target Target object for the selector 119 | @param selector The selector that will be called when the asynchrounous request is complete. 120 | */ 121 | + (void)linkUser:(PFUser *)user 122 | target:(id)target 123 | selector:(SEL)selector; 124 | 125 | /*! 126 | Links Twitter to an existing PFUser. Allows you to handle user login to Twitter, then provide authentication 127 | data to link the account to the PFUser. 128 | @param user User to link to Twitter. 129 | @param twitterId The id of the Twitter user being linked 130 | @param screenName The screen name of the Twitter user being linked 131 | @param authToken The auth token for the user's session 132 | @param authTokenSecret The auth token secret for the user's session 133 | @param block The block to execute. The block should have the following argument signature: 134 | (BOOL *success, NSError *error) 135 | */ 136 | + (void)linkUser:(PFUser *)user 137 | twitterId:(NSString *)twitterId 138 | screenName:(NSString *)screenName 139 | authToken:(NSString *)authToken 140 | authTokenSecret:(NSString *)authTokenSecret 141 | block:(PFBooleanResultBlock)block; 142 | 143 | /*! 144 | Links Twitter to an existing PFUser. Allows you to handle user login to Twitter, then provide authentication 145 | data to link the account to the PFUser. 146 | The selector for the callback should look like: (NSNumber *)result error:(NSError *)error 147 | @param user User to link to Twitter. 148 | @param twitterId The id of the Twitter user being linked 149 | @param screenName The screen name of the Twitter user being linked 150 | @param authToken The auth token for the user's session 151 | @param authTokenSecret The auth token secret for the user's session 152 | @param target Target object for the selector 153 | @param selector The selector that will be called when the asynchronous request is complete 154 | */ 155 | + (void)linkUser:(PFUser *)user 156 | twitterId:(NSString *)twitterId 157 | screenName:(NSString *)screenName 158 | authToken:(NSString *)authToken 159 | authTokenSecret:(NSString *)authTokenSecret 160 | target:(id)target 161 | selector:(SEL)selector; 162 | 163 | /** @name Unlinking Users from Twitter */ 164 | 165 | /*! 166 | Unlinks the PFUser from a Twitter account. 167 | @param user User to unlink from Twitter. 168 | @result Returns true if the unlink was successful. 169 | */ 170 | + (BOOL)unlinkUser:(PFUser *)user; 171 | 172 | /*! 173 | Unlinks the PFUser from a Twitter account. 174 | @param user User to unlink from Twitter. 175 | @param error Error object to set on error. 176 | @result Returns true if the unlink was successful. 177 | */ 178 | + (BOOL)unlinkUser:(PFUser *)user error:(NSError **)error; 179 | 180 | /*! 181 | Makes an asynchronous request to unlink a user from a Twitter account. 182 | @param user User to unlink from Twitter. 183 | */ 184 | + (void)unlinkUserInBackground:(PFUser *)user; 185 | 186 | /*! 187 | Makes an asynchronous request to unlink a user from a Twitter account. 188 | @param user User to unlink from Twitter. 189 | @param block The block to execute. The block should have the following argument signature: (BOOL succeeded, NSError *error) 190 | */ 191 | + (void)unlinkUserInBackground:(PFUser *)user 192 | block:(PFBooleanResultBlock)block; 193 | 194 | /*! 195 | Makes an asynchronous request to unlink a user from a Twitter account. 196 | @param user User to unlink from Twitter 197 | @param target Target object for the selector 198 | @param selector The selector that will be called when the asynchrounous request is complete. 199 | */ 200 | + (void)unlinkUserInBackground:(PFUser *)user 201 | target:(id)target selector:(SEL)selector; 202 | 203 | @end 204 | -------------------------------------------------------------------------------- /HackerBoard/Parse.framework/Versions/1.2.19/Headers/PF_EGORefreshTableHeaderView.h: -------------------------------------------------------------------------------- 1 | // 2 | // EGORefreshTableHeaderView.h 3 | // Demo 4 | // 5 | // Created by Devin Doty on 10/14/09October14. 6 | // Copyright 2009 enormego. All rights reserved. 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | // THE SOFTWARE. 25 | // 26 | 27 | #import 28 | 29 | @protocol PF_EGORefreshTableHeaderDelegate; 30 | @interface PF_EGORefreshTableHeaderView : UIView 31 | 32 | @property (nonatomic,assign) id delegate; 33 | @property (nonatomic, retain, readonly) UILabel *lastUpdatedLabel; 34 | @property (nonatomic, retain, readonly) UILabel *statusLabel; 35 | @property (nonatomic, retain, readonly) UIActivityIndicatorView *activityView; 36 | 37 | - (void)refreshLastUpdatedDate; 38 | - (void)egoRefreshScrollViewDidScroll:(UIScrollView *)scrollView; 39 | - (void)egoRefreshScrollViewDidEndDragging:(UIScrollView *)scrollView; 40 | - (void)egoRefreshScrollViewDataSourceDidFinishedLoading:(UIScrollView *)scrollView; 41 | 42 | @end 43 | 44 | @protocol PF_EGORefreshTableHeaderDelegate 45 | - (void)egoRefreshTableHeaderDidTriggerRefresh:(PF_EGORefreshTableHeaderView*)view; 46 | - (BOOL)egoRefreshTableHeaderDataSourceIsLoading:(PF_EGORefreshTableHeaderView*)view; 47 | @optional 48 | - (NSDate*)egoRefreshTableHeaderDataSourceLastUpdated:(PF_EGORefreshTableHeaderView*)view; 49 | @end 50 | -------------------------------------------------------------------------------- /HackerBoard/Parse.framework/Versions/1.2.19/Headers/PF_Twitter.h: -------------------------------------------------------------------------------- 1 | // 2 | // PF_Twitter.h 3 | // Copyright (c) 2012 Parse, Inc. All rights reserved. 4 | // 5 | 6 | #import 7 | 8 | /*! 9 | A simple interface for interacting with the Twitter REST API, automating sign-in and OAuth signing of requests against the API. 10 | */ 11 | @interface PF_Twitter : NSObject { 12 | @private 13 | NSString *consumerKey; 14 | NSString *consumerSecret; 15 | NSString *authToken; 16 | NSString *authTokenSecret; 17 | NSString *userId; 18 | NSString *screenName; 19 | } 20 | 21 | @property (nonatomic, copy) NSString *consumerKey; 22 | @property (nonatomic, copy) NSString *consumerSecret; 23 | @property (nonatomic, copy) NSString *authToken; 24 | @property (nonatomic, copy) NSString *authTokenSecret; 25 | @property (nonatomic, copy) NSString *userId; 26 | @property (nonatomic, copy) NSString *screenName; 27 | 28 | /*! 29 | Displays an auth dialog and populates the authToken, authTokenSecret, userId, and screenName properties if the Twitter user 30 | grants permission to the application. 31 | @param success Invoked upon successful authorization. 32 | @param failure Invoked upon an error occurring in the authorization process. 33 | @param cancel Invoked when the user cancels authorization. 34 | */ 35 | - (void)authorizeWithSuccess:(void (^)(void))success failure:(void (^)(NSError *error))failure cancel:(void (^)(void))cancel; 36 | 37 | /*! 38 | Adds a 3-legged OAuth signature to an NSMutableURLRequest based upon the properties set for the Twitter object. Use this 39 | function to sign requests being made to the Twitter API. 40 | */ 41 | - (void)signRequest:(NSMutableURLRequest *)request; 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /HackerBoard/Parse.framework/Versions/1.2.19/Headers/Parse.h: -------------------------------------------------------------------------------- 1 | // 2 | // Parse.h 3 | // Parse 4 | // 5 | // Created by Ilya Sukhar on 9/29/11. 6 | // Copyright 2011 Parse, Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "PFACL.h" 11 | #import "PFAnalytics.h" 12 | #import "PFAnonymousUtils.h" 13 | #import "PFCloud.h" 14 | #import "PFConstants.h" 15 | #import "PFFile.h" 16 | #import "PFGeoPoint.h" 17 | #import "PFObject.h" 18 | #import "PFQuery.h" 19 | #import "PFRelation.h" 20 | #import "PFRole.h" 21 | #import "PFSubclassing.h" 22 | #import "PFUser.h" 23 | 24 | #if PARSE_IOS_ONLY 25 | #import "PFImageView.h" 26 | #import "PFInstallation.h" 27 | #import "PFLogInViewController.h" 28 | #import "PFProduct.h" 29 | #import "PFProductTableViewController.h" 30 | #import "PFPurchase.h" 31 | #import "PFPush.h" 32 | #import "PFQueryTableViewController.h" 33 | #import "PFSignUpViewController.h" 34 | #import "PFTableViewCell.h" 35 | #import "PFTwitterUtils.h" 36 | 37 | #if defined(__has_include) 38 | #if __has_include() 39 | #import 40 | #import "PFFacebookUtils.h" 41 | #else 42 | #define PFFacebookUtils Please_add_the_Facebook_SDK_to_your_project 43 | #endif 44 | #endif 45 | 46 | #endif 47 | 48 | @interface Parse : NSObject 49 | 50 | /** @name Connecting to Parse */ 51 | 52 | /*! 53 | Sets the applicationId and clientKey of your application. 54 | @param applicationId The application id for your Parse application. 55 | @param clientKey The client key for your Parse application. 56 | */ 57 | + (void)setApplicationId:(NSString *)applicationId clientKey:(NSString *)clientKey; 58 | + (NSString *)getApplicationId; 59 | + (NSString *)getClientKey; 60 | 61 | #if PARSE_IOS_ONLY 62 | /** @name Configuring UI Settings */ 63 | 64 | /*! 65 | Set whether to show offline messages when using a Parse view or view controller related classes. 66 | @param enabled Whether a UIAlert should be shown when the device is offline and network access is required 67 | from a view or view controller. 68 | */ 69 | + (void)offlineMessagesEnabled:(BOOL)enabled; 70 | 71 | /*! 72 | Set whether to show an error message when using a Parse view or view controller related classes 73 | and a Parse error was generated via a query. 74 | @param enabled Whether a UIAlert should be shown when a Parse error occurs. 75 | */ 76 | + (void)errorMessagesEnabled:(BOOL)enabled; 77 | #endif 78 | 79 | @end 80 | -------------------------------------------------------------------------------- /HackerBoard/Parse.framework/Versions/1.2.19/Parse: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HackingEDU/hackingedu-ios/6cde43b08ca8135defc3fe2029d8290c7a2ed6e0/HackerBoard/Parse.framework/Versions/1.2.19/Parse -------------------------------------------------------------------------------- /HackerBoard/Parse.framework/Versions/1.2.19/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | Parse 9 | CFBundleIdentifier 10 | com.parse.Parse 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | FMWK 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | 20 | 21 | -------------------------------------------------------------------------------- /HackerBoard/Parse.framework/Versions/1.2.19/Resources/Localizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HackingEDU/hackingedu-ios/6cde43b08ca8135defc3fe2029d8290c7a2ed6e0/HackerBoard/Parse.framework/Versions/1.2.19/Resources/Localizable.strings -------------------------------------------------------------------------------- /HackerBoard/Parse.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | 1.2.19 -------------------------------------------------------------------------------- /HackerBoard/Parse.framework/third_party_licenses.txt: -------------------------------------------------------------------------------- 1 | THE FOLLOWING SETS FORTH ATTRIBUTION NOTICES FOR THIRD PARTY SOFTWARE THAT MAY BE CONTAINED IN PORTIONS OF THE PARSE PRODUCT. 2 | 3 | ----- 4 | 5 | The following software may be included in this product: AFNetworking. This software contains the following license and notice below: 6 | 7 | Copyright (c) 2011 Gowalla (http://gowalla.com/) 8 | 9 | Permission is hereby granted, free of charge, to any person obtaining a copy 10 | of this software and associated documentation files (the "Software"), to deal 11 | in the Software without restriction, including without limitation the rights 12 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | copies of the Software, and to permit persons to whom the Software is 14 | furnished to do so, subject to the following conditions: 15 | 16 | The above copyright notice and this permission notice shall be included in 17 | all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | THE SOFTWARE. 26 | 27 | ----- 28 | 29 | The following software may be included in this product: EGOTableViewPullRefresh. This software contains the following license and notice below: 30 | 31 | // 32 | // EGORefreshTableHeaderView.h 33 | // Demo 34 | // 35 | // Created by Devin Doty on 10/14/09October14. 36 | // Copyright 2009 enormego. All rights reserved. 37 | // 38 | // Permission is hereby granted, free of charge, to any person obtaining a copy 39 | // of this software and associated documentation files (the "Software"), to deal 40 | // in the Software without restriction, including without limitation the rights 41 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 42 | // copies of the Software, and to permit persons to whom the Software is 43 | // furnished to do so, subject to the following conditions: 44 | // 45 | // The above copyright notice and this permission notice shall be included in 46 | // all copies or substantial portions of the Software. 47 | // 48 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 49 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 50 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 51 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 52 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 53 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 54 | // THE SOFTWARE. 55 | // 56 | 57 | ----- 58 | 59 | The following software may be included in this product: MBProgressHUD. This software contains the following license and notice below: 60 | 61 | Copyright (c) 2013 Matej Bukovinski 62 | 63 | Permission is hereby granted, free of charge, to any person obtaining a copy 64 | of this software and associated documentation files (the "Software"), to deal 65 | in the Software without restriction, including without limitation the rights 66 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 67 | copies of the Software, and to permit persons to whom the Software is 68 | furnished to do so, subject to the following conditions: 69 | 70 | The above copyright notice and this permission notice shall be included in 71 | all copies or substantial portions of the Software. 72 | 73 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 74 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 75 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 76 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 77 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 78 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 79 | THE SOFTWARE. 80 | 81 | ----- 82 | 83 | The following software may be included in this product: OAuthCore. This software contains the following license and notice below: 84 | 85 | Copyright (C) 2012 Loren Brichter 86 | 87 | 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: 88 | 89 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 90 | 91 | 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. 92 | 93 | ----- 94 | 95 | The following software may be included in this product: SBJson. This software contains the following license and notice below: 96 | 97 | Copyright (C) 2007-2011 Stig Brautaset. All rights reserved. 98 | 99 | Redistribution and use in source and binary forms, with or without 100 | modification, are permitted provided that the following conditions are met: 101 | 102 | * Redistributions of source code must retain the above copyright notice, this 103 | list of conditions and the following disclaimer. 104 | * Redistributions in binary form must reproduce the above copyright notice, 105 | this list of conditions and the following disclaimer in the documentation 106 | and/or other materials provided with the distribution. 107 | * Neither the name of the author nor the names of its contributors may be used 108 | to endorse or promote products derived from this software without specific 109 | prior written permission. 110 | 111 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 112 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 113 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 114 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 115 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 116 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 117 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 118 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 119 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 120 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /HackerBoard/Plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HackingEDU/hackingedu-ios/6cde43b08ca8135defc3fe2029d8290c7a2ed6e0/HackerBoard/Plus.png -------------------------------------------------------------------------------- /HackerBoard/ProfileTableView.h: -------------------------------------------------------------------------------- 1 | // 2 | // ProfileTableView.h 3 | // HackerBoard 4 | // 5 | // Created by Blake Tsuzaki on 4/12/14. 6 | // Copyright (c) 2014 Swag. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ProfileTableView : UITableView 12 | - (void)loadView; 13 | @end 14 | -------------------------------------------------------------------------------- /HackerBoard/ProfileTableView.m: -------------------------------------------------------------------------------- 1 | // 2 | // ProfileTableView.m 3 | // HackerBoard 4 | // 5 | // Created by Blake Tsuzaki on 4/12/14. 6 | // Copyright (c) 2014 Swag. All rights reserved. 7 | // 8 | 9 | #import "ProfileTableView.h" 10 | #import "AFIndexedCollectionView.h" 11 | #import "AFTableViewCell.h" 12 | #import 13 | 14 | @interface ProfileTableView() 15 | @property (nonatomic, strong) NSArray *colorArray; 16 | @property (nonatomic, strong) NSMutableDictionary *contentOffsetDictionary; 17 | @property (nonatomic, strong) NSArray *labels; 18 | @property (nonatomic, strong) NSMutableArray *data; 19 | @end 20 | 21 | @implementation ProfileTableView 22 | 23 | - (id)initWithFrame:(CGRect)frame 24 | { 25 | self = [super initWithFrame:frame]; 26 | if (self) { 27 | // Initialization code 28 | } 29 | return self; 30 | } 31 | 32 | -(void)loadView 33 | { 34 | self.data = [[NSMutableArray alloc] init]; 35 | 36 | self.labels = [[NSArray alloc] initWithObjects:@"Awards",@"Projects",@"Skills", nil]; 37 | const NSInteger numberOfTableViewRows = 4; 38 | const NSInteger numberOfCollectionViewCells = 15; 39 | 40 | NSMutableArray *mutableArray = [NSMutableArray arrayWithCapacity:numberOfTableViewRows]; 41 | 42 | for (NSInteger tableViewRow = 0; tableViewRow < numberOfTableViewRows; tableViewRow++) 43 | { 44 | NSMutableArray *colorArray = [[NSMutableArray alloc] init]; 45 | 46 | for (NSInteger collectionViewItem = 0; collectionViewItem < numberOfCollectionViewCells; collectionViewItem++) 47 | { 48 | 49 | CGFloat red = arc4random() % 255; 50 | CGFloat green = arc4random() % 255; 51 | CGFloat blue = arc4random() % 255; 52 | UIColor *color = [UIColor colorWithRed:red/255.0 green:green/255.0 blue:blue/255.0 alpha:1.0f]; 53 | 54 | [colorArray addObject:color]; 55 | } 56 | 57 | [mutableArray addObject:colorArray]; 58 | } 59 | [self setPagingEnabled:YES]; 60 | [self setShowsVerticalScrollIndicator:NO]; 61 | self.colorArray = [NSArray arrayWithArray:mutableArray]; 62 | self.contentOffsetDictionary = [NSMutableDictionary dictionary]; 63 | 64 | [self setBackgroundColor:[UIColor clearColor]]; 65 | 66 | } 67 | 68 | #pragma mark - UITableViewDataSource Methods 69 | 70 | -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 71 | { 72 | return self.colorArray.count; 73 | } 74 | 75 | -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 76 | { 77 | static NSString *CellIdentifier = @"CellIdentifier"; 78 | 79 | if (indexPath.row == 0){ 80 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; 81 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; 82 | [cell setSelectionStyle:UITableViewCellEditingStyleNone]; 83 | [cell setBackgroundColor:[UIColor clearColor]]; 84 | return cell; 85 | } 86 | 87 | AFTableViewCell *cell = (AFTableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier]; 88 | 89 | if (!cell) 90 | { 91 | cell = [[AFTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; 92 | [cell setSelectionStyle:UITableViewCellEditingStyleNone]; 93 | [cell setBackgroundColor:[UIColor colorWithWhite:1 alpha:1]]; 94 | [cell setType:indexPath.row-1]; 95 | UILabel *sectionLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 0, 310, 30)]; 96 | [sectionLabel setFont:[UIFont fontWithName:@"Helvetica Light" size:14.0]]; 97 | [sectionLabel setTextColor:[UIColor blackColor]]; 98 | [sectionLabel setText:[self.labels objectAtIndex:indexPath.row-1]]; 99 | [cell addSubview:sectionLabel]; 100 | } 101 | return cell; 102 | } 103 | 104 | -(void)tableView:(UITableView *)tableView willDisplayCell:(AFTableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath 105 | { 106 | if(indexPath.row != 0){ 107 | [cell setCollectionViewDataSourceDelegate:self index:indexPath.row]; 108 | NSInteger index = cell.collectionView.index; 109 | 110 | CGFloat horizontalOffset = [self.contentOffsetDictionary[[@(index) stringValue]] floatValue]; 111 | [cell.collectionView setContentOffset:CGPointMake(horizontalOffset, 0)]; 112 | } 113 | } 114 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ 115 | if(indexPath.row == 0){ 116 | [self setContentOffset:CGPointMake(0, -200) animated:YES]; 117 | } 118 | } 119 | #pragma mark - UITableViewDelegate Methods 120 | 121 | -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath 122 | { 123 | if(indexPath.row != 0) 124 | return 160; 125 | else 126 | return 200; 127 | } 128 | 129 | #pragma mark - UICollectionViewDataSource Methods 130 | 131 | -(NSInteger)collectionView:(AFIndexedCollectionView *)collectionView numberOfItemsInSection:(NSInteger)section 132 | { 133 | NSArray *collectionViewArray = self.colorArray[collectionView.index]; 134 | return collectionViewArray.count; 135 | } 136 | 137 | -(UICollectionViewCell *)collectionView:(AFIndexedCollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath 138 | { 139 | UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:CollectionViewCellIdentifier forIndexPath:indexPath]; 140 | 141 | NSArray *collectionViewArray = self.colorArray[collectionView.index]; 142 | cell.backgroundColor = collectionViewArray[indexPath.item]; 143 | if(collectionView.index == 1){ 144 | UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"star.png"]]; 145 | [imageView setFrame:CGRectMake(10, 10, 70, 70)]; 146 | [cell.contentView addSubview:imageView]; 147 | } 148 | 149 | return cell; 150 | } 151 | - (void)collectionView:(AFIndexedCollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{ 152 | [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithInteger:collectionView.type] forKey:@"Type"]; 153 | [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithInteger:indexPath.row] forKey:@"Object"]; 154 | [[NSNotificationCenter defaultCenter] postNotificationName:@"BaseDetail" object:self]; 155 | } 156 | 157 | #pragma mark - UIScrollViewDelegate Methods 158 | 159 | -(void)scrollViewDidScroll:(UIScrollView *)scrollView 160 | { 161 | if (![scrollView isKindOfClass:[AFIndexedCollectionView class]]) return; 162 | 163 | CGFloat horizontalOffset = scrollView.contentOffset.x; 164 | 165 | AFIndexedCollectionView *collectionView = (AFIndexedCollectionView *)scrollView; 166 | NSInteger index = collectionView.index; 167 | self.contentOffsetDictionary[[@(index) stringValue]] = @(horizontalOffset); 168 | } 169 | -(void)scrollViewWillBeginDragging:(UIScrollView *)scrollView{ 170 | if ([scrollView isKindOfClass:[AFIndexedCollectionView class]]){ 171 | CGPoint bottomOffset = CGPointMake(0, self.contentSize.height - self.bounds.size.height); 172 | [self setContentOffset:bottomOffset animated:YES]; 173 | [self setPagingEnabled:NO]; 174 | } 175 | } 176 | 177 | -(void)scrollViewWillBeginDecelerating:(UIScrollView *)scrollView{ 178 | if([scrollView isKindOfClass:[self class]]){ 179 | [self setPagingEnabled:YES]; 180 | if (scrollView.contentOffset.y<-90.0) 181 | [self setContentInset:UIEdgeInsetsMake(200, 0, 0, 0)]; 182 | } 183 | } 184 | 185 | @end 186 | -------------------------------------------------------------------------------- /HackerBoard/ProfileViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ProfileViewController.h 3 | // HackerBoard 4 | // 5 | // Created by Blake Tsuzaki on 4/12/14. 6 | // Copyright (c) 2014 Swag. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ProfileTableView.h" 11 | 12 | @interface ProfileViewController : UIViewController 13 | @property (strong, nonatomic) IBOutlet UIScrollView *backgroundView; 14 | @property (strong, nonatomic) IBOutlet UIImageView *profileImageView; 15 | @property (retain, nonatomic) IBOutlet ProfileTableView *tableView; 16 | @end 17 | -------------------------------------------------------------------------------- /HackerBoard/ProfileViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ProfileViewController.m 3 | // HackerBoard 4 | // 5 | // Created by Blake Tsuzaki on 4/12/14. 6 | // Copyright (c) 2014 Swag. All rights reserved. 7 | // 8 | 9 | #import "ProfileViewController.h" 10 | #import "AFTableViewCell.h" 11 | #import "AFIndexedCollectionView.h" 12 | #import "UIImage+RoundedImage.h" 13 | 14 | @interface ProfileViewController (){ 15 | BOOL moveRight; 16 | int i; 17 | } 18 | @property (strong, nonatomic) UILabel *nameLabel; 19 | @property (strong, nonatomic) UILabel *userLabel; 20 | @property (strong, nonatomic) UILabel *thirdLabel; 21 | @property (strong, nonatomic) NSArray *statsArray; 22 | 23 | @end 24 | 25 | @implementation ProfileViewController 26 | 27 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 28 | { 29 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 30 | if (self) { 31 | // Custom initialization 32 | } 33 | return self; 34 | } 35 | 36 | - (void)viewDidLoad 37 | { 38 | i = 0; 39 | [super viewDidLoad]; 40 | moveRight = YES; 41 | self.statsArray = [[NSUserDefaults standardUserDefaults] objectForKey:@"Stats"]; 42 | //NSLog(@"%@",self.statsArray); 43 | // Do any additional setup after loading the view. 44 | [[NSNotificationCenter defaultCenter] addObserver:self 45 | selector:@selector(pushToDetail) 46 | name:@"ProfileDetail" 47 | object:nil]; 48 | // Do any additional setup after loading the view. 49 | 50 | [NSURLConnection sendAsynchronousRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://www.gravatar.com/avatar/%@?s=256",[[NSUserDefaults standardUserDefaults] objectForKey:@"Pictureid"]]]] queue:[[NSOperationQueue alloc] init] completionHandler:^(NSURLResponse *response, NSData *data, NSError *connectionError) { 51 | if(!connectionError){ 52 | dispatch_async(dispatch_get_main_queue(), ^{ 53 | [self.profileImageView setAlpha:0.0]; 54 | [self.profileImageView setImage:[UIImage roundedImageWithImage:[UIImage imageWithData:data]]]; 55 | [UIView animateWithDuration:0.5 animations:^{ 56 | [self.profileImageView setAlpha:1.0]; 57 | }]; 58 | }); 59 | 60 | } 61 | 62 | }]; 63 | 64 | self.nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(150, 60+20, 160, 30)]; 65 | [self.nameLabel setAlpha:0.0]; 66 | //[self.nameLabel setBackgroundColor:[UIColor whiteColor]]; 67 | [self.nameLabel setFont:[UIFont fontWithName:@"Helvetica Light" size:24]]; 68 | [self.nameLabel setTextColor:[UIColor whiteColor]]; 69 | [self.nameLabel setTextAlignment:NSTextAlignmentCenter]; 70 | [self.nameLabel setText:[[NSUserDefaults standardUserDefaults] objectForKey:@"Username"]]; 71 | [self.view addSubview:self.nameLabel]; 72 | 73 | self.userLabel = [[UILabel alloc] initWithFrame:CGRectMake(150, 90+20, 160, 20)]; 74 | [self.userLabel setAlpha:0.0]; 75 | //[self.userLabel setBackgroundColor:[UIColor whiteColor]]; 76 | [self.userLabel setFont:[UIFont fontWithName:@"Helvetica Light" size:14]]; 77 | [self.userLabel setTextColor:[UIColor whiteColor]]; 78 | [self.userLabel setTextAlignment:NSTextAlignmentCenter]; 79 | [self.userLabel setText:[[NSUserDefaults standardUserDefaults] objectForKey:@"Name"]]; 80 | [self.view addSubview:self.userLabel]; 81 | 82 | self.thirdLabel = [[UILabel alloc] initWithFrame:CGRectMake(150, 150, 160, 20)]; 83 | [self.thirdLabel setAlpha:0.0]; 84 | //[self.thirdLabel setBackgroundColor:[UIColor whiteColor]]; 85 | [self.thirdLabel setFont:[UIFont fontWithName:@"Helvetica Light" size:14]]; 86 | [self.thirdLabel setTextColor:[UIColor whiteColor]]; 87 | [self.thirdLabel setTextAlignment:NSTextAlignmentCenter]; 88 | [self.thirdLabel setText:[[NSUserDefaults standardUserDefaults] objectForKey:@"Name"]]; 89 | [self.view addSubview:self.thirdLabel]; 90 | 91 | [UIView animateWithDuration:0.5 animations:^{ 92 | [self.nameLabel setFrame:CGRectMake(150, 60, 160, 30)]; 93 | [self.nameLabel setAlpha:1.0]; 94 | } completion:^(BOOL finished){ 95 | [self performSelector:@selector(cycleText) withObject:nil afterDelay:1.0]; 96 | }]; 97 | [UIView animateWithDuration:0.5 delay:0.2 options:UIViewAnimationOptionCurveEaseOut animations:^{ 98 | [self.userLabel setFrame:CGRectMake(150, 85, 160, 20)]; 99 | [self.userLabel setAlpha:1.0]; 100 | } completion:nil]; 101 | 102 | 103 | self.backgroundView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 320, 440 )]; 104 | [self.backgroundView setPagingEnabled:YES]; 105 | [self.backgroundView setBackgroundColor:[UIColor blackColor]]; 106 | [self.backgroundView setContentSize:CGSizeMake(320*3, 440)]; 107 | [self.view addSubview:self.backgroundView]; 108 | [self.view sendSubviewToBack:self.backgroundView]; 109 | for (int i = 0; i<3; i++){ 110 | UIImageView *image = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"pauley.jpg"]]; 111 | [image setContentMode:UIViewContentModeScaleAspectFill]; 112 | [image setClipsToBounds:YES]; 113 | [image setFrame:CGRectMake(320*i, 0, 320, 440)]; 114 | [self.backgroundView addSubview:image]; 115 | } 116 | /* 117 | dispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ 118 | [self startSlideshow]; 119 | }); 120 | */ 121 | 122 | self.tableView = [[ProfileTableView alloc] initWithFrame:CGRectMake(0, 0, 320, 504)]; 123 | [self.view addSubview:self.tableView]; 124 | [self.tableView setDelegate:self.tableView]; 125 | [self.tableView setDataSource:self.tableView]; 126 | [self.tableView loadView]; 127 | 128 | } 129 | 130 | - (void)startSlideshow{ 131 | while(1){ 132 | sleep(2); 133 | if(moveRight){ 134 | [self.backgroundView setContentOffset:CGPointMake(self.backgroundView.contentOffset.x+320, 0) animated:YES]; 135 | moveRight = NO; 136 | } 137 | else{ 138 | [self.backgroundView setContentOffset:CGPointMake(0, 0) animated:YES]; 139 | moveRight = YES; 140 | } 141 | } 142 | } 143 | 144 | - (void)cycleText{ 145 | if(i<[self.statsArray count]-1){ 146 | i++; 147 | } 148 | else{ 149 | i = 0; 150 | } 151 | if([self.statsArray objectAtIndex:i] != nil) 152 | [self.thirdLabel setText:[self.statsArray objectAtIndex:i]]; 153 | 154 | [UIView animateWithDuration:0.5 animations:^{ 155 | [self.thirdLabel setAlpha:1.0]; 156 | } completion:^(BOOL finished){ 157 | [UIView animateWithDuration:0.5 delay:1 options:UIViewAnimationOptionCurveLinear animations:^{ 158 | [self.thirdLabel setAlpha:0.0]; 159 | } completion:^(BOOL finished) { 160 | [self cycleText]; 161 | }]; 162 | }]; 163 | } 164 | 165 | - (void)pushToDetail{ 166 | [self performSegueWithIdentifier:@"DetailViewSegue" sender:self]; 167 | } 168 | 169 | 170 | 171 | - (void)didReceiveMemoryWarning 172 | { 173 | [super didReceiveMemoryWarning]; 174 | // Dispose of any resources that can be recreated. 175 | } 176 | 177 | /* 178 | #pragma mark - Navigation 179 | 180 | // In a storyboard-based application, you will often want to do a little preparation before navigation 181 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender 182 | { 183 | // Get the new view controller using [segue destinationViewController]. 184 | // Pass the selected object to the new view controller. 185 | } 186 | */ 187 | 188 | @end 189 | -------------------------------------------------------------------------------- /HackerBoard/SCU.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HackingEDU/hackingedu-ios/6cde43b08ca8135defc3fe2029d8290c7a2ed6e0/HackerBoard/SCU.jpg -------------------------------------------------------------------------------- /HackerBoard/SizerView.h: -------------------------------------------------------------------------------- 1 | // 2 | // SizerView.h 3 | // Github-Auth-iOS 4 | // 5 | // Created by buza on 9/27/12. 6 | // Copyright (c) 2012 BuzaMoto. All rights reserved. 7 | // 8 | // Redistribution and use in source and binary forms, with or without 9 | // modification, are permitted provided that the following conditions are met: 10 | // 11 | // 1. Redistributions of source code must retain the above copyright notice, 12 | // this list of conditions and the following disclaimer. 13 | // 2. Redistributions in binary form must reproduce the above copyright notice, 14 | // this list of conditions and the following disclaimer in the documentation 15 | // and/or other materials provided with the distribution. 16 | // 17 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 21 | // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | // POSSIBILITY OF SUCH DAMAGE. 28 | 29 | #import 30 | 31 | #import "GithubAuthController.h" 32 | 33 | @interface SizerView : UIView 34 | 35 | - (id)initWithFrame:(CGRect)frame frameChangeDelegate:(id)_delegate; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /HackerBoard/SizerView.m: -------------------------------------------------------------------------------- 1 | // 2 | // SizerView.m 3 | // Github-Auth-iOS 4 | // 5 | // Created by buza on 9/27/12. 6 | // Copyright (c) 2012 BuzaMoto. All rights reserved. 7 | // 8 | // Redistribution and use in source and binary forms, with or without 9 | // modification, are permitted provided that the following conditions are met: 10 | // 11 | // 1. Redistributions of source code must retain the above copyright notice, 12 | // this list of conditions and the following disclaimer. 13 | // 2. Redistributions in binary form must reproduce the above copyright notice, 14 | // this list of conditions and the following disclaimer in the documentation 15 | // and/or other materials provided with the distribution. 16 | // 17 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 21 | // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | // POSSIBILITY OF SUCH DAMAGE. 28 | 29 | #import "SizerView.h" 30 | 31 | @interface SizerView() 32 | @property(nonatomic, weak) id delegate; 33 | @end 34 | 35 | @implementation SizerView 36 | 37 | @synthesize delegate; 38 | 39 | - (id)initWithFrame:(CGRect)frame frameChangeDelegate:(id)_delegate 40 | { 41 | self = [super initWithFrame:frame]; 42 | if (self) 43 | { 44 | self.delegate = _delegate; 45 | } 46 | return self; 47 | } 48 | 49 | -(void) layoutSubviews 50 | { 51 | [self.delegate frameChanged:self.frame]; 52 | } 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /HackerBoard/TeamViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // TeamViewController.h 3 | // HackerBoard 4 | // 5 | // Created by Blake Tsuzaki on 4/12/14. 6 | // Copyright (c) 2014 Swag. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TeamViewController : UIViewController 12 | @property (strong, nonatomic) IBOutlet UITextField *searchField; 13 | @property (strong, nonatomic) IBOutlet UIActivityIndicatorView *activityIndicator; 14 | - (IBAction)shareButtonPressed:(id)sender; 15 | @end 16 | -------------------------------------------------------------------------------- /HackerBoard/TeamViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // TeamViewController.m 3 | // HackerBoard 4 | // 5 | // Created by Blake Tsuzaki on 4/12/14. 6 | // Copyright (c) 2014 Swag. All rights reserved. 7 | // 8 | 9 | #import "TeamViewController.h" 10 | #import "UserSearchViewController.h" 11 | #import "UIImage+RoundedImage.h" 12 | @interface TeamViewController () 13 | @property (strong, nonatomic) NSMutableArray *teamNames; 14 | @property (strong, nonatomic) NSMutableArray *teamPics; 15 | @property (strong, nonatomic) NSMutableArray *teamViews; 16 | @end 17 | 18 | @implementation TeamViewController 19 | 20 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 21 | { 22 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 23 | if (self) { 24 | // Custom initialization 25 | } 26 | return self; 27 | } 28 | 29 | - (void)viewDidLoad 30 | { 31 | [super viewDidLoad]; 32 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(addMember:) name:@"AddMember" object:nil]; 33 | self.teamNames = [[NSUserDefaults standardUserDefaults] objectForKey:@"TeamNames"]; 34 | self.teamPics =[[NSUserDefaults standardUserDefaults] objectForKey:@"TeamPics"]; 35 | self.teamViews = [[NSMutableArray alloc] init]; 36 | [self.activityIndicator setHidesWhenStopped:YES]; 37 | self.searchField.delegate = self; 38 | // Do any additional setup after loading the view. 39 | [self loadTeam]; 40 | } 41 | 42 | - (void)loadTeam{ 43 | for (int i = 0; i<[self.teamNames count]; i++){ 44 | UIView *memberView = [[UIView alloc] initWithFrame:CGRectMake(320, 100, 80, 120)]; 45 | [memberView setClipsToBounds:YES]; 46 | UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 80, 80)]; 47 | [memberView addSubview:imageView]; 48 | [NSURLConnection sendAsynchronousRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://www.gravatar.com/avatar/%@?s=256",[self.teamPics objectAtIndex:i]]]] queue:[[NSOperationQueue alloc] init] completionHandler:^(NSURLResponse *response, NSData *data, NSError *connectionError) { 49 | if(!connectionError){ 50 | dispatch_async(dispatch_get_main_queue(), ^{ 51 | [imageView setImage:[UIImage roundedImageWithImage:[UIImage imageWithData:data]]]; 52 | }); 53 | 54 | } 55 | 56 | }]; 57 | UILabel *nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 80, 80, 22)]; 58 | [nameLabel setText:[self.teamNames objectAtIndex:i]]; 59 | [nameLabel setFont:[UIFont fontWithName:@"Helvetica Light" size:14]]; 60 | [nameLabel setTextAlignment:NSTextAlignmentCenter]; 61 | [memberView addSubview:nameLabel]; 62 | [self.view addSubview:memberView]; 63 | [self.teamViews addObject:memberView]; 64 | } 65 | [self arrangeTeam]; 66 | } 67 | 68 | - (void) addMember:(NSNotification *)notification{ 69 | UIView *memberView = [[UIView alloc] initWithFrame:CGRectMake(320, 100, 80, 120)]; 70 | [memberView setClipsToBounds:YES]; 71 | UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 80, 80)]; 72 | [memberView addSubview:imageView]; 73 | [NSURLConnection sendAsynchronousRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://www.gravatar.com/avatar/%@?s=256",[notification.object objectForKey:@"gravatar_id"]]]] queue:[[NSOperationQueue alloc] init] completionHandler:^(NSURLResponse *response, NSData *data, NSError *connectionError) { 74 | if(!connectionError){ 75 | dispatch_async(dispatch_get_main_queue(), ^{ 76 | [imageView setImage:[UIImage roundedImageWithImage:[UIImage imageWithData:data]]]; 77 | }); 78 | 79 | } 80 | 81 | }]; 82 | UILabel *nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 80, 80, 22)]; 83 | [nameLabel setBackgroundColor:[UIColor whiteColor]]; 84 | [nameLabel setText:[notification.object objectForKey:@"login"]]; 85 | [nameLabel setFont:[UIFont fontWithName:@"Helvetica Light" size:14]]; 86 | [nameLabel setTextAlignment:NSTextAlignmentCenter]; 87 | [memberView addSubview:nameLabel]; 88 | [self.view addSubview:memberView]; 89 | [self.teamViews addObject:memberView]; 90 | [self arrangeTeam]; 91 | } 92 | 93 | - (void) arrangeTeam{ 94 | for (int j = 0; j<[self.teamViews count]; j++){ 95 | [UIView animateWithDuration:0.5 delay:0.0 options:UIViewAnimationOptionCurveEaseOut animations:^{ 96 | [[self.teamViews objectAtIndex:j] setCenter:CGPointMake(((j+1.0)/([self.teamViews count]+1.0))*320, 160)]; 97 | } completion:nil]; 98 | } 99 | } 100 | 101 | - (BOOL)textFieldShouldReturn:(UITextField *)textField 102 | { 103 | [textField resignFirstResponder]; 104 | [self searchUsers]; 105 | return YES; 106 | } 107 | 108 | - (void)searchUsers{ 109 | [self.activityIndicator startAnimating]; 110 | 111 | NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://api.github.com/users/%@",self.searchField.text]]]; 112 | [request setHTTPMethod:@"GET"]; 113 | [request setValue:@"application/json" forHTTPHeaderField:@"Accept"]; 114 | 115 | NSError *error = nil; 116 | NSHTTPURLResponse *responseCode = nil; 117 | 118 | NSData *data = [NSURLConnection sendSynchronousRequest:request returningResponse:&responseCode error:&error]; 119 | NSError *err; 120 | id val = [NSJSONSerialization JSONObjectWithData:data options:0 error:&err]; 121 | 122 | if(!err && !error && val && [NSJSONSerialization isValidJSONObject:val]) 123 | { 124 | NSLog(@"%@",val); 125 | if([val objectForKey:@"message"] == nil){ 126 | [self performSegueWithIdentifier:@"User Found" sender:self]; 127 | [self.activityIndicator stopAnimating]; 128 | [[NSNotificationCenter defaultCenter] postNotificationName:@"LoadSearchResult" object:val]; 129 | } 130 | else{ 131 | UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"User Not Found" message:@"" delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil]; 132 | [alertView show]; 133 | [self.activityIndicator stopAnimating]; 134 | } 135 | 136 | } 137 | else{ 138 | UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Error" message:[error localizedDescription] delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil]; 139 | [alertView show]; 140 | [self.activityIndicator stopAnimating]; 141 | } 142 | 143 | } 144 | 145 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ 146 | [self.view endEditing:YES]; 147 | [super touchesBegan:touches withEvent:event]; 148 | } 149 | 150 | - (void)didReceiveMemoryWarning 151 | { 152 | [super didReceiveMemoryWarning]; 153 | // Dispose of any resources that can be recreated. 154 | } 155 | 156 | - (IBAction)shareButtonPressed:(id)sender { 157 | 158 | UIActivityViewController* activityViewController = 159 | [[UIActivityViewController alloc] initWithActivityItems:[NSArray arrayWithObject:@"Hi"] 160 | applicationActivities:nil]; 161 | [self presentViewController:activityViewController animated:YES completion:^{}]; 162 | } 163 | 164 | /* 165 | #pragma mark - Navigation 166 | 167 | // In a storyboard-based application, you will often want to do a little preparation before navigation 168 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender 169 | { 170 | // Get the new view controller using [segue destinationViewController]. 171 | // Pass the selected object to the new view controller. 172 | } 173 | */ 174 | 175 | @end 176 | -------------------------------------------------------------------------------- /HackerBoard/UIImage+RoundedImage.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+RoundedImage.h 3 | // GreenPaw 4 | // 5 | // Created by Nikolay Dyankov on 7/10/13. 6 | // Copyright (c) 2013 Nikolay Dyankov. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIImage (RoundedImage) 12 | 13 | + (UIImage *)roundedImageWithImage:(UIImage *)image; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /HackerBoard/UIImage+RoundedImage.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+RoundedImage.m 3 | // GreenPaw 4 | // 5 | // Created by Nikolay Dyankov on 7/10/13. 6 | // Copyright (c) 2013 Nikolay Dyankov. All rights reserved. 7 | // 8 | 9 | #import "UIImage+RoundedImage.h" 10 | 11 | @implementation UIImage (RoundedImage) 12 | 13 | + (BOOL)hasAlpha: (UIImage *)image { 14 | CGImageAlphaInfo alpha = CGImageGetAlphaInfo(image.CGImage); 15 | return (alpha == kCGImageAlphaFirst || 16 | alpha == kCGImageAlphaLast || 17 | alpha == kCGImageAlphaPremultipliedFirst || 18 | alpha == kCGImageAlphaPremultipliedLast); 19 | } 20 | 21 | + (UIImage *)roundedImageWithImage:(UIImage *)image { 22 | if (image) { 23 | if (![self hasAlpha:image]) { 24 | 25 | CGImageRef imageRef = image.CGImage; 26 | size_t width = CGImageGetWidth(imageRef); 27 | size_t height = CGImageGetHeight(imageRef); 28 | 29 | // The bitsPerComponent and bitmapInfo values are hard-coded to prevent an "unsupported parameter combination" error 30 | CGContextRef offscreenContext = CGBitmapContextCreate(NULL, 31 | width, 32 | height, 33 | 8, 34 | 0, 35 | CGImageGetColorSpace(imageRef), 36 | kCGBitmapByteOrderDefault | kCGImageAlphaPremultipliedFirst); 37 | 38 | // Draw the image into the context and retrieve the new image, which will now have an alpha layer 39 | CGContextDrawImage(offscreenContext, CGRectMake(0, 0, width, height), imageRef); 40 | CGImageRef imageRefWithAlpha = CGBitmapContextCreateImage(offscreenContext); 41 | image = [UIImage imageWithCGImage:imageRefWithAlpha]; 42 | 43 | // Clean up 44 | CGContextRelease(offscreenContext); 45 | CGImageRelease(imageRefWithAlpha); 46 | } 47 | 48 | CGContextRef cx = CGBitmapContextCreate(NULL, image.size.width, image.size.height, CGImageGetBitsPerComponent(image.CGImage), 0, CGImageGetColorSpace(image.CGImage), CGImageGetBitmapInfo(image.CGImage)); 49 | 50 | CGContextBeginPath(cx); 51 | CGRect pathRect; 52 | /* 53 | if (image.size.width > image.size.height){ 54 | pathRect = CGRectMake(((image.size.height/2)-(image.size.width/4)), 0, image.size.height, image.size.height); 55 | } 56 | else{ 57 | pathRect = CGRectMake(0, 0, image.size.width, image.size.width); 58 | }*/ 59 | pathRect = CGRectMake(0, 0, image.size.width, image.size.width); 60 | CGContextAddEllipseInRect(cx, pathRect); 61 | CGContextClosePath(cx); 62 | CGContextClip(cx); 63 | 64 | CGContextDrawImage(cx, CGRectMake(0, 0, image.size.width, image.size.height), image.CGImage); 65 | 66 | CGImageRef clippedImage = CGBitmapContextCreateImage(cx); 67 | CGContextRelease(cx); 68 | 69 | UIImage *roundedImage = [UIImage imageWithCGImage:clippedImage]; 70 | CGImageRelease(clippedImage); 71 | 72 | 73 | return roundedImage; 74 | } 75 | 76 | return nil; 77 | } 78 | 79 | @end 80 | -------------------------------------------------------------------------------- /HackerBoard/UserSearchViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UserSearchViewController.h 3 | // HackerBoard 4 | // 5 | // Created by Blake Tsuzaki on 4/13/14. 6 | // Copyright (c) 2014 Swag. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UserSearchViewController : UIViewController 12 | - (IBAction)closeButtonPressed:(id)sender; 13 | @property (strong, nonatomic) IBOutlet UIButton *closeButton; 14 | @property (strong, nonatomic) IBOutlet UIImageView *userImage; 15 | @property (strong, nonatomic) IBOutlet UILabel *userNameLabel; 16 | @property (strong, nonatomic) IBOutlet UILabel *secondLabel; 17 | - (IBAction)addToTeam:(id)sender; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /HackerBoard/UserSearchViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // UserSearchViewController.m 3 | // HackerBoard 4 | // 5 | // Created by Blake Tsuzaki on 4/13/14. 6 | // Copyright (c) 2014 Swag. All rights reserved. 7 | // 8 | 9 | #import "UserSearchViewController.h" 10 | #import 11 | #import "UIImage+RoundedImage.h" 12 | 13 | @interface UserSearchViewController (){ 14 | int i; 15 | } 16 | @property (strong, nonatomic) NSArray *statsArray; 17 | @property (strong, nonatomic) NSObject *user; 18 | @end 19 | 20 | @implementation UserSearchViewController 21 | 22 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 23 | { 24 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 25 | if (self) { 26 | // Custom initialization 27 | } 28 | return self; 29 | } 30 | 31 | - (void)viewDidLoad 32 | { 33 | i = 0; 34 | [super viewDidLoad]; 35 | [self.secondLabel setAlpha:0]; 36 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(loadData:) name:@"LoadSearchResult" object:nil]; 37 | // Do any additional setup after loading the view. 38 | [self flashOn:self.closeButton]; 39 | 40 | } 41 | 42 | - (void)loadData:(NSNotification *)notification{ 43 | self.user = notification.object; 44 | self.statsArray = [NSArray arrayWithObjects:[NSString stringWithFormat:@"%@ Followers",[notification.object objectForKey:@"followers"]],[NSString stringWithFormat:@"Following %@",[notification.object objectForKey:@"followers"]],[notification.object objectForKey:@"company"],[notification.object objectForKey:@"email"],[notification.object objectForKey:@"location"], nil]; 45 | 46 | [NSURLConnection sendAsynchronousRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://www.gravatar.com/avatar/%@?s=256",[notification.object objectForKey:@"gravatar_id"]]]] queue:[[NSOperationQueue alloc] init] completionHandler:^(NSURLResponse *response, NSData *data, NSError *connectionError) { 47 | if(!connectionError){ 48 | dispatch_async(dispatch_get_main_queue(), ^{ 49 | [self.userImage setImage:[UIImage roundedImageWithImage:[UIImage imageWithData:data]]]; 50 | }); 51 | 52 | } 53 | 54 | }]; 55 | 56 | [self.userNameLabel setText:[notification.object objectForKey:@"name"]]; 57 | [self performSelector:@selector(cycleText) withObject:nil afterDelay:1.0]; 58 | 59 | } 60 | 61 | - (void)cycleText{ 62 | if(i<[self.statsArray count]-1){ 63 | i++; 64 | } 65 | else{ 66 | i = 0; 67 | } 68 | if([self.statsArray objectAtIndex:i] != nil) 69 | [self.secondLabel setText:[self.statsArray objectAtIndex:i]]; 70 | 71 | [UIView animateWithDuration:0.5 animations:^{ 72 | [self.secondLabel setAlpha:1.0]; 73 | } completion:^(BOOL finished){ 74 | [UIView animateWithDuration:0.5 delay:1 options:UIViewAnimationOptionCurveLinear animations:^{ 75 | [self.secondLabel setAlpha:0.0]; 76 | } completion:^(BOOL finished) { 77 | [self cycleText]; 78 | }]; 79 | }]; 80 | } 81 | 82 | 83 | - (void)flashOff:(UIView *)v 84 | { 85 | [UIView animateWithDuration:1.5 delay:0 options:UIViewAnimationOptionAllowUserInteraction animations:^ { 86 | v.alpha = .1; //don't animate alpha to 0, otherwise you won't be able to interact with it 87 | } completion:^(BOOL finished) { 88 | [self flashOn:v]; 89 | }]; 90 | } 91 | 92 | - (void)flashOn:(UIView *)v 93 | { 94 | [UIView animateWithDuration:1.5 delay:0 options:UIViewAnimationOptionAllowUserInteraction animations:^ { 95 | v.alpha = 0.8; 96 | } completion:^(BOOL finished) { 97 | [self flashOff:v]; 98 | }]; 99 | } 100 | 101 | - (void)didReceiveMemoryWarning 102 | { 103 | [super didReceiveMemoryWarning]; 104 | // Dispose of any resources that can be recreated. 105 | } 106 | 107 | /* 108 | #pragma mark - Navigation 109 | 110 | // In a storyboard-based application, you will often want to do a little preparation before navigation 111 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender 112 | { 113 | // Get the new view controller using [segue destinationViewController]. 114 | // Pass the selected object to the new view controller. 115 | } 116 | */ 117 | - (IBAction)closeButtonPressed:(id)sender { 118 | [self dismissViewControllerAnimated:YES completion:nil]; 119 | } 120 | 121 | - (IBAction)addToTeam:(id)sender { 122 | [[NSNotificationCenter defaultCenter] postNotificationName:@"AddMember" object:self.user]; 123 | [self dismissViewControllerAnimated:YES completion:nil]; 124 | } 125 | @end 126 | -------------------------------------------------------------------------------- /HackerBoard/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /HackerBoard/lahacks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HackingEDU/hackingedu-ios/6cde43b08ca8135defc3fe2029d8290c7a2ed6e0/HackerBoard/lahacks.png -------------------------------------------------------------------------------- /HackerBoard/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // HackerBoard 4 | // 5 | // Created by Blake Tsuzaki on 4/12/14. 6 | // Copyright (c) 2014 Swag. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "HackrBoardv1_1AppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([HackrBoardv1_1AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /HackerBoard/pauley.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HackingEDU/hackingedu-ios/6cde43b08ca8135defc3fe2029d8290c7a2ed6e0/HackerBoard/pauley.jpg -------------------------------------------------------------------------------- /HackerBoard/star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HackingEDU/hackingedu-ios/6cde43b08ca8135defc3fe2029d8290c7a2ed6e0/HackerBoard/star.png -------------------------------------------------------------------------------- /HackerBoardTests/HackerBoardTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.Swag.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /HackerBoardTests/HackerBoardTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // HackerBoardTests.m 3 | // HackerBoardTests 4 | // 5 | // Created by Blake Tsuzaki on 4/12/14. 6 | // Copyright (c) 2014 Swag. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HackerBoardTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation HackerBoardTests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /HackerBoardTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | --------------------------------------------------------------------------------