Created
October 3, 2013 00:31
-
-
Save andrewschreiber/6802739 to your computer and use it in GitHub Desktop.
date123 triggering semantic error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// RAFirstViewController.m | |
// Rally | |
// | |
// Created by Andrew Schreiber on 9/27/13. | |
// Copyright (c) 2013 Andrew Schreiber. All rights reserved. | |
// | |
#import "RAFirstViewController.h" | |
#import "RASecondViewController.h" | |
@interface RAFirstViewController () | |
@end | |
@implementation RAFirstViewController | |
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
[self timeUpdate]; | |
NSRunLoop *runloop = [NSRunLoop currentRunLoop]; | |
NSTimer *timer = [NSTimer timerWithTimeInterval:1.0 target:self selector:@selector(timeUpdate) userInfo:nil repeats:YES]; | |
[runloop addTimer:timer forMode:NSRunLoopCommonModes]; | |
[runloop addTimer:timer forMode:UITrackingRunLoopMode]; | |
// Do any additional setup after loading the view, typically from a nib. | |
} | |
- (void)didReceiveMemoryWarning | |
{ | |
[super didReceiveMemoryWarning]; | |
// Dispose of any resources that can be recreated. | |
} | |
- (void)timeUpdate | |
{ | |
if(!_presentTime) _presentTime = [[NSString alloc]init]; | |
NSDate *now = [NSDate date]; | |
NSDateFormatter *dateFormat = [[NSDateFormatter alloc]init]; | |
[dateFormat setDateFormat:@"h:mm"]; | |
_presentTime= [dateFormat stringFromDate:now]; | |
_currentTimeLabel.text = _presentTime; | |
NSString *currentAlarmTime = [[NSString alloc]init]; | |
// PROBLEM HERE | |
currentAlarmTime = [dateFormat stringFromDate:date123]; | |
_alarmTimeLabel.text=currentAlarmTime; | |
} | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// RASecondViewController.h | |
// Rally | |
// | |
// Created by Andrew Schreiber on 9/27/13. | |
// Copyright (c) 2013 Andrew Schreiber. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> | |
#import "RARally.h" | |
#import "RAFirstViewController.h" | |
@interface RASecondViewController : UIViewController | |
@property (weak, nonatomic) IBOutlet UIDatePicker *datePicker; | |
@property (weak,nonatomic) IBOutlet UIButton *firstPictureButton; | |
@property (weak,nonatomic) IBOutlet UIButton *secondPictureButton; | |
@property (weak,nonatomic) IBOutlet UIButton *setRallyButton; | |
//DATE DECLARED | |
@property (strong, nonatomic) NSDate *date123; | |
@property (weak,nonatomic) IBOutlet UIImageView *firstPictureView; | |
@property (weak,nonatomic) IBOutlet UIImageView *secondPictureView; | |
@property (strong, nonatomic) RARally *currentRally; | |
@property (strong, nonatomic) NSMutableArray *savedAlarmTimes; | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment