Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 87 lines (66 sloc) 3.46 kb
a3bf418 Mark Lussier added header to all source files with copyright, BSD license info, etc
authored
1 //
de5f4f2 Mark Lussier Updated copyright in the headers
authored
2 // Copyright (c) 2008-2011, Mark Lussier
a3bf418 Mark Lussier added header to all source files with copyright, BSD license info, etc
authored
3 // http://github.com/intabulas/ipivotal
4 // All rights reserved.
5 //
6 // This software is released under the terms of the BSD License.
7 // http://www.opensource.org/licenses/bsd-license.php
8 //
9 // Redistribution and use in source and binary forms, with or without modification,
10 // are permitted provided that the following conditions are met:
11 //
12 // * Redistributions of source code must retain the above copyright notice, this
13 // list of conditions and the following disclaimer.
14 // * Redistributions in binary form must reproduce the above copyright notice,
15 // this list of conditions and the following disclaimer
16 // in the documentation and/or other materials provided with the distribution.
17 // * Neither the name of iPivotal nor the names of its contributors may be used
18 // to endorse or promote products derived from this software without specific
19 // prior written permission.
20 //
21 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
22 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23 // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24 // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
25 // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
29 // OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
30 // OF THE POSSIBILITY OF SUCH DAMAGE.
31 //
32
a06abcd Mark Lussier loading indidicator cell is now done by hand vs a NIB
authored
33 #import "ActivityLabelCell.h"
34
35 @implementation ActivityLabelCell
36
37 @synthesize cellLabel, activityView;
38
84a6103 Mark Lussier cleanup and removing splash screen
authored
39
3b72457 Mark Lussier cleaned up deprecations
authored
40 - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
41 if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
a06abcd Mark Lussier loading indidicator cell is now done by hand vs a NIB
authored
42
b3c16cb Mark Lussier fixed issue with 'loading' cells being selectable
authored
43
44 [self setSelectionStyle:UITableViewCellSelectionStyleNone];
45 [self setAccessoryType:UITableViewCellAccessoryNone];
46
a06abcd Mark Lussier loading indidicator cell is now done by hand vs a NIB
authored
47 cellLabel = [[UILabel alloc] initWithFrame:CGRectMake(34.0f, 0.0f, (self.contentView.frame.size.width - 26.0f), self.contentView.frame.size.height)];
48 cellLabel.autoresizingMask = UIViewAutoresizingNone;
49 cellLabel.backgroundColor = [UIColor clearColor];
50 cellLabel.highlightedTextColor = [UIColor whiteColor];
912102c Mark Lussier defaulting to Helvetica for font
authored
51 cellLabel.font = [UIFont fontWithName:@"Helvetica" size:17.0f];
a06abcd Mark Lussier loading indidicator cell is now done by hand vs a NIB
authored
52 cellLabel.textColor = [UIColor blackColor];
53 cellLabel.textAlignment = UITextAlignmentLeft;
6efc563 Mark Lussier first pass moving out string literals
authored
54 [cellLabel setText:kLabelLoadingProgress];
a06abcd Mark Lussier loading indidicator cell is now done by hand vs a NIB
authored
55
56 activityView = [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(6.0f, 13.0f, 20.0f, 20.0f)];
57 activityView.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhiteLarge;
58 activityView.hidesWhenStopped = YES;
59
60 [self.contentView addSubview:activityView];
61 [self.contentView addSubview:cellLabel];
62
63 }
64 return self;
65 }
66
7ad358b Mark Lussier For the custom cells, handling setFrame so that for controls based on ce...
authored
67 - (void) setFrame:(CGRect)theFrame {
68 [super setFrame:theFrame];
69 }
70
a06abcd Mark Lussier loading indidicator cell is now done by hand vs a NIB
authored
71
72 - (void)dealloc {
a9a1cf3 Mark Lussier starting a round of code cleanup...
authored
73 [cellLabel release]; cellLabel = nil;
74 [activityView release]; activityView = nil;
a06abcd Mark Lussier loading indidicator cell is now done by hand vs a NIB
authored
75 [super dealloc];
76 }
77
9e0a3da Mark Lussier more cleanup: code re-arrangement, more constants, removing template com...
authored
78 - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
79
80 [super setSelected:selected animated:animated];
81 }
82
83
a06abcd Mark Lussier loading indidicator cell is now done by hand vs a NIB
authored
84
85 @end
86
Something went wrong with that request. Please try again.