//
// AppDelegate.m
// Objective-C Fianl Test
//
// Created by user on 19/11/24.
// Copyright © 2019年 user. All rights reserved.
//
#import "AppDelegate.h"
@interface AppDelegate ()
/** 城市编码输入框 /
@property (weak) IBOutlet NSTextField *cityCodeTextField;
/* 状态文本框 /
@property (weak) IBOutlet NSTextField *statusLabel;
/* 城市名称文本框 /
@property (weak) IBOutlet NSTextField *cityNameLabel;
/* 省份名称文本框 /
@property (weak) IBOutlet NSTextField *provinceNameLabel;
/* 更新时间文本框 /
@property (weak) IBOutlet NSTextField *updateTimeLabel;
/* 湿度显示文本框 /
@property (weak) IBOutlet NSTextField *humidityLabel;
/* 温度显示文本框 /
@property (weak) IBOutlet NSTextField *temperatureLabel;
/* 空气质量显示文本框 /
@property (weak) IBOutlet NSTextField *qualityLabel;
/* pm2.5显示文本框 /
@property (weak) IBOutlet NSTextField *pm25Label;
/* pm10显示文本框 /
@property (weak) IBOutlet NSTextField *pm10Label;
/* 预报显示文本框 /
@property (unsafe_unretained) IBOutlet NSTextView *forecastTextView;
/* 搜索结果显示文本框 */
@property (unsafe_unretained) IBOutlet NSTextView *searchResultTextView;
@property (weak) IBOutlet NSWindow *window;
@end
@implementation AppDelegate
- (void)applicationDidFinishLaunching:(NSNotification )aNotification { / 城市编码查询 https://where.heweather.com/location.html API地址 http://t.weather.sojson.com/api/weather/city/城市编码 */ } #pragma mark 天气查询事件
- (IBAction)checkCityWeatherAction:(id)sender { NSLog(@"点击了天气查询 当前查询的城市编码:%@",self.cityCodeTextField.stringValue);
}
- (IBAction)theMostHotDayAction:(id)sender { NSLog(@"点击了预报中最热的一天"); }
(IBAction)theMostColdDayAction:(id)sender {
NSLog(@"点击了预报中最冷的一天");
}(IBAction)sunriseDayAction:(id)sender {
NSLog(@"点击了预报中日出最早的一天");
}(IBAction)northWindDayAction:(id)sender {
NSLog(@"点击了预报中北风的日子");
}(IBAction)fineDayAction:(id)sender {
NSLog(@"点击了预报中晴天的日子");
}(void)applicationWillTerminate:(NSNotification *)aNotification {
// Insert code here to tear down your application
}
@end