This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ###################### | |
| # Options | |
| ###################### | |
| REVEAL_ARCHIVE_IN_FINDER=false | |
| FRAMEWORK_NAME="${PROJECT_NAME}" | |
| SIMULATOR_LIBRARY_PATH="${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${FRAMEWORK_NAME}.framework" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // SSViewController.m | |
| // MyMapBox | |
| // | |
| // Created by syshen on 10/23/13. | |
| // Copyright (c) 2013 syshen. All rights reserved. | |
| // | |
| #import "SSViewController.h" | |
| #import <MapBox/MapBox.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @interface SSLayoutAttributes : UICollectionViewLayoutAttributes | |
| @property (nonatomic, strong) CAGradientLayer *gradient; // a new attribute | |
| @end | |
| @implementation SSLayoutAttributes | |
| - (id) copyWithZone:(NSZone *)zone { | |
| SSLayoutAttributes *layoutAttribue = [super copyWithZone:zone]; | |
| layoutAttribue.gradient = _gradient; | |
| return layoutAttribue; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CIFilter *resizeFilter = [CIFilter filterWithName:@"CILanczosScaleTransform"]; | |
| [resizeFilter setValue:ciImage forKey:@"inputImage"]; | |
| [resizeFilter setValue:[NSNumber numberWithFloat:1.0f] forKey:@"inputAspectRatio"]; | |
| [resizeFilter setValue:[NSNumber numberWithFloat:xRatio] forKey:@"inputScale"]; | |
| CIFilter *cropFilter = [CIFilter filterWithName:@"CICrop"]; | |
| CIVector *cropRect = [CIVector vectorWithX:rect.origin.x Y:rect.origin.y Z:rect.size.width W:rect.size.height]; | |
| [cropFilter setValue:resizeFilter.outputImage forKey:@"inputImage"]; | |
| [cropFilter setValue:cropRect forKey:@"inputRectangle"]; | |
| CIImage *croppedImage = cropFilter.outputImage; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| content: "", // 使用者輸入內容 | |
| event_description: "Take Pictures", // device client 負責翻譯 | |
| gps: { | |
| name: str, | |
| latitude: rational num, | |
| longitude: rational num, | |
| zoom_level: integer | |
| }, // lat, long, name, zoom_level |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -(void)setUp { | |
| asyncWaitUntil = [NSDate dateWithTimeIntervalSinceNow:5]; | |
| SRWebSocket *webSocket = [[SRWebSocket alloc] initWithURL:[NSURL URLWithString:@"ws://localhost"]]; | |
| mockSocket = [OCMockObject partialMockForObject:webSocket]; | |
| } | |
| -(void)testOpenConnectionSuccess { | |
| __block BOOL complete = NO; | |
| __weak WARemoteInterface *wRi = remoteInterface; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @implementation WARemoteInterface (WebSocket_Test) | |
| + (void)load | |
| { | |
| Method origMethod = class_getInstanceMethod(self, @selector(reconnectWebSocket)); | |
| Method newMethod = class_getInstanceMethod(self, @selector(reconnectWebSocket_override)); | |
| method_setImplementation(origMethod, method_getImplementation(newMethod)); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -(void)setUp { | |
| asyncWaitUntil = [NSDate dateWithTimeIntervalSinceNow:5]; | |
| } | |
| -(void)testOpenConnectionSuccess { | |
| __block BOOL complete = NO; | |
| [[WARemoteInterface sharedInterface] | |
| openWebSocketConnectionForUrl:mockWebSocketServer | |
| onSucces:^{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| file:///.file/id=6562758.24810673/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - (void) adjustPageViewAtIndex:(NSUInteger)anIndex { | |
| if (anIndex == NSNotFound) | |
| return; | |
| UIView *currentPageView = [self.paginatedView existingPageAtIndex:anIndex]; | |
| if (currentPageView) | |
| [self adjustPageView:currentPageView usingGridAtIndex:anIndex]; |