mirror of
https://github.com/joeblau/COSTouchVisualizer.git
synced 2024-09-11 12:36:58 +03:00
Fixed UI issies and updated to universal storyboards
This commit is contained in:
parent
2306412316
commit
393debeb77
@ -1,65 +1,55 @@
|
||||
Language: Cpp
|
||||
---
|
||||
Language: Cpp
|
||||
# BasedOnStyle: WebKit
|
||||
AccessModifierOffset: -4
|
||||
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
AlignEscapedNewlinesLeft: false
|
||||
AlignTrailingComments: false
|
||||
PointerAlignment: Left
|
||||
|
||||
AllowAllParametersOfDeclarationOnNextLine: true
|
||||
AllowShortBlocksOnASingleLine: true
|
||||
AllowShortIfStatementsOnASingleLine: true
|
||||
AllowShortLoopsOnASingleLine: true
|
||||
AllowShortBlocksOnASingleLine: false
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: All
|
||||
|
||||
AlwaysBreakTemplateDeclarations: false
|
||||
AlwaysBreakBeforeMultilineStrings: false
|
||||
# Only available on clang-format 3.6
|
||||
# AlwaysBreakAfterDefinitionReturnType: true
|
||||
BreakBeforeBinaryOperators: false
|
||||
BreakBeforeBinaryOperators: true
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializersBeforeComma: true
|
||||
BreakBeforeBraces: Attach
|
||||
|
||||
BinPackParameters: true
|
||||
ColumnLimit: 0
|
||||
ColumnLimit: 0
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
||||
DerivePointerAlignment: false
|
||||
DerivePointerBinding: false
|
||||
ExperimentalAutoDetectBinPacking: false
|
||||
IndentCaseLabels: true
|
||||
IndentWrappedFunctionNames: false
|
||||
IndentFunctionDeclarationAfterType: false
|
||||
MaxEmptyLinesToKeep: 1
|
||||
KeepEmptyLinesAtTheStartOfBlocks: true
|
||||
NamespaceIndentation: Inner
|
||||
ObjCSpaceAfterProperty: true
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
|
||||
PenaltyBreakBeforeFirstCallParameter: 19
|
||||
PenaltyBreakComment: 300
|
||||
PenaltyBreakString: 1000
|
||||
PenaltyBreakFirstLessLess: 120
|
||||
PenaltyExcessCharacter: 1000000
|
||||
PenaltyReturnTypeOnItsOwnLine: 60
|
||||
|
||||
PointerBindsToType: false
|
||||
SpacesBeforeTrailingComments: 1
|
||||
Cpp11BracedListStyle: false
|
||||
Standard: Cpp03
|
||||
|
||||
TabWidth: 8
|
||||
UseTab: Never
|
||||
NamespaceIndentation: Inner
|
||||
IndentWidth: 4
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
ContinuationIndentWidth: 4
|
||||
|
||||
Standard: Cpp03
|
||||
IndentWidth: 4
|
||||
TabWidth: 8
|
||||
UseTab: Never
|
||||
BreakBeforeBraces: Attach
|
||||
IndentFunctionDeclarationAfterType: false
|
||||
SpacesInParentheses: false
|
||||
SpacesInAngles: false
|
||||
SpacesInAngles: false
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInContainerLiterals: true
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpacesBeforeTrailingComments: 1
|
||||
ContinuationIndentWidth: 4
|
||||
CommentPragmas: '^ IWYU pragma:'
|
||||
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
|
||||
SpaceBeforeParens: ControlStatements
|
||||
|
||||
CommentPragmas: '^ IWYU pragma:'
|
||||
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
|
||||
DisableFormat: false
|
||||
DisableFormat: false
|
||||
...
|
||||
|
@ -1,6 +1,6 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "COSTouchVisualizer"
|
||||
s.version = "1.0.5"
|
||||
s.version = "1.0.6"
|
||||
s.summary = "Visualize iOS finger touches, gestures and holds on external displays"
|
||||
s.description = <<-DESC
|
||||
Touch Screen Visualizer visualizes your touches, gestures, and holds on
|
||||
|
@ -15,18 +15,18 @@
|
||||
@property (nonatomic, weak) id<COSTouchVisualizerWindowDelegate> touchVisualizerWindowDelegate;
|
||||
|
||||
// Touch effects
|
||||
@property (nonatomic) UIImage* touchImage;
|
||||
@property (nonatomic) UIImage *touchImage;
|
||||
@property (nonatomic) CGFloat touchAlpha;
|
||||
@property (nonatomic) NSTimeInterval fadeDuration;
|
||||
@property (nonatomic) UIColor* strokeColor;
|
||||
@property (nonatomic) UIColor* fillColor;
|
||||
@property (nonatomic) UIColor *strokeColor;
|
||||
@property (nonatomic) UIColor *fillColor;
|
||||
|
||||
// Ripple Effects
|
||||
@property (nonatomic) UIImage* rippleImage;
|
||||
@property (nonatomic) UIImage *rippleImage;
|
||||
@property (nonatomic) CGFloat rippleAlpha;
|
||||
@property (nonatomic) NSTimeInterval rippleFadeDuration;
|
||||
@property (nonatomic) UIColor* rippleStrokeColor;
|
||||
@property (nonatomic) UIColor* rippleFillColor;
|
||||
@property (nonatomic) UIColor *rippleStrokeColor;
|
||||
@property (nonatomic) UIColor *rippleFillColor;
|
||||
|
||||
@property (nonatomic) BOOL stationaryMorphEnabled; // default: YES
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
|
||||
@optional
|
||||
|
||||
- (BOOL)touchVisualizerWindowShouldShowFingertip:(COSTouchVisualizerWindow*)window;
|
||||
- (BOOL)touchVisualizerWindowShouldAlwaysShowFingertip:(COSTouchVisualizerWindow*)window;
|
||||
- (BOOL)touchVisualizerWindowShouldShowFingertip:(COSTouchVisualizerWindow *)window;
|
||||
- (BOOL)touchVisualizerWindowShouldAlwaysShowFingertip:(COSTouchVisualizerWindow *)window;
|
||||
|
||||
@end
|
||||
|
@ -8,6 +8,31 @@
|
||||
|
||||
#import "COSTouchVisualizerWindow.h"
|
||||
|
||||
#pragma mark - Touch Visualizer Window
|
||||
|
||||
@interface TouchVisualizerWindow : UIWindow
|
||||
@end
|
||||
|
||||
@implementation TouchVisualizerWindow
|
||||
|
||||
// UIKit tries to get the rootViewController from the overlay window.
|
||||
// Instead, try to find the rootViewController on some other
|
||||
// application window.
|
||||
// Fixes problems with status bar hiding, because it considers the
|
||||
// overlay window a candidate for controlling the status bar.
|
||||
- (UIViewController *)rootViewController {
|
||||
for (UIWindow *window in [[UIApplication sharedApplication] windows]) {
|
||||
if (self == window)
|
||||
continue;
|
||||
UIViewController *realRootViewController = window.rootViewController;
|
||||
if (realRootViewController != nil)
|
||||
return realRootViewController;
|
||||
}
|
||||
return [super rootViewController];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark - Conopsys Touch Spot View
|
||||
|
||||
@interface COSTouchSpotView : UIImageView
|
||||
@ -21,40 +46,28 @@
|
||||
@implementation COSTouchSpotView
|
||||
@end
|
||||
|
||||
#pragma mark - Conopsys Touch Overlay Window View Controller
|
||||
|
||||
@interface COSTouchOverlayWindowViewController : UIViewController
|
||||
@end
|
||||
|
||||
@implementation COSTouchOverlayWindowViewController
|
||||
|
||||
- (UIStatusBarStyle)preferredStatusBarStyle {
|
||||
return [UIApplication sharedApplication].keyWindow.rootViewController.preferredStatusBarStyle;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark - Conopsys Touch Visualizer Window
|
||||
|
||||
@interface COSTouchVisualizerWindow ()
|
||||
|
||||
@property (nonatomic) UIWindow* overlayWindow;
|
||||
@property (nonatomic) UIViewController* overlayWindowViewController;
|
||||
@property (nonatomic) UIWindow *overlayWindow;
|
||||
@property (nonatomic) UIViewController *overlayWindowViewController;
|
||||
@property (nonatomic) BOOL fingerTipRemovalScheduled;
|
||||
@property (nonatomic) NSTimer* timer;
|
||||
@property (nonatomic) NSTimer *timer;
|
||||
@property (nonatomic) NSSet *allTouches;
|
||||
|
||||
- (void)COSTouchVisualizerWindow_commonInit;
|
||||
- (void)scheduleFingerTipRemoval;
|
||||
- (void)cancelScheduledFingerTipRemoval;
|
||||
- (void)removeInactiveFingerTips;
|
||||
- (void)removeFingerTipWithHash:(NSUInteger)hash animated:(BOOL)animated;
|
||||
- (BOOL)shouldAutomaticallyRemoveFingerTipForTouch:(UITouch*)touch;
|
||||
- (BOOL)shouldAutomaticallyRemoveFingerTipForTouch:(UITouch *)touch;
|
||||
|
||||
@end
|
||||
|
||||
@implementation COSTouchVisualizerWindow
|
||||
|
||||
- (id)initWithCoder:(NSCoder*)decoder {
|
||||
- (id)initWithCoder:(NSCoder *)decoder {
|
||||
// This covers NIB-loaded windows.
|
||||
if (self = [super initWithCoder:decoder])
|
||||
[self COSTouchVisualizerWindow_commonInit];
|
||||
@ -80,15 +93,15 @@
|
||||
self.stationaryMorphEnabled = YES;
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark - Touch / Ripple and Images
|
||||
|
||||
- (UIImage*)touchImage {
|
||||
- (UIImage *)touchImage {
|
||||
if (!_touchImage) {
|
||||
UIBezierPath* clipPath = [UIBezierPath bezierPathWithRect:CGRectMake(0, 0, 50.0, 50.0)];
|
||||
UIBezierPath *clipPath = [UIBezierPath bezierPathWithRect:CGRectMake(0, 0, 50.0, 50.0)];
|
||||
|
||||
UIGraphicsBeginImageContextWithOptions(clipPath.bounds.size, NO, 0);
|
||||
|
||||
UIBezierPath* drawPath = [UIBezierPath bezierPathWithArcCenter:CGPointMake(25.0, 25.0)
|
||||
UIBezierPath *drawPath = [UIBezierPath bezierPathWithArcCenter:CGPointMake(25.0, 25.0)
|
||||
radius:22.0
|
||||
startAngle:0
|
||||
endAngle:2 * M_PI
|
||||
@ -110,13 +123,13 @@
|
||||
return _touchImage;
|
||||
}
|
||||
|
||||
- (UIImage*)rippleImage {
|
||||
- (UIImage *)rippleImage {
|
||||
if (!_rippleImage) {
|
||||
UIBezierPath* clipPath = [UIBezierPath bezierPathWithRect:CGRectMake(0, 0, 50.0, 50.0)];
|
||||
UIBezierPath *clipPath = [UIBezierPath bezierPathWithRect:CGRectMake(0, 0, 50.0, 50.0)];
|
||||
|
||||
UIGraphicsBeginImageContextWithOptions(clipPath.bounds.size, NO, 0);
|
||||
|
||||
UIBezierPath* drawPath = [UIBezierPath bezierPathWithArcCenter:CGPointMake(25.0, 25.0)
|
||||
UIBezierPath *drawPath = [UIBezierPath bezierPathWithArcCenter:CGPointMake(25.0, 25.0)
|
||||
radius:22.0
|
||||
startAngle:0
|
||||
endAngle:2 * M_PI
|
||||
@ -138,13 +151,13 @@
|
||||
return _rippleImage;
|
||||
}
|
||||
|
||||
#pragma mark Active
|
||||
#pragma mark - Active
|
||||
|
||||
- (BOOL)anyScreenIsMirrored {
|
||||
if (![UIScreen instancesRespondToSelector:@selector(mirroredScreen)])
|
||||
return NO;
|
||||
|
||||
for (UIScreen* screen in [UIScreen screens]) {
|
||||
for (UIScreen *screen in [UIScreen screens]) {
|
||||
if ([screen mirroredScreen] != nil) {
|
||||
return YES;
|
||||
}
|
||||
@ -165,17 +178,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark UIWindow overrides
|
||||
#pragma mark - UIWindow overrides
|
||||
|
||||
- (void)sendEvent:(UIEvent*)event {
|
||||
- (void)sendEvent:(UIEvent *)event {
|
||||
if (self.active) {
|
||||
NSSet* allTouches = [event allTouches];
|
||||
for (UITouch* touch in [allTouches allObjects]) {
|
||||
self.allTouches = [event allTouches];
|
||||
for (UITouch *touch in [self.allTouches allObjects]) {
|
||||
switch (touch.phase) {
|
||||
case UITouchPhaseBegan:
|
||||
case UITouchPhaseMoved: {
|
||||
// Generate ripples
|
||||
COSTouchSpotView* rippleView = [[COSTouchSpotView alloc] initWithImage:self.rippleImage];
|
||||
COSTouchSpotView *rippleView = [[COSTouchSpotView alloc] initWithImage:self.rippleImage];
|
||||
[self.overlayWindow addSubview:rippleView];
|
||||
|
||||
rippleView.alpha = self.rippleAlpha;
|
||||
@ -186,19 +199,16 @@
|
||||
options:UIViewAnimationOptionCurveEaseIn // See other
|
||||
// options
|
||||
animations:^{
|
||||
[rippleView setAlpha:0.0];
|
||||
[rippleView setFrame:CGRectInset(rippleView.frame, 25, 25)];
|
||||
}
|
||||
completion:^(BOOL finished) {
|
||||
[rippleView removeFromSuperview];
|
||||
[rippleView setAlpha:0.0];
|
||||
[rippleView setFrame:CGRectInset(rippleView.frame, 25, 25)];
|
||||
} completion:^(BOOL finished) {
|
||||
[rippleView removeFromSuperview];
|
||||
}];
|
||||
}
|
||||
case UITouchPhaseStationary: {
|
||||
COSTouchSpotView* touchView = (COSTouchSpotView*)
|
||||
[self.overlayWindow viewWithTag:touch.hash];
|
||||
COSTouchSpotView *touchView = (COSTouchSpotView *)[self.overlayWindow viewWithTag:touch.hash];
|
||||
|
||||
if (touch.phase != UITouchPhaseStationary && touchView != nil &&
|
||||
[touchView isFadingOut]) {
|
||||
if (touch.phase != UITouchPhaseStationary && touchView != nil && [touchView isFadingOut]) {
|
||||
[self.timer invalidate];
|
||||
[touchView removeFromSuperview];
|
||||
touchView = nil;
|
||||
@ -235,32 +245,24 @@
|
||||
}
|
||||
|
||||
[super sendEvent:event];
|
||||
|
||||
[self scheduleFingerTipRemoval]; // We may not see all
|
||||
// UITouchPhaseEnded/UITouchPhaseCancelled
|
||||
// events.
|
||||
[self scheduleFingerTipRemoval]; // We may not see all UITouchPhaseEnded/UITouchPhaseCancelled events.
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Private
|
||||
#pragma mark - Private
|
||||
|
||||
- (UIWindow*)overlayWindow {
|
||||
- (UIWindow *)overlayWindow {
|
||||
if (!_overlayWindow) {
|
||||
_overlayWindow = [[UIWindow alloc] initWithFrame:self.frame];
|
||||
_overlayWindow = [[TouchVisualizerWindow alloc] initWithFrame:self.frame];
|
||||
_overlayWindow.userInteractionEnabled = NO;
|
||||
_overlayWindow.windowLevel = UIWindowLevelStatusBar;
|
||||
_overlayWindow.backgroundColor = [UIColor clearColor];
|
||||
_overlayWindow.hidden = NO;
|
||||
|
||||
_overlayWindowViewController = [[COSTouchOverlayWindowViewController alloc] init];
|
||||
[_overlayWindow setRootViewController:_overlayWindowViewController];
|
||||
[_overlayWindowViewController setView:_overlayWindow];
|
||||
}
|
||||
|
||||
return _overlayWindow;
|
||||
}
|
||||
|
||||
- (void)scheduleFingerTipRemoval {
|
||||
|
||||
if (self.fingerTipRemovalScheduled)
|
||||
return;
|
||||
self.fingerTipRemovalScheduled = YES;
|
||||
@ -281,22 +283,25 @@
|
||||
|
||||
NSTimeInterval now = [[NSProcessInfo processInfo] systemUptime];
|
||||
const CGFloat REMOVAL_DELAY = 0.2;
|
||||
|
||||
for (COSTouchSpotView* touchView in [self.overlayWindow subviews]) {
|
||||
if (![touchView isKindOfClass:[COSTouchSpotView class]]) continue;
|
||||
for (COSTouchSpotView *touchView in [self.overlayWindow subviews]) {
|
||||
if (![touchView isKindOfClass:[COSTouchSpotView class]])
|
||||
continue;
|
||||
|
||||
if (touchView.shouldAutomaticallyRemoveAfterTimeout && now > touchView.timestamp + REMOVAL_DELAY)
|
||||
[self removeFingerTipWithHash:touchView.tag animated:YES];
|
||||
}
|
||||
|
||||
if ([[self.overlayWindow subviews] count]) [self scheduleFingerTipRemoval];
|
||||
if ([[self.overlayWindow subviews] count])
|
||||
[self scheduleFingerTipRemoval];
|
||||
}
|
||||
|
||||
- (void)removeFingerTipWithHash:(NSUInteger)hash animated:(BOOL)animated {
|
||||
COSTouchSpotView* touchView = (COSTouchSpotView*)[self.overlayWindow viewWithTag:hash];
|
||||
if (touchView == nil) return;
|
||||
COSTouchSpotView *touchView = (COSTouchSpotView *)[self.overlayWindow viewWithTag:hash];
|
||||
if (touchView == nil)
|
||||
return;
|
||||
|
||||
if ([touchView isFadingOut]) return;
|
||||
if ([touchView isFadingOut])
|
||||
return;
|
||||
|
||||
BOOL animationsWereEnabled = [UIView areAnimationsEnabled];
|
||||
|
||||
@ -323,7 +328,7 @@
|
||||
afterDelay:self.fadeDuration];
|
||||
}
|
||||
|
||||
- (BOOL)shouldAutomaticallyRemoveFingerTipForTouch:(UITouch*)touch;
|
||||
- (BOOL)shouldAutomaticallyRemoveFingerTipForTouch:(UITouch *)touch;
|
||||
{
|
||||
// We don't reliably get UITouchPhaseEnded or UITouchPhaseCancelled
|
||||
// events via -sendEvent: for certain touch events. Known cases
|
||||
@ -337,18 +342,20 @@
|
||||
// don't use UITouchPhaseStationary touches for those. *sigh*). So we
|
||||
// end up with this more complicated setup.
|
||||
|
||||
UIView* view = [touch view];
|
||||
UIView *view = [touch view];
|
||||
view = [view hitTest:[touch locationInView:view] withEvent:nil];
|
||||
|
||||
while (view != nil) {
|
||||
if ([view isKindOfClass:[UITableViewCell class]]) {
|
||||
for (UIGestureRecognizer* recognizer in [touch gestureRecognizers]) {
|
||||
if ([recognizer isKindOfClass:[UISwipeGestureRecognizer class]]) return YES;
|
||||
for (UIGestureRecognizer *recognizer in [touch gestureRecognizers]) {
|
||||
if ([recognizer isKindOfClass:[UISwipeGestureRecognizer class]])
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
|
||||
if ([view isKindOfClass:[UITableView class]]) {
|
||||
if ([[touch gestureRecognizers] count] == 0) return YES;
|
||||
if ([[touch gestureRecognizers] count] == 0)
|
||||
return YES;
|
||||
}
|
||||
view = view.superview;
|
||||
}
|
||||
@ -356,8 +363,8 @@
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (void)performMorph:(NSTimer*)theTimer {
|
||||
UIView* view = (UIView*)[theTimer userInfo];
|
||||
- (void)performMorph:(NSTimer *)theTimer {
|
||||
UIView *view = (UIView *)[theTimer userInfo];
|
||||
NSTimeInterval duration = .4;
|
||||
NSTimeInterval delay = 0;
|
||||
// Start
|
||||
@ -395,7 +402,9 @@
|
||||
view.transform = CGAffineTransformMakeScale(1, 1);
|
||||
}
|
||||
completion:^(BOOL finished){
|
||||
|
||||
// If there are no touches, remove this morping touch
|
||||
if (self.allTouches.count == 0)
|
||||
[view removeFromSuperview];
|
||||
}];
|
||||
}];
|
||||
}];
|
||||
|
@ -8,13 +8,14 @@
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
530F5A797A9D4A7BB1CB3265 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 49B1CBA208334F3CBDDFFFE4 /* libPods.a */; };
|
||||
E670B46A1AB3EBEF0043E508 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E670B4691AB3EBEF0043E508 /* Main.storyboard */; };
|
||||
E670B46C1AB3EC8E0043E508 /* Launch Screen.xib in Resources */ = {isa = PBXBuildFile; fileRef = E670B46B1AB3EC8E0043E508 /* Launch Screen.xib */; };
|
||||
E6F67FCD18DE12B4001C954A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E6F67FCC18DE12B4001C954A /* Foundation.framework */; };
|
||||
E6F67FCF18DE12B4001C954A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E6F67FCE18DE12B4001C954A /* CoreGraphics.framework */; };
|
||||
E6F67FD118DE12B4001C954A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E6F67FD018DE12B4001C954A /* UIKit.framework */; };
|
||||
E6F67FD718DE12B4001C954A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = E6F67FD518DE12B4001C954A /* InfoPlist.strings */; };
|
||||
E6F67FD918DE12B4001C954A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = E6F67FD818DE12B4001C954A /* main.m */; };
|
||||
E6F67FDD18DE12B4001C954A /* COSAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E6F67FDC18DE12B4001C954A /* COSAppDelegate.m */; };
|
||||
E6F67FE018DE12B4001C954A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E6F67FDE18DE12B4001C954A /* Main.storyboard */; };
|
||||
E6F67FE318DE12B4001C954A /* COSMasterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E6F67FE218DE12B4001C954A /* COSMasterViewController.m */; };
|
||||
E6F67FE618DE12B4001C954A /* COSDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E6F67FE518DE12B4001C954A /* COSDetailViewController.m */; };
|
||||
E6F67FE818DE12B4001C954A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E6F67FE718DE12B4001C954A /* Images.xcassets */; };
|
||||
@ -38,6 +39,8 @@
|
||||
/* Begin PBXFileReference section */
|
||||
49B1CBA208334F3CBDDFFFE4 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
4AF719864DF9411488359337 /* Pods.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.xcconfig; path = Pods/Pods.xcconfig; sourceTree = "<group>"; };
|
||||
E670B4691AB3EBEF0043E508 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = "<group>"; };
|
||||
E670B46B1AB3EC8E0043E508 /* Launch Screen.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = "Launch Screen.xib"; sourceTree = "<group>"; };
|
||||
E6F67FC918DE12B4001C954A /* TouchVisualizer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TouchVisualizer.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
E6F67FCC18DE12B4001C954A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
E6F67FCE18DE12B4001C954A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
|
||||
@ -48,7 +51,6 @@
|
||||
E6F67FDA18DE12B4001C954A /* TouchVisualizer-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "TouchVisualizer-Prefix.pch"; sourceTree = "<group>"; };
|
||||
E6F67FDB18DE12B4001C954A /* COSAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = COSAppDelegate.h; sourceTree = "<group>"; };
|
||||
E6F67FDC18DE12B4001C954A /* COSAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = COSAppDelegate.m; sourceTree = "<group>"; };
|
||||
E6F67FDF18DE12B4001C954A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
E6F67FE118DE12B4001C954A /* COSMasterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = COSMasterViewController.h; sourceTree = "<group>"; };
|
||||
E6F67FE218DE12B4001C954A /* COSMasterViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = COSMasterViewController.m; sourceTree = "<group>"; };
|
||||
E6F67FE418DE12B4001C954A /* COSDetailViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = COSDetailViewController.h; sourceTree = "<group>"; };
|
||||
@ -127,12 +129,13 @@
|
||||
children = (
|
||||
E6F67FDB18DE12B4001C954A /* COSAppDelegate.h */,
|
||||
E6F67FDC18DE12B4001C954A /* COSAppDelegate.m */,
|
||||
E6F67FDE18DE12B4001C954A /* Main.storyboard */,
|
||||
E670B4691AB3EBEF0043E508 /* Main.storyboard */,
|
||||
E6F67FE118DE12B4001C954A /* COSMasterViewController.h */,
|
||||
E6F67FE218DE12B4001C954A /* COSMasterViewController.m */,
|
||||
E6F67FE418DE12B4001C954A /* COSDetailViewController.h */,
|
||||
E6F67FE518DE12B4001C954A /* COSDetailViewController.m */,
|
||||
E6F67FE718DE12B4001C954A /* Images.xcassets */,
|
||||
E670B46B1AB3EC8E0043E508 /* Launch Screen.xib */,
|
||||
E6F67FD318DE12B4001C954A /* Supporting Files */,
|
||||
);
|
||||
path = TouchVisualizer;
|
||||
@ -247,8 +250,9 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
E6F67FE818DE12B4001C954A /* Images.xcassets in Resources */,
|
||||
E670B46C1AB3EC8E0043E508 /* Launch Screen.xib in Resources */,
|
||||
E6F67FD718DE12B4001C954A /* InfoPlist.strings in Resources */,
|
||||
E6F67FE018DE12B4001C954A /* Main.storyboard in Resources */,
|
||||
E670B46A1AB3EBEF0043E508 /* Main.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -334,14 +338,6 @@
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E6F67FDE18DE12B4001C954A /* Main.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
E6F67FDF18DE12B4001C954A /* Base */,
|
||||
);
|
||||
name = Main.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E6F67FF718DE12B4001C954A /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
|
@ -1,107 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="5023" systemVersion="13A603" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="rS3-R9-Ivy">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Navigation Controller-->
|
||||
<scene sceneID="cUi-kZ-frf">
|
||||
<objects>
|
||||
<navigationController id="rS3-R9-Ivy" sceneMemberID="viewController">
|
||||
<navigationBar key="navigationBar" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" id="yXu-0R-QUA">
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</navigationBar>
|
||||
<connections>
|
||||
<segue destination="pGg-6v-bdr" kind="relationship" relationship="rootViewController" id="RxB-wf-QIq"/>
|
||||
</connections>
|
||||
</navigationController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="eq9-QA-ai8" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-1" y="64"/>
|
||||
</scene>
|
||||
<!--class Prefix:identifier Master View Controller - Master-->
|
||||
<scene sceneID="VgW-fR-Quf">
|
||||
<objects>
|
||||
<tableViewController title="Master" id="pGg-6v-bdr" customClass="COSMasterViewController" sceneMemberID="viewController">
|
||||
<tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="mLL-gJ-YKr">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<prototypes>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" textLabel="2pz-XF-uhl" style="IBUITableViewCellStyleDefault" id="m0d-ak-lc9">
|
||||
<rect key="frame" x="0.0" y="86" width="320" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="m0d-ak-lc9" id="d3P-M7-ByW">
|
||||
<rect key="frame" x="0.0" y="0.0" width="287" height="43"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="2pz-XF-uhl">
|
||||
<rect key="frame" x="15" y="0.0" width="270" height="43"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</tableViewCellContentView>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<connections>
|
||||
<segue destination="Ah7-4n-0Wa" kind="push" identifier="showDetail" id="jUr-3t-vfg"/>
|
||||
</connections>
|
||||
</tableViewCell>
|
||||
</prototypes>
|
||||
<sections/>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="pGg-6v-bdr" id="P41-gY-KXY"/>
|
||||
<outlet property="delegate" destination="pGg-6v-bdr" id="Y6K-Cp-Qkv"/>
|
||||
</connections>
|
||||
</tableView>
|
||||
<navigationItem key="navigationItem" title="Master" id="tQt-TN-PWz"/>
|
||||
</tableViewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="6Cn-md-YlS" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="459" y="64"/>
|
||||
</scene>
|
||||
<!--class Prefix:identifier Detail View Controller - Detail-->
|
||||
<scene sceneID="Cn3-H9-jdl">
|
||||
<objects>
|
||||
<viewController title="Detail" id="Ah7-4n-0Wa" customClass="COSDetailViewController" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="cIm-e0-J51"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="a0L-h9-sNL"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="MMQ-IT-qOo">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<label clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Detail view content goes here" textAlignment="center" lineBreakMode="tailTruncation" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="Lei-5M-9Gs">
|
||||
<rect key="frame" x="20" y="276" width="280" height="17"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<fontDescription key="fontDescription" type="system" size="system"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="Lei-5M-9Gs" firstAttribute="leading" secondItem="MMQ-IT-qOo" secondAttribute="leading" constant="20" symbolic="YES" id="62x-JV-TTJ"/>
|
||||
<constraint firstItem="Lei-5M-9Gs" firstAttribute="centerY" secondItem="MMQ-IT-qOo" secondAttribute="centerY" id="JzS-HC-Rnl"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Lei-5M-9Gs" secondAttribute="trailing" constant="20" symbolic="YES" id="pXB-RP-Zz6"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<navigationItem key="navigationItem" title="Detail" id="cra-N8-TIN"/>
|
||||
<connections>
|
||||
<outlet property="detailDescriptionLabel" destination="Lei-5M-9Gs" id="sCT-F7-F6f"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="lrm-kH-fPn" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="902" y="64"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<simulatedMetricsContainer key="defaultSimulatedMetrics">
|
||||
<simulatedStatusBarMetrics key="statusBar"/>
|
||||
<simulatedOrientationMetrics key="orientation"/>
|
||||
<simulatedScreenMetrics key="destination" type="retina4"/>
|
||||
</simulatedMetricsContainer>
|
||||
</document>
|
@ -8,6 +8,6 @@
|
||||
|
||||
@interface COSAppDelegate : UIResponder <UIApplicationDelegate>
|
||||
|
||||
@property (nonatomic) UIWindow* window;
|
||||
@property (nonatomic) UIWindow *window;
|
||||
|
||||
@end
|
||||
|
@ -14,28 +14,28 @@
|
||||
|
||||
@implementation COSAppDelegate
|
||||
|
||||
- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions {
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||
// Override point for customization after application launch.
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (COSTouchVisualizerWindow*)window {
|
||||
static COSTouchVisualizerWindow* customWindow = nil;
|
||||
- (COSTouchVisualizerWindow *)window {
|
||||
static COSTouchVisualizerWindow *customWindow = nil;
|
||||
if (!customWindow) {
|
||||
customWindow = [[COSTouchVisualizerWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
|
||||
[customWindow setFillColor:[UIColor yellowColor]];
|
||||
[customWindow setStrokeColor:[UIColor purpleColor]];
|
||||
[customWindow setFillColor:[UIColor purpleColor]];
|
||||
[customWindow setStrokeColor:[UIColor blueColor]];
|
||||
[customWindow setTouchAlpha:0.4];
|
||||
|
||||
[customWindow setRippleFillColor:[UIColor yellowColor]];
|
||||
[customWindow setRippleStrokeColor:[UIColor purpleColor]];
|
||||
[customWindow setRippleFillColor:[UIColor purpleColor]];
|
||||
[customWindow setRippleStrokeColor:[UIColor blueColor]];
|
||||
[customWindow setRippleAlpha:0.1];
|
||||
[customWindow setTouchVisualizerWindowDelegate:self];
|
||||
}
|
||||
return customWindow;
|
||||
}
|
||||
|
||||
- (BOOL)touchVisualizerWindowShouldAlwaysShowFingertip:(COSTouchVisualizerWindow*)window {
|
||||
- (BOOL)touchVisualizerWindowShouldAlwaysShowFingertip:(COSTouchVisualizerWindow *)window {
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
#import "COSDetailViewController.h"
|
||||
|
||||
@interface COSDetailViewController ()
|
||||
@property (weak, nonatomic) IBOutlet UILabel *holding;
|
||||
- (void)configureView;
|
||||
@end
|
||||
|
||||
@ -23,11 +24,24 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)toggleStatusBar:(UIButton *)sender {
|
||||
[[UIApplication sharedApplication] setStatusBarHidden:![UIApplication sharedApplication].statusBarHidden withAnimation:UIStatusBarAnimationSlide];
|
||||
}
|
||||
|
||||
- (IBAction)startHoldAction:(UIButton *)sender {
|
||||
self.holding.text = @"Pressed";
|
||||
self.holding.textColor = [UIColor blackColor];
|
||||
}
|
||||
|
||||
- (IBAction)releaseHoldAction:(UIButton *)sender {
|
||||
self.holding.text = @"Not Pressed";
|
||||
self.holding.textColor = [UIColor lightGrayColor];
|
||||
}
|
||||
|
||||
- (void)configureView {
|
||||
// Update the user interface for the detail item.
|
||||
if (self.detailItem) {
|
||||
if (self.detailItem)
|
||||
self.detailDescriptionLabel.text = [self.detailItem description];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
|
@ -10,7 +10,7 @@
|
||||
#import "COSDetailViewController.h"
|
||||
|
||||
@interface COSMasterViewController () {
|
||||
NSMutableArray* _objects;
|
||||
NSMutableArray *_objects;
|
||||
}
|
||||
@end
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
// Do any additional setup after loading the view, typically from a nib.
|
||||
self.navigationItem.leftBarButtonItem = self.editButtonItem;
|
||||
|
||||
UIBarButtonItem* addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(insertNewObject:)];
|
||||
UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(insertNewObject:)];
|
||||
self.navigationItem.rightBarButtonItem = addButton;
|
||||
}
|
||||
|
||||
@ -31,31 +31,32 @@
|
||||
}
|
||||
|
||||
- (void)insertNewObject:(id)sender {
|
||||
if (!_objects) _objects = [NSMutableArray new];
|
||||
if (!_objects)
|
||||
_objects = [NSMutableArray new];
|
||||
[_objects insertObject:[NSDate date] atIndex:0];
|
||||
NSIndexPath* indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
|
||||
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
|
||||
[self.tableView insertRowsAtIndexPaths:@[ indexPath ] withRowAnimation:UITableViewRowAnimationAutomatic];
|
||||
}
|
||||
|
||||
#pragma mark - Table View
|
||||
|
||||
- (NSInteger)tableView:(UITableView*)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
return _objects.count;
|
||||
}
|
||||
|
||||
- (UITableViewCell*)tableView:(UITableView*)tableView cellForRowAtIndexPath:(NSIndexPath*)indexPath {
|
||||
UITableViewCell* cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath];
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath];
|
||||
|
||||
NSDate* object = _objects[indexPath.row];
|
||||
NSDate *object = _objects[indexPath.row];
|
||||
cell.textLabel.text = [object description];
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (BOOL)tableView:(UITableView*)tableView canEditRowAtIndexPath:(NSIndexPath*)indexPath {
|
||||
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView*)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath*)indexPath {
|
||||
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (editingStyle == UITableViewCellEditingStyleDelete) {
|
||||
[_objects removeObjectAtIndex:indexPath.row];
|
||||
[tableView deleteRowsAtIndexPaths:@[ indexPath ] withRowAnimation:UITableViewRowAnimationFade];
|
||||
@ -64,10 +65,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void)prepareForSegue:(UIStoryboardSegue*)segue sender:(id)sender {
|
||||
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
|
||||
if ([segue.identifier isEqualToString:@"showDetail"]) {
|
||||
NSIndexPath* indexPath = [self.tableView indexPathForSelectedRow];
|
||||
NSDate* object = _objects[indexPath.row];
|
||||
NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];
|
||||
NSDate *object = _objects[indexPath.row];
|
||||
[[segue destinationViewController] setDetailItem:object];
|
||||
}
|
||||
}
|
||||
|
@ -14,6 +14,11 @@
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
|
45
Example/TouchVisualizer/Launch Screen.xib
Normal file
45
Example/TouchVisualizer/Launch Screen.xib
Normal file
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6751" systemVersion="14C1510" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6736"/>
|
||||
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2015 conopsys. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
|
||||
<rect key="frame" x="20" y="439" width="441" height="21"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<variation key="widthClass=compact">
|
||||
<fontDescription key="fontDescription" type="system" pointSize="11"/>
|
||||
</variation>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="TouchVisualizer" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
|
||||
<rect key="frame" x="20" y="140" width="441" height="43"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="Kid-kn-2rF"/>
|
||||
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
|
||||
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
|
||||
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
|
||||
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
|
||||
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
|
||||
</constraints>
|
||||
<nil key="simulatedStatusBarMetrics"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<point key="canvasLocation" x="404" y="445"/>
|
||||
</view>
|
||||
</objects>
|
||||
</document>
|
140
Example/TouchVisualizer/Main.storyboard
Normal file
140
Example/TouchVisualizer/Main.storyboard
Normal file
@ -0,0 +1,140 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6751" systemVersion="14C1510" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="Wpx-gg-SGr">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6736"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Navigation Controller-->
|
||||
<scene sceneID="T2d-xJ-baS">
|
||||
<objects>
|
||||
<navigationController id="Wpx-gg-SGr" sceneMemberID="viewController">
|
||||
<navigationBar key="navigationBar" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" id="ffC-Zf-B6t">
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</navigationBar>
|
||||
<connections>
|
||||
<segue destination="7NJ-en-M5G" kind="relationship" relationship="rootViewController" id="ppK-26-0eh"/>
|
||||
</connections>
|
||||
</navigationController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="ut3-Ih-Hvq" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-1" y="64"/>
|
||||
</scene>
|
||||
<!--Master-->
|
||||
<scene sceneID="86B-d4-lSn">
|
||||
<objects>
|
||||
<tableViewController title="Master" id="7NJ-en-M5G" customClass="COSMasterViewController" sceneMemberID="viewController">
|
||||
<tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="KWu-jj-tZx">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<prototypes>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" textLabel="vZ5-VW-GJi" style="IBUITableViewCellStyleDefault" id="38Z-nc-7TB">
|
||||
<rect key="frame" x="0.0" y="86" width="320" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="38Z-nc-7TB" id="D9R-Ko-H7Z">
|
||||
<rect key="frame" x="0.0" y="0.0" width="287" height="43"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="vZ5-VW-GJi">
|
||||
<rect key="frame" x="15" y="0.0" width="270" height="43"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</tableViewCellContentView>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<connections>
|
||||
<segue destination="Gw0-zm-eCg" kind="push" identifier="showDetail" id="t9s-oE-8oV"/>
|
||||
</connections>
|
||||
</tableViewCell>
|
||||
</prototypes>
|
||||
<sections/>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="7NJ-en-M5G" id="Z3Y-tp-9Is"/>
|
||||
<outlet property="delegate" destination="7NJ-en-M5G" id="KwG-Xz-wcT"/>
|
||||
</connections>
|
||||
</tableView>
|
||||
<navigationItem key="navigationItem" title="Master" id="5IB-D0-oFC"/>
|
||||
</tableViewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="13H-Mt-Pl9" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="781" y="64"/>
|
||||
</scene>
|
||||
<!--Detail-->
|
||||
<scene sceneID="HBz-mL-S0U">
|
||||
<objects>
|
||||
<viewController title="Detail" id="Gw0-zm-eCg" customClass="COSDetailViewController" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="IOe-fa-y74"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="clz-xl-zf5"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="5Bv-ow-0lT">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<label clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Detail view content goes here" textAlignment="center" lineBreakMode="tailTruncation" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="ClJ-ko-Drd">
|
||||
<rect key="frame" x="20" y="292" width="560" height="17"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<fontDescription key="fontDescription" type="system" size="system"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="YgA-Ix-pFo">
|
||||
<rect key="frame" x="239" y="351" width="122" height="30"/>
|
||||
<state key="normal" title="Toggle Status Bar">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="toggleStatusBar:" destination="Gw0-zm-eCg" eventType="touchUpInside" id="yYS-8s-AIq"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="KTO-gU-YfQ">
|
||||
<rect key="frame" x="20" y="220" width="127" height="30"/>
|
||||
<state key="normal" title="Hold Down Button">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="releaseHoldAction:" destination="Gw0-zm-eCg" eventType="touchUpInside" id="1bJ-cD-zA7"/>
|
||||
<action selector="releaseHoldAction:" destination="Gw0-zm-eCg" eventType="touchUpOutside" id="l2X-i3-mDk"/>
|
||||
<action selector="startHoldAction:" destination="Gw0-zm-eCg" eventType="touchDown" id="TYF-6g-bra"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Not Pressed" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="eFN-my-Qg9">
|
||||
<rect key="frame" x="480" y="224" width="100" height="20.5"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="100" id="ut4-S4-j7q"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="ClJ-ko-Drd" secondAttribute="trailing" constant="20" symbolic="YES" id="KLS-h5-8Xt"/>
|
||||
<constraint firstItem="ClJ-ko-Drd" firstAttribute="top" secondItem="KTO-gU-YfQ" secondAttribute="bottom" constant="42" id="R4K-XQ-1Vd"/>
|
||||
<constraint firstItem="ClJ-ko-Drd" firstAttribute="centerY" secondItem="5Bv-ow-0lT" secondAttribute="centerY" id="RmA-4E-N45"/>
|
||||
<constraint firstAttribute="centerX" secondItem="YgA-Ix-pFo" secondAttribute="centerX" id="U3b-Pf-WiR"/>
|
||||
<constraint firstItem="ClJ-ko-Drd" firstAttribute="leading" secondItem="KTO-gU-YfQ" secondAttribute="leading" id="ci8-Bn-cMf"/>
|
||||
<constraint firstAttribute="centerX" secondItem="ClJ-ko-Drd" secondAttribute="centerX" id="cxa-1p-wCf"/>
|
||||
<constraint firstItem="ClJ-ko-Drd" firstAttribute="leading" secondItem="5Bv-ow-0lT" secondAttribute="leading" constant="20" symbolic="YES" id="glM-xI-6L7"/>
|
||||
<constraint firstItem="eFN-my-Qg9" firstAttribute="centerY" secondItem="KTO-gU-YfQ" secondAttribute="centerY" constant="-0.5" id="lcq-uR-Xoe"/>
|
||||
<constraint firstItem="YgA-Ix-pFo" firstAttribute="top" secondItem="ClJ-ko-Drd" secondAttribute="bottom" constant="42" id="wZi-Xd-xuO"/>
|
||||
<constraint firstItem="eFN-my-Qg9" firstAttribute="trailing" secondItem="ClJ-ko-Drd" secondAttribute="trailing" id="ybX-o4-Flu"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<navigationItem key="navigationItem" title="Detail" id="NMf-W9-2Hp"/>
|
||||
<connections>
|
||||
<outlet property="detailDescriptionLabel" destination="ClJ-ko-Drd" id="fM3-dV-mjX"/>
|
||||
<outlet property="holding" destination="eFN-my-Qg9" id="Dsj-Rf-jqZ"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="6r1-KD-fbi" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="1564" y="64"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
@ -24,6 +24,8 @@
|
||||
<string>1.0</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>Launch Screen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
@ -46,5 +48,7 @@
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
BIN
touchvisdemo.gif
BIN
touchvisdemo.gif
Binary file not shown.
Before Width: | Height: | Size: 287 KiB After Width: | Height: | Size: 601 KiB |
Loading…
Reference in New Issue
Block a user