Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // ProductionShiftTableViewCellController_iPhone.m
- // OEETracker
- //
- // Created by Jeffrey Jackson on 7/5/11.
- // Copyright 2011 AutoLean, Inc. All rights reserved.
- //
- #import "ProductionShiftTableViewCellController_iPhone.h"
- @implementation ProductionShiftTableViewCellController_iPhone
- @synthesize strShift;
- @synthesize segShift;
- - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
- {
- self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
- if (self) {
- segShift.selectedSegmentIndex = -1;
- [self addObserver:self forKeyPath:@"strShift" options:0 context:NULL];
- }
- return self;
- }
- - (void)setSelected:(BOOL)selected animated:(BOOL)animated
- {
- [super setSelected:selected animated:animated];
- // Configure the view for the selected state
- }
- - (IBAction)setSelectedShift
- {
- switch ([segShift selectedSegmentIndex])
- {
- case 0:
- [self setValue:@"1" forKey:@"strShift"];
- break;
- case 1:
- [self setValue:@"2" forKey:@"strShift"];
- break;
- case 2:
- [self setValue:@"3" forKey:@"strShift"];
- break;
- case 3:
- [self setValue:@"A" forKey:@"strShift"];
- break;
- case 4:
- [self setValue:@"B" forKey:@"strShift"];
- break;
- case 5:
- [self setValue:@"C" forKey:@"strShift"];
- break;
- case 6:
- [self setValue:@"D" forKey:@"strShift"];
- break;
- default:
- break;
- }
- }
- - (void)dealloc
- {
- [segShift release];
- [super dealloc];
- }
- @end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement