Subversion Repository Public Repository

Nextrek

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/*
 *  CodeMacros.h
 *
 *  Created by Massimiliano Pesce on 8/21/09.
 *  Copyright 2009 beeweeb. All rights reserved.
 *
 */

#define DATA_TO_STRING(_data_) [[NSString alloc] initWithData:_data_ encoding:NSASCIIStringEncoding]
	
#define STARTTIMER(_t_,_target_) [NSTimer scheduledTimerWithTimeInterval:_t_ target:self selector:@selector(_target_) userInfo:nil repeats:NO]


#define FADEIN(_view_, _timer_) \
if (_view_) {                   \
[UIView beginAnimations:nil context:nil]; \
[UIView setAnimationDuration:_timer_];  \
_view_.alpha = 1.0; \
[UIView commitAnimations];  \
}

#define FADEOUT(_view_, _timer_) \
if (_view_) {                   \
[UIView beginAnimations:nil context:nil]; \
[UIView setAnimationDuration:_timer_];  \
_view_.alpha = 0.0; \
[UIView commitAnimations];  \
}

#define FADEIN_CALLBACK(_view_, _timer_, _callback_) \
if (_view_) {                   \
[UIView beginAnimations:nil context:nil]; \
[UIView setAnimationDuration:_timer_];  \
_view_.alpha = 1.0; \
[UIView setAnimationDelegate:self]; \
[UIView setAnimationDidStopSelector:@selector(_callback_)]; \
[UIView commitAnimations];  \
}

#define FADEOUT_CALLBACK(_view_, _timer_, _callback_) \
if (_view_) {                   \
[UIView beginAnimations:nil context:nil]; \
[UIView setAnimationDuration:_timer_];  \
_view_.alpha = 0.0; \
[UIView setAnimationDelegate:self]; \
[UIView setAnimationDidStopSelector:@selector(_callback_)];\
[UIView commitAnimations];  \
}


#define ZOOMOUT_CALLBACK(_view_, _timer_, _rect_, _callback_) \
if (_view_) {                   \
[UIView beginAnimations:nil context:nil]; \
[UIView setAnimationDuration:_timer_];  \
[UIView setAnimationCurve:UIViewAnimationCurveEaseIn];\
_view_.alpha = 1.0; \
_view_.frame = _rect_; \
_view_.alpha = 0.0 ; \
[UIView setAnimationDelegate:self]; \
[UIView setAnimationDidStopSelector:@selector(_callback_)];\
[UIView commitAnimations];  \
}

#define ZOOMIN(_view_, _timer_, _rect_) \
if (_view_) {              \
[UIView beginAnimations:nil context:nil]; \
[UIView setAnimationDuration:_timer_];  \
[UIView setAnimationCurve:UIViewAnimationCurveEaseIn];\
_view_.alpha = 0.0 ; \
_view_.frame = _rect_; \
_view_.alpha = 1.0; \
[UIView commitAnimations];  \
}

#define ZOOMIN_CALLBACK(_view_, _timer_, _rect_, _callback_) \
if (_view_) {              \
[UIView beginAnimations:nil context:nil]; \
[UIView setAnimationDuration:_timer_];  \
[UIView setAnimationCurve:UIViewAnimationCurveEaseIn];\
_view_.alpha = 0.0 ; \
_view_.frame = _rect_; \
_view_.alpha = 1.0; \
[UIView setAnimationDelegate:self]; \
[UIView setAnimationDidStopSelector:@selector(_callback_)];\
[UIView commitAnimations];  \
}


#define CREATE_DICTIONARY [[NSMutableDictionary alloc] initWithCapacity:0];
#define CREATE_ARRAY [[NSMutableArray alloc] initWithCapacity:0];

Commits for Nextrek/iOS/PocketVision/PocketVision/Shared/Utils/CodeMacros.h

Diff revisions: vs.
Revision Author Commited Message
62 FAquili picture FAquili Sat 18 Jan, 2014 16:39:26 +0000

PocketVision 1.0