- - (NSString*)getDate
- {
- NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
- [formatter setDateStyle:NSDateFormatterMediumStyle];
- [formatter setTimeStyle:NSDateFormatterShortStyle];
- [formatter setDateFormat:@"YY/MM/dd HH:mm"];
- NSTimeZone* timeZone = [NSTimeZone timeZoneWithName:@"Asia/Shanghai"];
- [formatter setTimeZone:timeZone];
- NSDate *datenow = [NSDate date];
- return [formatter stringFromDate:datenow];
- }
碰触背景键盘消失
- - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
- UITouch *touch = [touches anyObject];
- UIView *view = (UIView *)[touch view];
- if (view == _bkImageView || view == _imageView)
- {
- [_upTv resignFirstResponder];
- [_downTv resignFirstResponder];
- }
- }