Subversion Repositories Projects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
805 - 1
//
2
// Copyright 2009-2010 Facebook
3
//
4
// Licensed under the Apache License, Version 2.0 (the "License");
5
// you may not use this file except in compliance with the License.
6
// You may obtain a copy of the License at
7
//
8
//    http://www.apache.org/licenses/LICENSE-2.0
9
//
10
// Unless required by applicable law or agreed to in writing, software
11
// distributed under the License is distributed on an "AS IS" BASIS,
12
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
// See the License for the specific language governing permissions and
14
// limitations under the License.
15
//
16
 
17
#import <Foundation/Foundation.h>
18
#import <UIKit/UIKit.h>
19
 
20
typedef enum {
21
  TTActivityLabelStyleWhite,
22
  TTActivityLabelStyleGray,
23
  TTActivityLabelStyleBlackBox,
24
  TTActivityLabelStyleBlackBezel,
25
  TTActivityLabelStyleBlackBanner,
26
  TTActivityLabelStyleWhiteBezel,
27
  TTActivityLabelStyleWhiteBox
28
} TTActivityLabelStyle;
29
 
30
@class TTView;
31
@class TTButton;
32
 
33
@interface TTActivityLabel : UIView {
34
  TTActivityLabelStyle      _style;
35
 
36
  UIView*                   _bezelView;
37
  UIProgressView*           _progressView;
38
  UIActivityIndicatorView*  _activityIndicator;
39
  UILabel*                  _label;
40
 
41
  float                     _progress;
42
  BOOL                      _smoothesProgress;
43
  NSTimer*                  _smoothTimer;
44
}
45
 
46
@property (nonatomic, readonly) TTActivityLabelStyle style;
47
 
48
@property (nonatomic, assign)   NSString* text;
49
@property (nonatomic, assign)   UIFont*   font;
50
 
51
@property (nonatomic)           float     progress;
52
@property (nonatomic)           BOOL      isAnimating;
53
@property (nonatomic)           BOOL      smoothesProgress;
54
 
55
- (id)initWithFrame:(CGRect)frame style:(TTActivityLabelStyle)style;
56
- (id)initWithFrame:(CGRect)frame style:(TTActivityLabelStyle)style text:(NSString*)text;
57
- (id)initWithStyle:(TTActivityLabelStyle)style;
58
 
59
@end