Skip to content

Commit 7d1bfa3

Browse files
committed
first commit
0 parents  commit 7d1bfa3

19 files changed

+5271
-0
lines changed

Classes/SlideToCancelAppDelegate.h

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//
2+
// SlideToCancelAppDelegate.h
3+
// SlideToCancel
4+
//
5+
6+
#import <UIKit/UIKit.h>
7+
#import "TestIt.h"
8+
9+
@interface SlideToCancelAppDelegate : NSObject <UIApplicationDelegate> {
10+
UIWindow *window;
11+
TestIt *testIt;
12+
}
13+
14+
@property (nonatomic, retain) IBOutlet UIWindow *window;
15+
16+
@end
17+

Classes/SlideToCancelAppDelegate.m

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
//
2+
// SlideToCancelAppDelegate.m
3+
// SlideToCancel
4+
//
5+
6+
#import "SlideToCancelAppDelegate.h"
7+
8+
@implementation SlideToCancelAppDelegate
9+
10+
@synthesize window;
11+
12+
- (void)applicationDidFinishLaunching:(UIApplication *)application {
13+
14+
// Override point for customization after application launch
15+
testIt = [[TestIt alloc] initWithNibName:@"TestIt" bundle:nil];
16+
17+
[window addSubview:testIt.view];
18+
19+
[window makeKeyAndVisible];
20+
}
21+
22+
- (void)dealloc {
23+
[testIt release];
24+
[window release];
25+
[super dealloc];
26+
}
27+
28+
@end

Classes/SlideToCancelViewController.h

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
//
2+
// SlideToCancelViewController.h
3+
// SlideToCancel
4+
//
5+
6+
#import <UIKit/UIKit.h>
7+
8+
@protocol SlideToCancelDelegate;
9+
10+
@interface SlideToCancelViewController : UIViewController {
11+
UIImageView *sliderBackground;
12+
UISlider *slider;
13+
UILabel *label;
14+
NSTimer *animationTimer;
15+
id <SlideToCancelDelegate> delegate;
16+
BOOL touchIsDown;
17+
CGFloat gradientLocations[3];
18+
int animationTimerCount;
19+
}
20+
21+
@property (nonatomic, assign) id <SlideToCancelDelegate> delegate;
22+
23+
// This property is set to NO (disabled) on creation.
24+
// The caller must set it to YES to animate the slider.
25+
// It should be set to NO (disabled) when the view is not visible, in order
26+
// to turn off the timer and conserve CPU resources.
27+
@property (nonatomic) BOOL enabled;
28+
29+
// Access the UILabel, e.g. to change text or color
30+
@property (nonatomic, readonly) UILabel *label;
31+
32+
@end
33+
34+
@protocol SlideToCancelDelegate
35+
36+
@required
37+
- (void) cancelled;
38+
39+
@end

0 commit comments

Comments
 (0)