Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added slide menu, Facebook connectivity (needs work)

  • Loading branch information...
commit 012eb3e9730f7d4a64876efd48598fc30d58b70a 1 parent 4dc171c
fqassem fqassem authored

Showing 29 changed files with 704 additions and 147 deletions. Show diff stats Hide diff stats

  1. 0  .gitignore
  2. +97 3 ar-project.xcodeproj/project.pbxproj
  3. BIN  ar-project/.DS_Store
  4. +29 15 ar-project/ARViewController.h
  5. +144 38 ar-project/ARViewController.m
  6. +9 1 ar-project/AppDelegate.h
  7. +38 25 ar-project/AppDelegate.m
  8. 0  ar-project/CLLocation+HeadingFromLocation.h
  9. 0  ar-project/CLLocation+HeadingFromLocation.m
  10. 0  ar-project/MapViewController.h
  11. 0  ar-project/MapViewController.m
  12. +22 0 ar-project/Picture.h
  13. +24 0 ar-project/Picture.m
  14. +37 0 ar-project/SlideMenu.h
  15. +129 0 ar-project/SlideMenu.m
  16. +9 0 ar-project/ar-project-Info.plist
  17. 0  ar-project/ar-project-Prefix.pch
  18. 0  ar-project/brooks_hall_1936.jpg
  19. +4 4 ar-project/data.plist
  20. 0  ar-project/en.lproj/InfoPlist.strings
  21. +162 61 ar-project/en.lproj/MainStoryboard_iPad.storyboard
  22. 0  ar-project/en.lproj/MainStoryboard_iPhone.storyboard
  23. 0  ar-project/main.m
  24. 0  ar-project/tab_ar.png
  25. 0  ar-project/tab_ar@2x.png
  26. 0  ar-project/tab_list.png
  27. 0  ar-project/tab_list@2x.png
  28. 0  ar-project/tab_map.png
  29. 0  ar-project/tab_map@2x.png
0  .gitignore 100644 → 100755
File mode changed
100 ar-project.xcodeproj/project.pbxproj 100644 → 100755
@@ -7,6 +7,10 @@
7 7 objects = {
8 8
9 9 /* Begin PBXBuildFile section */
  10 + CE6DACA5158CE7AC0030158A /* SlideMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = CE6DACA4158CE7AC0030158A /* SlideMenu.m */; };
  11 + CE6E5A15158EB0E300752FE5 /* FBDialog.bundle in Resources */ = {isa = PBXBuildFile; fileRef = CE6E5A08158EB0E300752FE5 /* FBDialog.bundle */; };
  12 + CE6E5A16158EB0E300752FE5 /* libfacebook_ios_sdk.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CE6E5A0E158EB0E300752FE5 /* libfacebook_ios_sdk.a */; };
  13 + CE6E5A6B158EC95B00752FE5 /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = CE6E5A6A158EC95B00752FE5 /* libxml2.dylib */; };
10 14 DD0E2C2C157EC2B700F3AAF9 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD0E2C2B157EC2B700F3AAF9 /* UIKit.framework */; };
11 15 DD0E2C2E157EC2B700F3AAF9 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD0E2C2D157EC2B700F3AAF9 /* Foundation.framework */; };
12 16 DD0E2C30157EC2B700F3AAF9 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD0E2C2F157EC2B700F3AAF9 /* CoreGraphics.framework */; };
@@ -24,6 +28,7 @@
24 28 DD0E2C6A157EC95000F3AAF9 /* ARViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DD0E2C69157EC95000F3AAF9 /* ARViewController.m */; };
25 29 DD0E2C6C157ECA1900F3AAF9 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD0E2C6B157ECA1900F3AAF9 /* AVFoundation.framework */; };
26 30 DD0E2C6F157ECBB200F3AAF9 /* brooks_hall_1936.jpg in Resources */ = {isa = PBXBuildFile; fileRef = DD0E2C6E157ECBB200F3AAF9 /* brooks_hall_1936.jpg */; };
  31 + DD34EA2115894FFC00740B4C /* Picture.m in Sources */ = {isa = PBXBuildFile; fileRef = DD34EA2015894FFC00740B4C /* Picture.m */; };
27 32 DD79FF24158188C2001597D0 /* CLLocation+HeadingFromLocation.m in Sources */ = {isa = PBXBuildFile; fileRef = DD79FF23158188C2001597D0 /* CLLocation+HeadingFromLocation.m */; };
28 33 DD847ADA157FD2C100855FEA /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD847AD9157FD2C100855FEA /* CoreLocation.framework */; };
29 34 DDAC61971587BB2300D2E484 /* data.plist in Resources */ = {isa = PBXBuildFile; fileRef = DDAC61961587BB2300D2E484 /* data.plist */; };
@@ -32,6 +37,24 @@
32 37 /* End PBXBuildFile section */
33 38
34 39 /* Begin PBXFileReference section */
  40 + CE6DACA3158CE7AC0030158A /* SlideMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlideMenu.h; sourceTree = "<group>"; };
  41 + CE6DACA4158CE7AC0030158A /* SlideMenu.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SlideMenu.m; sourceTree = "<group>"; };
  42 + CE6E5A06158EB0E300752FE5 /* Facebook.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Facebook.h; sourceTree = "<group>"; };
  43 + CE6E5A07158EB0E300752FE5 /* FBConnect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBConnect.h; sourceTree = "<group>"; };
  44 + CE6E5A08158EB0E300752FE5 /* FBDialog.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = FBDialog.bundle; sourceTree = "<group>"; };
  45 + CE6E5A09158EB0E300752FE5 /* FBDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBDialog.h; sourceTree = "<group>"; };
  46 + CE6E5A0A158EB0E300752FE5 /* FBFrictionlessRequestSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBFrictionlessRequestSettings.h; sourceTree = "<group>"; };
  47 + CE6E5A0B158EB0E300752FE5 /* FBLoginDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBLoginDialog.h; sourceTree = "<group>"; };
  48 + CE6E5A0C158EB0E300752FE5 /* FBRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBRequest.h; sourceTree = "<group>"; };
  49 + CE6E5A0D158EB0E300752FE5 /* JSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSON.h; sourceTree = "<group>"; };
  50 + CE6E5A0E158EB0E300752FE5 /* libfacebook_ios_sdk.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libfacebook_ios_sdk.a; sourceTree = "<group>"; };
  51 + CE6E5A0F158EB0E300752FE5 /* NSObject+SBJSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+SBJSON.h"; sourceTree = "<group>"; };
  52 + CE6E5A10158EB0E300752FE5 /* NSString+SBJSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+SBJSON.h"; sourceTree = "<group>"; };
  53 + CE6E5A11158EB0E300752FE5 /* SBJSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJSON.h; sourceTree = "<group>"; };
  54 + CE6E5A12158EB0E300752FE5 /* SBJsonBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJsonBase.h; sourceTree = "<group>"; };
  55 + CE6E5A13158EB0E300752FE5 /* SBJsonParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJsonParser.h; sourceTree = "<group>"; };
  56 + CE6E5A14158EB0E300752FE5 /* SBJsonWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJsonWriter.h; sourceTree = "<group>"; };
  57 + CE6E5A6A158EC95B00752FE5 /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; };
35 58 DD0E2C27157EC2B700F3AAF9 /* ar-project.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "ar-project.app"; sourceTree = BUILT_PRODUCTS_DIR; };
36 59 DD0E2C2B157EC2B700F3AAF9 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
37 60 DD0E2C2D157EC2B700F3AAF9 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
@@ -54,6 +77,8 @@
54 77 DD0E2C69157EC95000F3AAF9 /* ARViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARViewController.m; sourceTree = "<group>"; };
55 78 DD0E2C6B157ECA1900F3AAF9 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
56 79 DD0E2C6E157ECBB200F3AAF9 /* brooks_hall_1936.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = brooks_hall_1936.jpg; sourceTree = "<group>"; };
  80 + DD34EA1F15894FFC00740B4C /* Picture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Picture.h; sourceTree = "<group>"; };
  81 + DD34EA2015894FFC00740B4C /* Picture.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Picture.m; sourceTree = "<group>"; };
57 82 DD79FF22158188C2001597D0 /* CLLocation+HeadingFromLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CLLocation+HeadingFromLocation.h"; sourceTree = "<group>"; };
58 83 DD79FF23158188C2001597D0 /* CLLocation+HeadingFromLocation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "CLLocation+HeadingFromLocation.m"; sourceTree = "<group>"; };
59 84 DD847AD9157FD2C100855FEA /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
@@ -68,21 +93,47 @@
68 93 isa = PBXFrameworksBuildPhase;
69 94 buildActionMask = 2147483647;
70 95 files = (
  96 + CE6E5A6B158EC95B00752FE5 /* libxml2.dylib in Frameworks */,
71 97 DDD116FB1587C3F900490B53 /* MapKit.framework in Frameworks */,
72 98 DD847ADA157FD2C100855FEA /* CoreLocation.framework in Frameworks */,
73 99 DD0E2C6C157ECA1900F3AAF9 /* AVFoundation.framework in Frameworks */,
74 100 DD0E2C2C157EC2B700F3AAF9 /* UIKit.framework in Frameworks */,
75 101 DD0E2C2E157EC2B700F3AAF9 /* Foundation.framework in Frameworks */,
76 102 DD0E2C30157EC2B700F3AAF9 /* CoreGraphics.framework in Frameworks */,
  103 + CE6E5A16158EB0E300752FE5 /* libfacebook_ios_sdk.a in Frameworks */,
77 104 );
78 105 runOnlyForDeploymentPostprocessing = 0;
79 106 };
80 107 /* End PBXFrameworksBuildPhase section */
81 108
82 109 /* Begin PBXGroup section */
  110 + CE6E5A05158EB0E300752FE5 /* facebook-ios-sdk */ = {
  111 + isa = PBXGroup;
  112 + children = (
  113 + CE6E5A06158EB0E300752FE5 /* Facebook.h */,
  114 + CE6E5A07158EB0E300752FE5 /* FBConnect.h */,
  115 + CE6E5A08158EB0E300752FE5 /* FBDialog.bundle */,
  116 + CE6E5A09158EB0E300752FE5 /* FBDialog.h */,
  117 + CE6E5A0A158EB0E300752FE5 /* FBFrictionlessRequestSettings.h */,
  118 + CE6E5A0B158EB0E300752FE5 /* FBLoginDialog.h */,
  119 + CE6E5A0C158EB0E300752FE5 /* FBRequest.h */,
  120 + CE6E5A0D158EB0E300752FE5 /* JSON.h */,
  121 + CE6E5A0E158EB0E300752FE5 /* libfacebook_ios_sdk.a */,
  122 + CE6E5A0F158EB0E300752FE5 /* NSObject+SBJSON.h */,
  123 + CE6E5A10158EB0E300752FE5 /* NSString+SBJSON.h */,
  124 + CE6E5A11158EB0E300752FE5 /* SBJSON.h */,
  125 + CE6E5A12158EB0E300752FE5 /* SBJsonBase.h */,
  126 + CE6E5A13158EB0E300752FE5 /* SBJsonParser.h */,
  127 + CE6E5A14158EB0E300752FE5 /* SBJsonWriter.h */,
  128 + );
  129 + name = "facebook-ios-sdk";
  130 + path = "../../../facebook-ios-sdk/lib/facebook-ios-sdk";
  131 + sourceTree = "<group>";
  132 + };
83 133 DD0E2C1C157EC2B600F3AAF9 = {
84 134 isa = PBXGroup;
85 135 children = (
  136 + CE6E5A6A158EC95B00752FE5 /* libxml2.dylib */,
86 137 DD0E2C31157EC2B700F3AAF9 /* ar-project */,
87 138 DD0E2C2A157EC2B700F3AAF9 /* Frameworks */,
88 139 DD0E2C28157EC2B700F3AAF9 /* Products */,
@@ -113,18 +164,23 @@
113 164 DD0E2C31157EC2B700F3AAF9 /* ar-project */ = {
114 165 isa = PBXGroup;
115 166 children = (
  167 + CE6E5A05158EB0E300752FE5 /* facebook-ios-sdk */,
116 168 DD0E2C62157EC51500F3AAF9 /* assets */,
117 169 DD0E2C3A157EC2B700F3AAF9 /* AppDelegate.h */,
118 170 DD0E2C3B157EC2B700F3AAF9 /* AppDelegate.m */,
  171 + DD79FF22158188C2001597D0 /* CLLocation+HeadingFromLocation.h */,
  172 + DD79FF23158188C2001597D0 /* CLLocation+HeadingFromLocation.m */,
119 173 DD0E2C3D157EC2B700F3AAF9 /* MainStoryboard_iPhone.storyboard */,
120 174 DD0E2C40157EC2B700F3AAF9 /* MainStoryboard_iPad.storyboard */,
  175 + CE6DACA3158CE7AC0030158A /* SlideMenu.h */,
  176 + CE6DACA4158CE7AC0030158A /* SlideMenu.m */,
121 177 DD0E2C68157EC95000F3AAF9 /* ARViewController.h */,
122 178 DD0E2C69157EC95000F3AAF9 /* ARViewController.m */,
123   - DD0E2C32157EC2B700F3AAF9 /* Supporting Files */,
124   - DD79FF22158188C2001597D0 /* CLLocation+HeadingFromLocation.h */,
125   - DD79FF23158188C2001597D0 /* CLLocation+HeadingFromLocation.m */,
126 179 DDAC61991587C02600D2E484 /* MapViewController.h */,
127 180 DDAC619A1587C02600D2E484 /* MapViewController.m */,
  181 + DD34EA1F15894FFC00740B4C /* Picture.h */,
  182 + DD34EA2015894FFC00740B4C /* Picture.m */,
  183 + DD0E2C32157EC2B700F3AAF9 /* Supporting Files */,
128 184 );
129 185 path = "ar-project";
130 186 sourceTree = "<group>";
@@ -232,6 +288,7 @@
232 288 DD0E2C61157EC50900F3AAF9 /* tab_list@2x.png in Resources */,
233 289 DD0E2C6F157ECBB200F3AAF9 /* brooks_hall_1936.jpg in Resources */,
234 290 DDAC61971587BB2300D2E484 /* data.plist in Resources */,
  291 + CE6E5A15158EB0E300752FE5 /* FBDialog.bundle in Resources */,
235 292 );
236 293 runOnlyForDeploymentPostprocessing = 0;
237 294 };
@@ -247,6 +304,8 @@
247 304 DD0E2C6A157EC95000F3AAF9 /* ARViewController.m in Sources */,
248 305 DD79FF24158188C2001597D0 /* CLLocation+HeadingFromLocation.m in Sources */,
249 306 DDAC619B1587C02600D2E484 /* MapViewController.m in Sources */,
  307 + DD34EA2115894FFC00740B4C /* Picture.m in Sources */,
  308 + CE6DACA5158CE7AC0030158A /* SlideMenu.m in Sources */,
250 309 );
251 310 runOnlyForDeploymentPostprocessing = 0;
252 311 };
@@ -300,6 +359,10 @@
300 359 GCC_WARN_ABOUT_RETURN_TYPE = YES;
301 360 GCC_WARN_UNINITIALIZED_AUTOS = YES;
302 361 GCC_WARN_UNUSED_VARIABLE = YES;
  362 + HEADER_SEARCH_PATHS = (
  363 + "$(SDKROOT)/usr/include/libxml2",
  364 + "\n$(SDKROOT)/usr/include/libxml2",
  365 + );
303 366 IPHONEOS_DEPLOYMENT_TARGET = 5.1;
304 367 SDKROOT = iphoneos;
305 368 TARGETED_DEVICE_FAMILY = "1,2";
@@ -319,6 +382,10 @@
319 382 GCC_WARN_ABOUT_RETURN_TYPE = YES;
320 383 GCC_WARN_UNINITIALIZED_AUTOS = YES;
321 384 GCC_WARN_UNUSED_VARIABLE = YES;
  385 + HEADER_SEARCH_PATHS = (
  386 + "$(SDKROOT)/usr/include/libxml2",
  387 + "\n$(SDKROOT)/usr/include/libxml2",
  388 + );
322 389 IPHONEOS_DEPLOYMENT_TARGET = 5.1;
323 390 OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
324 391 SDKROOT = iphoneos;
@@ -330,10 +397,23 @@
330 397 DD0E2C54157EC2B700F3AAF9 /* Debug */ = {
331 398 isa = XCBuildConfiguration;
332 399 buildSettings = {
  400 + CODE_SIGN_IDENTITY = "";
  401 + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
333 402 GCC_PRECOMPILE_PREFIX_HEADER = YES;
334 403 GCC_PREFIX_HEADER = "ar-project/ar-project-Prefix.pch";
335 404 INFOPLIST_FILE = "ar-project/ar-project-Info.plist";
  405 + LIBRARY_SEARCH_PATHS = (
  406 + "$(inherited)",
  407 + "\"$(SRCROOT)/../facebook-ios-sdk/build/facebook-ios-sdk.build/Release-iphoneos/facebook-ios-sdk.build/Objects-normal/armv6\"",
  408 + "\"$(SRCROOT)/../facebook-ios-sdk/build/facebook-ios-sdk.build/Release-iphoneos/facebook-ios-sdk.build/Objects-normal/armv7\"",
  409 + "\"$(SRCROOT)/../facebook-ios-sdk/build/Release-iphoneos\"",
  410 + "\"$(SRCROOT)/../facebook-ios-sdk/build/Release-iphonesimulator\"",
  411 + "\"$(SRCROOT)/../facebook-ios-sdk/lib/facebook-ios-sdk\"",
  412 + "\"$(SRCROOT)/../../facebook-ios-sdk/lib/facebook-ios-sdk\"",
  413 + "\"$(SRCROOT)/../bengottlieb-Twitter-OAuth-iPhone-d26af5a/Twitter+OAuth/Libraries & Headers\"",
  414 + );
336 415 PRODUCT_NAME = "$(TARGET_NAME)";
  416 + "PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
337 417 WRAPPER_EXTENSION = app;
338 418 };
339 419 name = Debug;
@@ -341,10 +421,24 @@
341 421 DD0E2C55157EC2B700F3AAF9 /* Release */ = {
342 422 isa = XCBuildConfiguration;
343 423 buildSettings = {
  424 + CODE_SIGN_IDENTITY = "";
  425 + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
344 426 GCC_PRECOMPILE_PREFIX_HEADER = YES;
345 427 GCC_PREFIX_HEADER = "ar-project/ar-project-Prefix.pch";
346 428 INFOPLIST_FILE = "ar-project/ar-project-Info.plist";
  429 + LIBRARY_SEARCH_PATHS = (
  430 + "$(inherited)",
  431 + "\"$(SRCROOT)/../facebook-ios-sdk/build/facebook-ios-sdk.build/Release-iphoneos/facebook-ios-sdk.build/Objects-normal/armv6\"",
  432 + "\"$(SRCROOT)/../facebook-ios-sdk/build/facebook-ios-sdk.build/Release-iphoneos/facebook-ios-sdk.build/Objects-normal/armv7\"",
  433 + "\"$(SRCROOT)/../facebook-ios-sdk/build/Release-iphoneos\"",
  434 + "\"$(SRCROOT)/../facebook-ios-sdk/build/Release-iphonesimulator\"",
  435 + "\"$(SRCROOT)/../facebook-ios-sdk/lib/facebook-ios-sdk\"",
  436 + "\"$(SRCROOT)/../../facebook-ios-sdk/lib/facebook-ios-sdk\"",
  437 + "\"$(SRCROOT)/../bengottlieb-Twitter-OAuth-iPhone-d26af5a/Twitter+OAuth/Libraries & Headers\"",
  438 + );
347 439 PRODUCT_NAME = "$(TARGET_NAME)";
  440 + "PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
  441 + VALIDATE_PRODUCT = NO;
348 442 WRAPPER_EXTENSION = app;
349 443 };
350 444 name = Release;
BIN  ar-project/.DS_Store
Binary file not shown
44 ar-project/ARViewController.h 100644 → 100755
@@ -10,38 +10,52 @@
10 10 #import <CoreLocation/CoreLocation.h>
11 11 #import <UIKit/UIKit.h>
12 12
13   -#import "CLLocation+HeadingFromLocation.h"
  13 +#import "AppDelegate.h"
  14 +#import "Picture.h"
  15 +#import "SlideMenu.h"
14 16
15   -@interface ARViewController : UIViewController <CLLocationManagerDelegate> {
  17 +
  18 +
  19 +@interface ARViewController : UIViewController <CLLocationManagerDelegate>
  20 +{
16 21 AVCaptureSession *captureSession;
17   - UIView* cameraView;
18   - UIImageView* imageView;
19   - UISlider* slider;
  22 + UIView *cameraView;
  23 + UIView *radarView;
  24 + NSMutableArray *radarViews;
  25 + NSMutableArray *pictures;
  26 + UIImageView *imageView;
  27 + UISlider *slider;
  28 + SlideMenu* slideMenu;
20 29
21 30 CLLocationManager *locationManager;
22   - UILabel *headingLabel;
23   - UILabel *bearingLabel;
24   -
25 31 CLLocation *location;
26 32 CLHeading *heading;
27 33
  34 + // Temporary
  35 + UILabel *headingLabel;
  36 + UILabel *coordinatesLabel;
28 37 UIView *point0;
29   - UIView *point1;
30   - UIView *point2;
31 38
32 39 }
33 40
34 41 @property (nonatomic, retain) IBOutlet UIView *cameraView;
35   -@property (nonatomic, retain) IBOutlet UIImageView* imageView;
36   -@property (nonatomic, retain) IBOutlet UISlider* slider;
  42 +@property (nonatomic, retain) IBOutlet UIView *radarView;
  43 +@property (nonatomic, retain) IBOutlet UIImageView *imageView;
  44 +@property (nonatomic, retain) IBOutlet UISlider *slider;
  45 +@property (nonatomic, retain) IBOutlet SlideMenu *slideMenu;
  46 +
  47 +@property (nonatomic, retain) CLLocation *location;
  48 +@property (nonatomic, retain) CLHeading *heading;
  49 +
  50 +// Temporary
37 51 @property (nonatomic, retain) IBOutlet UILabel *headingLabel;
38   -@property (nonatomic, retain) IBOutlet UILabel *bearingLabel;
  52 +@property (nonatomic, retain) IBOutlet UILabel *coordinatesLabel;
39 53 @property (nonatomic, retain) IBOutlet UIView *point0;
40   -@property (nonatomic, retain) IBOutlet UIView *point1;
41   -@property (nonatomic, retain) IBOutlet UIView *point2;
42 54
43 55 -(IBAction) sliderChanged:(id)sender;
  56 +-(IBAction) captureView:(id)sender;
44 57
45 58 - (void)initCamera;
  59 +-(void)touchMenu;
46 60
47 61 @end
182 ar-project/ARViewController.m 100644 → 100755
@@ -15,22 +15,28 @@ @interface ARViewController ()
15 15 @implementation ARViewController
16 16
17 17 @synthesize cameraView = _cameraView;
  18 +@synthesize radarView = _radarView;
18 19 @synthesize imageView = _imageView;
19 20 @synthesize slider = _slider;
20   -@synthesize headingLabel = _headingLabel;
21   -@synthesize bearingLabel = _bearingLabel;
  21 +@synthesize location = _location;
  22 +@synthesize heading = _heading;
  23 +@synthesize slideMenu = _slideMenu;
22 24
23   -@synthesize point1 = _point1;
24   -@synthesize point2 = _point2;
  25 +@synthesize headingLabel = _headingLabel;
  26 +@synthesize coordinatesLabel = _coordinatesLabel;
  27 +@synthesize point0 = _point0;
25 28
26 29 - (void)viewDidLoad
27   -{
  30 +{
28 31 [super viewDidLoad];
29   -
30 32 [self initLocationServices];
31 33 [self initCamera];
  34 + [self initRadar];
32 35 }
33 36
  37 +
  38 +
  39 +
34 40 - (void)initCamera {
35 41 captureSession = [[AVCaptureSession alloc] init];
36 42
@@ -66,6 +72,88 @@ -(IBAction) sliderChanged:(id)sender {
66 72 [_imageView setAlpha:_slider.value];
67 73 }
68 74
  75 +
  76 +
  77 +-(void)touchMenu
  78 +{
  79 + NSLog(@"touched");
  80 +}
  81 +
  82 +-(IBAction) captureView:(id)sender {
  83 + // http://developer.apple.com/library/ios/#qa/qa1703/_index.html
  84 + // Create a graphics context with the target size
  85 + // On iOS 4 and later, use UIGraphicsBeginImageContextWithOptions to take the scale into consideration
  86 + // On iOS prior to 4, fall back to use UIGraphicsBeginImageContext
  87 + // Create a graphics context with the target size
  88 + // On iOS 4 and later, use UIGraphicsBeginImageContextWithOptions to take the scale into consideration
  89 + // On iOS prior to 4, fall back to use UIGraphicsBeginImageContext
  90 +
  91 + // camera image size extended to screen ratio so it captures the entire screen
  92 + //
  93 + CGSize imageSize = CGSizeMake( (CGFloat)480.0, (CGFloat)720.0 );
  94 +
  95 + if (NULL != UIGraphicsBeginImageContextWithOptions)
  96 + UIGraphicsBeginImageContextWithOptions(imageSize, NO, 0);
  97 + else
  98 + UIGraphicsBeginImageContext(imageSize);
  99 +
  100 + CGContextRef context = UIGraphicsGetCurrentContext();
  101 +
  102 + // Start with the view...
  103 + //
  104 + CGContextSaveGState(context);
  105 + CGContextTranslateCTM(context, [self.view center].x, [self.view center].y);
  106 + CGContextConcatCTM(context, [self.view transform]);
  107 + CGContextTranslateCTM(context,-[self.view bounds].size.width * [[self.view layer] anchorPoint].x,-[self.view bounds].size.height * [[self.view layer] anchorPoint].y);
  108 + [[self.view layer] renderInContext:context];
  109 + CGContextRestoreGState(context);
  110 +
  111 + // ...then repeat for every subview from back to front
  112 + //
  113 + for (UIView *subView in [self.view subviews])
  114 + {
  115 + if ( [subView respondsToSelector:@selector(screen)] )
  116 + if ( [(UIWindow *)subView screen] == [UIScreen mainScreen] )
  117 + continue;
  118 +
  119 + CGContextSaveGState(context);
  120 + CGContextTranslateCTM(context, [subView center].x, [subView center].y);
  121 + CGContextConcatCTM(context, [subView transform]);
  122 + CGContextTranslateCTM(context,-[subView bounds].size.width * [[subView layer] anchorPoint].x,-[subView bounds].size.height * [[subView layer] anchorPoint].y);
  123 + [[subView layer] renderInContext:context];
  124 + CGContextRestoreGState(context);
  125 + }
  126 +
  127 + UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); // autoreleased image
  128 +
  129 + UIGraphicsEndImageContext();
  130 +
  131 + UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:didFinishSavingWithError:contextInfo:), nil);
  132 +
  133 +
  134 +
  135 + NSData* imageData = UIImageJPEGRepresentation(image, 90);
  136 + Facebook* fb = [(AppDelegate *)[[UIApplication sharedApplication] delegate] facebook ];
  137 +
  138 + NSMutableDictionary * params = [NSMutableDictionary dictionaryWithObjectsAndKeys:[fb accessToken],@"access_token",
  139 + @"OMG!", @"LOOK!",
  140 + imageData, @"source",
  141 + nil];
  142 + [fb requestWithGraphPath:@"me"
  143 + andParams:params
  144 + andHttpMethod:@"POST"
  145 + andDelegate:self];
  146 +
  147 +
  148 +
  149 +
  150 +
  151 +}
  152 +
  153 +- (void) image:(UIImage*)image didFinishSavingWithError:(NSError *)error contextInfo:(NSDictionary*)info {
  154 +
  155 +}
  156 +
69 157 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
70 158 {
71 159 if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
@@ -91,6 +179,8 @@ -(void)initLocationServices {
91 179
92 180 - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation {
93 181 location = newLocation;
  182 + //Override Location to: 35.78528, -78.66330 (Pullen Rd.)
  183 + location = [[CLLocation alloc] initWithLatitude:35.78528 longitude:-78.66330];
94 184 [self redraw];
95 185 }
96 186
@@ -100,43 +190,41 @@ - (void)locationManager:(CLLocationManager *)manager didUpdateHeading:(CLHeading
100 190 }
101 191
102 192 - (void)redraw {
103   - CLLocation* location1 = [[CLLocation alloc] initWithLatitude:35.78453 longitude:-78.66633];
104   - //Bell tower 35.78620, -78.66351
105   - //35.78448, -78.66503
106   - //35.78453, -78.66633
107   - //35.78424, -78.66538
108   -
109   -
110   -
111   - CLLocation* location2 = [[CLLocation alloc] initWithLatitude:35.78424 longitude:-78.66538];
112   -
113   - CLLocationDistance distance1 = [location distanceFromLocation:location1];
114   - float bearing1 = [location bearingFromLocation:location1];
115   - CLLocationDistance distance2 = [location distanceFromLocation:location2];
116   - float bearing2 = [location bearingFromLocation:location2];
117 193
118   - NSLog(@"PICTURE: latitude %+.6f, longitude %+.6f", location1.coordinate.latitude, location1.coordinate.longitude);
119   - NSLog(@"IPAD: latitude %+.6f, longitude %+.6f", location.coordinate.latitude, location.coordinate.longitude);
120   - NSLog(@"Distance: %lf", distance1);
121   - NSLog(@"Bearing: %+.6f DEG", bearing1);
122   - NSLog(@"Distance: %lf", distance2);
123   - NSLog(@"Bearing: %+.6f DEG", bearing2);
124   - [_bearingLabel setText:[NSString stringWithFormat:@"%+.0f°", bearing1]];
  194 + for (int i = 0; i<(int)radarViews.count; i++) {
  195 + UIView *picture_view = [radarViews objectAtIndex:i];
  196 + Picture *picture = [pictures objectAtIndex:i];
  197 +
  198 +// if ([location distanceFromLocation:picture.location] < 75) {
  199 + CLLocationDistance distance = [location distanceFromLocation:picture.location];
  200 + float bearing = [location bearingFromLocation:picture.location];
  201 +
  202 + float x = sin(degreesToRadians(heading.trueHeading - bearing)) * distance / 2;
  203 + float y = cos(degreesToRadians(heading.trueHeading - bearing)) * distance / 2;
  204 +
  205 + picture_view.frame = CGRectMake(_point0.frame.origin.x - round(x), _point0.frame.origin.y - round(y), 10.0, 10.0);
  206 +// }
  207 + }
125 208
126   - if (heading.headingAccuracy > 0) {
127   - NSLog(@"%@", [NSString stringWithFormat:@"Magnetic Heading: %f", heading.magneticHeading]);
128   - NSLog(@"%@", [NSString stringWithFormat:@"True Heading: %f", heading.trueHeading]);
129   - [_headingLabel setText:[NSString stringWithFormat:@"%+.0f°", heading.trueHeading]];
  209 + Picture *picture = [pictures objectAtIndex:1];
  210 + CLLocationDistance distance = [location distanceFromLocation:picture.location];
  211 + float bearing = [location bearingFromLocation:picture.location];
  212 + float angle = 34.1;
  213 + float zero = heading.trueHeading - angle / 2;
  214 + if (zero < bearing && bearing < (zero + angle)) {
  215 + float x = round(((bearing - zero) * 768 / angle) - 768 / 2);
  216 + _imageView.frame = CGRectMake(x, _imageView.frame.origin.y, _imageView.frame.size.width, _imageView.frame.size.height);
  217 + } else {
  218 + float x = 1024;
  219 + _imageView.frame = CGRectMake(x, _imageView.frame.origin.y, _imageView.frame.size.width, _imageView.frame.size.height);
130 220 }
131 221
132   - //X = SIN(RADIANS(ANGLE))*DISTANCE
133   - float x1 = sin(degreesToRadians(heading.trueHeading - bearing1)) * distance1;
134   - float y1 = cos(degreesToRadians(heading.trueHeading - bearing1)) * distance1;
135   - _point1.frame = CGRectMake(_point0.frame.origin.x - round(x1), _point0.frame.origin.y - round(y1), 10.0, 10.0);
136 222
137   - float x2 = sin(degreesToRadians(heading.trueHeading - bearing2)) * distance2;
138   - float y2 = cos(degreesToRadians(heading.trueHeading - bearing2)) * distance2;
139   - _point2.frame = CGRectMake(_point0.frame.origin.x - round(x2), _point0.frame.origin.y - round(y2), 10.0, 10.0);
  223 + [_coordinatesLabel setText:[NSString stringWithFormat:@"%+.4f, %+.4f°", location.coordinate.latitude, location.coordinate.longitude]];
  224 +
  225 + if (heading.headingAccuracy > 0) {
  226 + [_headingLabel setText:[NSString stringWithFormat:@"%.0f°", heading.trueHeading]];
  227 + }
140 228
141 229 }
142 230
@@ -144,4 +232,22 @@ - (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *
144 232
145 233 }
146 234
  235 +#pragma Radar
  236 +- (void)initRadar {
  237 + AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
  238 +
  239 + pictures = [[NSMutableArray alloc] initWithCapacity:[[appDelegate.data allValues] count]];
  240 + radarViews = [[NSMutableArray alloc] initWithCapacity:[[appDelegate.data allValues] count]];
  241 + for (NSDictionary *dictionary in [appDelegate.data allValues]) {
  242 + Picture *picture = [[Picture alloc] initWithDictionary:dictionary];
  243 + [pictures addObject:picture];
  244 +
  245 + UIView *picture_view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 10.0, 10.0)];
  246 + [picture_view setBackgroundColor:[UIColor redColor]];
  247 +
  248 + [radarViews addObject:picture_view];
  249 + [_radarView addSubview:picture_view];
  250 + }
  251 +}
  252 +
147 253 @end
10 ar-project/AppDelegate.h 100644 → 100755
@@ -7,12 +7,20 @@
7 7 //
8 8
9 9 #import <UIKit/UIKit.h>
  10 +#import "FBConnect.h"
10 11
11   -@interface AppDelegate : UIResponder <UIApplicationDelegate> {
  12 +#import "CLLocation+HeadingFromLocation.h"
  13 +
  14 +@interface AppDelegate : UIResponder <UIApplicationDelegate, FBSessionDelegate> {
12 15 NSDictionary *data;
  16 + Facebook* facebook;
13 17 }
14 18
  19 +
  20 +
15 21 @property (strong, nonatomic) UIWindow *window;
16 22 @property (strong, nonatomic) NSDictionary *data;
  23 +@property (nonatomic, retain) Facebook* facebook;
17 24
18 25 @end
  26 +
63 ar-project/AppDelegate.m 100644 → 100755
@@ -3,6 +3,7 @@
3 3 // ar-project
4 4 //
5 5 // Created by Leonel Galan on 6/5/12.
  6 +// Modified by Fadi Qassem
6 7 // Copyright (c) 2012 NCSU. All rights reserved.
7 8 //
8 9
@@ -12,39 +13,51 @@ @implementation AppDelegate
12 13
13 14 @synthesize window = _window;
14 15 @synthesize data = _data;
  16 +@synthesize facebook;
15 17
16 18 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
17 19 {
  20 + facebook = [[Facebook alloc] initWithAppId:@"351841488223055" andDelegate:self];
  21 + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
  22 + if ([defaults objectForKey:@"FBAccessTokenKey"]
  23 + && [defaults objectForKey:@"FBExpirationDateKey"]) {
  24 + facebook.accessToken = [defaults objectForKey:@"FBAccessTokenKey"];
  25 + facebook.expirationDate = [defaults objectForKey:@"FBExpirationDateKey"];
  26 + }
  27 +
  28 + //check for valid session
  29 + if (![facebook isSessionValid]) {
  30 + NSArray *permissions = [[NSArray alloc] initWithObjects:
  31 + @"user_likes",
  32 + @"read_stream",
  33 + nil];
  34 + [facebook authorize:permissions];
  35 + [facebook authorize:nil];
  36 + }
  37 +
  38 +
18 39 _data = [[NSDictionary alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"data" ofType:@"plist"]];
19   -
20 40 return YES;
  41 +
21 42 }
22   -
23   -- (void)applicationWillResignActive:(UIApplication *)application
24   -{
25   - // 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.
26   - // 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.
27   -}
28   -
29   -- (void)applicationDidEnterBackground:(UIApplication *)application
30   -{
31   - // 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.
32   - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
33   -}
34   -
35   -- (void)applicationWillEnterForeground:(UIApplication *)application
36   -{
37   - // 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.
  43 +
  44 + // Pre iOS 4.2 support
  45 +- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
  46 + return [facebook handleOpenURL:url];
38 47 }
39   -
40   -- (void)applicationDidBecomeActive:(UIApplication *)application
41   -{
42   - // 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.
  48 +
  49 + // For iOS 4.2+ support
  50 +- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
  51 +sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
  52 + return [facebook handleOpenURL:url];
43 53 }
44 54
45   -- (void)applicationWillTerminate:(UIApplication *)application
46   -{
47   - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
  55 +- (void)fbDidLogin {
  56 + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
  57 + [defaults setObject:[facebook accessToken] forKey:@"FBAccessTokenKey"];
  58 + [defaults setObject:[facebook expirationDate] forKey:@"FBExpirationDateKey"];
  59 + [defaults synchronize];
  60 +
48 61 }
49   -
50 62 @end
  63 +
0  ar-project/CLLocation+HeadingFromLocation.h 100644 → 100755
File mode changed
0  ar-project/CLLocation+HeadingFromLocation.m 100644 → 100755
File mode changed
0  ar-project/MapViewController.h 100644 → 100755
File mode changed
0  ar-project/MapViewController.m 100644 → 100755
File mode changed
22 ar-project/Picture.h
... ... @@ -0,0 +1,22 @@
  1 +//
  2 +// Picture.h
  3 +// ar-project
  4 +//
  5 +// Created by Leonel Galan on 6/13/12.
  6 +// Copyright (c) 2012 NCSU. All rights reserved.
  7 +//
  8 +
  9 +#import <CoreLocation/CoreLocation.h>
  10 +#import <Foundation/Foundation.h>
  11 +
  12 +#import "AppDelegate.h"
  13 +
  14 +@interface Picture : NSObject {
  15 + CLLocation *location;
  16 +}
  17 +
  18 +@property (nonatomic, retain) CLLocation *location;
  19 +
  20 +- (id)initWithDictionary:(NSDictionary *)dictionary;
  21 +
  22 +@end
24 ar-project/Picture.m
... ... @@ -0,0 +1,24 @@
  1 +//
  2 +// Picture.m
  3 +// ar-project
  4 +//
  5 +// Created by Leonel Galan on 6/13/12.
  6 +// Copyright (c) 2012 NCSU. All rights reserved.
  7 +//
  8 +
  9 +#import "Picture.h"
  10 +
  11 +@implementation Picture
  12 +
  13 +@synthesize location = _location;
  14 +
  15 +- (id)initWithDictionary:(NSDictionary *)dictionary {
  16 + if (self = [super init]) {
  17 + self.location = [[CLLocation alloc]
  18 + initWithLatitude:[((NSNumber *)[dictionary objectForKey:@"latitude"]) doubleValue]
  19 + longitude:[((NSNumber *)[dictionary objectForKey:@"longitude"]) doubleValue]];
  20 + }
  21 + return self;
  22 +}
  23 +
  24 +@end
37 ar-project/SlideMenu.h
... ... @@ -0,0 +1,37 @@
  1 +//
  2 +// SlideMenu.h
  3 +// ar-project
  4 +//
  5 +// Created by Lion User on 16/06/2012.
  6 +// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
  7 +//
  8 +
  9 +#import <UIKit/UIKit.h>
  10 +
  11 +
  12 +/*
  13 +Easy navigation for the AR view, slide out at thumb level
  14 +*/
  15 +
  16 +@interface SlideMenu : UIView
  17 +{
  18 + UIButton* listNav;
  19 + UIButton* mapNav;
  20 + BOOL isOpen;
  21 +
  22 +}
  23 +
  24 +@property (nonatomic, retain) IBOutlet UIButton* listNav;
  25 +@property (nonatomic, retain) IBOutlet UIButton* mapNav;
  26 +@property (nonatomic, retain) IBOutlet UIView* menuView;
  27 +@property (nonatomic, retain) IBOutlet UISwipeGestureRecognizer* swipeRight;
  28 +@property (nonatomic, retain) IBOutlet UISwipeGestureRecognizer* swipeLeft;
  29 +@property (nonatomic, retain) IBOutlet UITapGestureRecognizer* tapMenu;
  30 +
  31 +
  32 +
  33 +-(IBAction)handleMenu:(UIGestureRecognizer*)sender;
  34 +-(IBAction)buttonTouched:(id)sender;
  35 +
  36 +
  37 +@end
129 ar-project/SlideMenu.m
... ... @@ -0,0 +1,129 @@
  1 +//
  2 +// SlideMenu.m
  3 +// ar-project
  4 +//
  5 +// Created by Lion User on 16/06/2012.
  6 +// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
  7 +//
  8 +
  9 +#import "SlideMenu.h"
  10 +
  11 +@implementation SlideMenu
  12 +
  13 +
  14 +@synthesize mapNav = _mapNav;
  15 +@synthesize listNav = _listNav;
  16 +@synthesize menuView = _menuView;
  17 +@synthesize swipeLeft = _swipeLeft;
  18 +@synthesize swipeRight = _swipeRight;
  19 +@synthesize tapMenu = _tapMenu;
  20 +
  21 +-(void)viewDidLoad
  22 +{
  23 + isOpen = NO;
  24 +
  25 +}
  26 +
  27 +
  28 +-(void)buttonTouched:(id)sender
  29 +{
  30 + NSLog(@"button touched");
  31 +}
  32 +
  33 +- (id)initWithFrame:(CGRect)frame
  34 +{
  35 + self = [super initWithFrame:frame];
  36 + float delta = self.frame.size.height;
  37 + if (self) {
  38 +
  39 + self.frame = CGRectOffset(self.frame, -delta, 0.0);
  40 +
  41 + }
  42 + return self;
  43 +}
  44 +
  45 +- (BOOL)buttonPressed:(UIGestureRecognizer *) gestureRecognizer {
  46 +
  47 + // Get the position of the point tapped in the window co-ordinate system
  48 + CGPoint tapPoint = [gestureRecognizer locationInView:nil];
  49 +
  50 + // If there are no buttons beneath this tap then move to the next page if near the page edge
  51 + UIView *viewAtBottomOfHeirachy = [self.window hitTest:tapPoint withEvent:nil];
  52 + if ([viewAtBottomOfHeirachy isKindOfClass:[UIButton class]]) {
  53 + return NO;
  54 +
  55 + }
  56 + return YES;
  57 +}
  58 +
  59 +
  60 +-(IBAction)handleMenu:(UIGestureRecognizer*)sender
  61 +{
  62 + if(![self buttonPressed:sender])
  63 + {
  64 + NSLog(@"button!");
  65 + return;
  66 + }
  67 +
  68 + /*
  69 + if (((touch.view == mapNav) && (sender == _tapMenu)) || ((touch.view == mapNav) && (sender == _tapMenu)))
  70 + {
  71 + //chagneviews
  72 + }
  73 + */
  74 +
  75 + // get the height of the search bar
  76 + float delta = self.frame.size.width;
  77 +
  78 + if(sender == _swipeRight && isOpen == NO)
  79 + { //swiped right
  80 + [self animate:delta];
  81 + NSLog(@"swipe right");
  82 +
  83 + }
  84 + else if(sender == _swipeLeft && isOpen == YES)
  85 + { //swiped left
  86 + [self animate:(-delta)];
  87 + NSLog(@"swipe left");
  88 +
  89 + }
  90 + else {
  91 + //tapped
  92 +
  93 + if(isOpen)
  94 + {
  95 + delta *= -1;
  96 + }
  97 + [self animate:delta];
  98 +
  99 + }
  100 + }
  101 +
  102 +-(void)animate:(CGFloat)delta
  103 +{
  104 + // run animation with duration of 0.7 second and no delay
  105 + [UIView animateWithDuration:0.7 delay: 0.0 options: UIViewAnimationOptionCurveEaseIn animations:^{
  106 + self.frame = CGRectOffset(self.frame, delta/5, 0.0); self.menuView.frame = CGRectOffset(self.menuView.frame, delta/2.5, 0.0);
  107 + }
  108 + completion:^(BOOL finished){
  109 + //if open, set to not open
  110 + if (isOpen){
  111 + isOpen = NO;
  112 + }
  113 + else {
  114 + isOpen = YES;
  115 + }
  116 + }];
  117 +
  118 +}
  119 +
  120 +/*
  121 +// Only override drawRect: if you perform custom drawing.
  122 +// An empty implementation adversely affects performance during animation.
  123 +- (void)drawRect:(CGRect)rect
  124 +{
  125 + // Drawing code
  126 +}
  127 +*/
  128 +
  129 +@end
9 ar-project/ar-project-Info.plist 100644 → 100755
@@ -45,5 +45,14 @@
45 45 <string>UIInterfaceOrientationLandscapeLeft</string>
46 46 <string>UIInterfaceOrientationLandscapeRight</string>
47 47 </array>
  48 + <key>CFBundleURLTypes</key>
  49 + <array>
  50 + <dict>
  51 + <key>CFBundleURLSchemes</key>
  52 + <array>
  53 + <string>fb351841488223055</string>
  54 + </array>
  55 + </dict>
  56 + </array>
48 57 </dict>
49 58 </plist>
0  ar-project/ar-project-Prefix.pch 100644 → 100755
File mode changed
0  ar-project/brooks_hall_1936.jpg 100644 → 100755
8 ar-project/data.plist 100644 → 100755
@@ -9,9 +9,9 @@
9 9 <key>description</key>
10 10 <string>College of Design</string>
11 11 <key>longitude</key>
12   - <real>-78.665167</real>
  12 + <real>-78.66448</real>
13 13 <key>latitude</key>
14   - <real>35.784289</real>
  14 + <real>35.78461</real>
15 15 </dict>
16 16 <key>2</key>
17 17 <dict>
@@ -20,9 +20,9 @@
20 20 <key>description</key>
21 21 <string>North Carolina State</string>
22 22 <key>longitude</key>
23   - <real>-78.665167</real>
  23 + <real>-78.66348000000001</real>
24 24 <key>latitude</key>
25   - <real>35.784289</real>
  25 + <real>35.78612</real>
26 26 </dict>
27 27 </dict>
28 28 </plist>
0  ar-project/en.lproj/InfoPlist.strings 100644 → 100755
File mode changed
223 ar-project/en.lproj/MainStoryboard_iPad.storyboard 100644 → 100755
... ... @@ -1,8 +1,8 @@
1 1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2   -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="2541" systemVersion="11E53" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" initialViewController="4">
  2 +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="1.1" toolsVersion="2182" systemVersion="11E53" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" initialViewController="4">
3 3 <dependencies>
4   - <deployment defaultVersion="1536" identifier="iOS"/>
5   - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="1875"/>
  4 + <deployment defaultVersion="1296" identifier="iOS"/>
  5 + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="1181"/>
6 6 </dependencies>
7 7 <scenes>
8 8 <!--Navigation Controller - AR-->
@@ -21,12 +21,28 @@
21 21 </objects>
22 22 <point key="canvasLocation" x="2201" y="-1163"/>
23 23 </scene>
  24 + <!--Navigation Controller - List-->
  25 + <scene sceneID="jAC-xj-6yl">
  26 + <objects>
  27 + <placeholder placeholderIdentifier="IBFirstResponder" id="e9I-3i-vFJ" userLabel="First Responder" sceneMemberID="firstResponder"/>
  28 + <navigationController definesPresentationContext="YES" id="dpl-Ck-iOu" sceneMemberID="viewController">
  29 + <tabBarItem key="tabBarItem" title="List" image="tab_list.png" id="0jV-8A-5Lv"/>
  30 + <navigationBar key="navigationBar" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" id="UDS-UQ-hiy">
  31 + <autoresizingMask key="autoresizingMask"/>
  32 + </navigationBar>
  33 + <connections>
  34 + <segue destination="2" kind="relationship" relationship="rootViewController" id="jPe-jh-ftw"/>
  35 + </connections>
  36 + </navigationController>
  37 + </objects>
  38 + <point key="canvasLocation" x="2201" y="14"/>
  39 + </scene>
24 40 <!--View Controller - Map-->
25 41 <scene sceneID="11">
26 42 <objects>
27 43 <viewController id="2" sceneMemberID="viewController">
28 44 <view key="view" contentMode="scaleToFill" id="17">
29   - <rect key="frame" x="0.0" y="20" width="768" height="955"/>
  45 + <rect key="frame" x="0.0" y="20" width="768" height="1004"/>
30 46 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
31 47 <subviews>
32 48 <toolbar opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="20">
@@ -38,6 +54,7 @@
38 54 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
39 55 </view>
40 56 <tabBarItem key="tabBarItem" title="Map" image="tab_map.png" id="7"/>
  57 + <navigationItem key="navigationItem" id="6NN-bn-F65"/>
41 58 </viewController>
42 59 <placeholder placeholderIdentifier="IBFirstResponder" id="10" sceneMemberID="firstResponder"/>
43 60 </objects>
@@ -60,6 +77,7 @@
60 77 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
61 78 </view>
62 79 <tabBarItem key="tabBarItem" title="List" image="tab_list.png" id="EFv-zb-L9P"/>
  80 + <navigationItem key="navigationItem" id="QRm-m3-bTF"/>
63 81 </viewController>
64 82 <placeholder placeholderIdentifier="IBFirstResponder" id="Fqc-R2-UkZ" sceneMemberID="firstResponder"/>
65 83 </objects>
@@ -77,8 +95,8 @@
77 95 </tabBar>
78 96 <connections>
79 97 <segue destination="qHI-Uz-ahh" kind="relationship" relationship="viewControllers" id="O2R-Lz-cix"/>
80   - <segue destination="2" kind="relationship" relationship="viewControllers" id="g0G-2j-u7w"/>
81 98 <segue destination="I8H-Mo-yxW" kind="relationship" relationship="viewControllers" id="gRp-kx-Lhx"/>
  99 + <segue destination="dpl-Ck-iOu" kind="relationship" relationship="viewControllers" id="UQo-UT-FCx"/>
82 100 </connections>
83 101 </tabBarController>
84 102 <placeholder placeholderIdentifier="IBFirstResponder" id="14" sceneMemberID="firstResponder"/>
@@ -96,74 +114,170 @@
96 114 <view userInteractionEnabled="NO" contentMode="scaleToFill" id="ITU-CJ-xQc">
97 115 <rect key="frame" x="0.0" y="0.0" width="768" height="911"/>
98 116 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
  117 + <subviews>
  118 + <imageView userInteractionEnabled="NO" alpha="0.60000000000000009" contentMode="scaleAspectFit" image="brooks_hall_1936.jpg" id="MQg-Rn-Cqq">
  119 + <rect key="frame" x="0.0" y="0.0" width="768" height="911"/>
  120 + <autoresizingMask key="autoresizingMask"/>
  121 + </imageView>
  122 + </subviews>
99 123 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
  124 + <gestureRecognizers/>
100 125 </view>
101   - <imageView userInteractionEnabled="NO" alpha="0.60000000000000009" contentMode="scaleAspectFit" image="brooks_hall_1936.jpg" id="MQg-Rn-Cqq">
102   - <rect key="frame" x="0.0" y="0.0" width="768" height="911"/>
103   - <autoresizingMask key="autoresizingMask"/>
104   - </imageView>
105   - <slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="0.5" minValue="0.0" maxValue="1" id="xJr-pD-1ih">
106   - <rect key="frame" x="569" y="235" width="333" height="23"/>
107   - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
108   - <connections>
109   - <action selector="sliderChanged:" destination="dCJ-wZ-CwT" eventType="valueChanged" id="l9M-a1-tmt"/>
110   - </connections>
111   - </slider>
112   - <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" text="+000°" adjustsFontSizeToFit="NO" autoshrinkMode="none" id="agh-b4-2Tu">
113   - <rect key="frame" x="300" y="20" width="157" height="64"/>
114   - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
115   - <nil key="highlightedColor"/>
116   - <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
117   - <fontDescription key="fontDescription" type="system" pointSize="45"/>
118   - </label>
119   - <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" text="+000°" adjustsFontSizeToFit="NO" autoshrinkMode="none" id="kND-7S-iIl">
120   - <rect key="frame" x="450" y="20" width="148" height="64"/>
  126 + <view contentMode="scaleToFill" id="7qi-Cz-arD">
  127 + <rect key="frame" x="-90" y="375" width="187" height="152"/>
121 128 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
122   - <nil key="highlightedColor"/>
123   - <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
124   - <fontDescription key="fontDescription" type="system" pointSize="45"/>
125   - </label>
126   - <view contentMode="scaleToFill" id="EIH-rv-MDx">
  129 + <subviews>
  130 + <view contentMode="scaleToFill" id="9d9-30-0rm" customClass="SlideMenu">
  131 + <rect key="frame" x="-9" y="0.0" width="151" height="152"/>
  132 + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
  133 + <subviews>
  134 + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="NVC-vR-dX0">
  135 + <rect key="frame" x="27" y="76" width="72" height="37"/>
  136 + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
  137 + <gestureRecognizers/>
  138 + <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
  139 + <state key="normal" title="Map">
  140 + <color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
  141 + <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
  142 + </state>
  143 + <state key="highlighted">
  144 + <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
  145 + </state>
  146 + <connections>
  147 + <action selector="buttonTouched:" destination="9d9-30-0rm" eventType="touchUpInside" id="I8K-wB-EIR"/>
  148 + <segue destination="2" kind="custom" id="p2w-Yq-Q7p"/>
  149 + </connections>
  150 + </button>
  151 + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="u8a-6Y-fTT">
  152 + <rect key="frame" x="27" y="20" width="72" height="37"/>
  153 + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
  154 + <gestureRecognizers/>
  155 + <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
  156 + <state key="normal" title="List">
  157 + <color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
  158 + <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
  159 + </state>
  160 + <state key="highlighted">
  161 + <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
  162 + </state>
  163 + <connections>
  164 + <action selector="buttonTouched:" destination="9d9-30-0rm" eventType="touchUpInside" id="90e-JN-z8T"/>
  165 + </connections>
  166 + </button>
  167 + <button opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="AsR-zQ-MTK">
  168 + <rect key="frame" x="137" y="0.0" width="33" height="152"/>
  169 + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
  170 + <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
  171 + <state key="normal">
  172 + <color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
  173 + <color key="titleShadowColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
  174 + </state>
  175 + <state key="highlighted">
  176 + <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
  177 + </state>
  178 + </button>
  179 + </subviews>
  180 + <color key="backgroundColor" cocoaTouchSystemColor="lightTextColor"/>
  181 + <gestureRecognizers/>
  182 + <connections>
  183 + <outlet property="listNav" destination="u8a-6Y-fTT" id="JfB-4g-WpC"/>
  184 + <outlet property="mapNav" destination="NVC-vR-dX0" id="VqA-l8-W8a"/>
  185 + <outlet property="menuView" destination="7qi-Cz-arD" id="sgJ-sh-RIR"/>
  186 + <outlet property="swipeLeft" destination="eqa-xg-4TX" id="v3s-b0-Cl4"/>
  187 + <outlet property="swipeRight" destination="qTG-2M-M8z" id="A5D-48-cfY"/>
  188 + <outlet property="tapMenu" destination="VZt-Wp-kTM" id="JOX-rt-g5G"/>
  189 + <outletCollection property="gestureRecognizers" destination="qTG-2M-M8z" id="dMH-ze-ssd"/>
  190 + <outletCollection property="gestureRecognizers" destination="eqa-xg-4TX" id="vQL-1h-CdC"/>
  191 + <outletCollection property="gestureRecognizers" destination="VZt-Wp-kTM" id="apv-27-pxj"/>
  192 + </connections>
  193 + </view>
  194 + </subviews>
  195 + <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
  196 + <gestureRecognizers/>
  197 + </view>
  198 + <view alpha="0.50000000000000011" contentMode="scaleToFill" id="EIH-rv-MDx">
127 199 <rect key="frame" x="607" y="10" width="151" height="150"/>
128 200 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
129 201 <subviews>
130   - <view contentMode="scaleToFill" id="BdN-b4-5yC">
  202 + <view alpha="0.50000000000000011" contentMode="scaleToFill" id="BdN-b4-5yC">
131 203 <rect key="frame" x="70" y="70" width="10" height="10"/>
132 204 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
133 205 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
134 206 </view>
135   - <view contentMode="scaleToFill" id="4gC-Bx-ROS">
136   - <rect key="frame" x="80" y="80" width="10" height="10"/>
137   - <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
138   - <color key="backgroundColor" red="0.80000001190000003" green="1" blue="0.40000000600000002" alpha="1" colorSpace="calibratedRGB"/>
139   - </view>
140   - <view contentMode="scaleToFill" id="BiZ-aH-Txh">
141   - <rect key="frame" x="90" y="90" width="10" height="10"/>
142   - <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
143   - <color key="backgroundColor" red="1" green="0.40000000596046448" blue="0.40000000596046448" alpha="1" colorSpace="calibratedRGB"/>
144   - </view>
145 207 </subviews>
146 208 <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
147 209 </view>
  210 + <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="+000°" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="agh-b4-2Tu">
  211 + <rect key="frame" x="447" y="20" width="157" height="64"/>
  212 + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
  213 + <fontDescription key="fontDescription" type="system" pointSize="45"/>
  214 + <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
  215 + <nil key="highlightedColor"/>
  216 + </label>