資源簡介
這是一款基于objective-c的天氣預(yù)報項目,可以聯(lián)網(wǎng)獲取數(shù)據(jù),也可以手動定位城市。

代碼片段和文件信息
//
//??AppDelegate.m
//??WeatherForecast
//
//??Created?by?dragon?on?16/6/17.
//??Copyright???2016年?win.?All?rights?reserved.
//
#import?“AppDelegate.h“
#import?“XPMainViewController.h“
#import?“RESideMenu.h“
#import?“XPLeftViewController.h“
@interface?AppDelegate?()
@end
@implementation?AppDelegate
-?(BOOL)application:(UIApplication?*)application?didFinishLaunchingWithOptions:(NSDictionary?*)launchOptions?{
????
????//創(chuàng)建window
????self.window?=?[[UIWindow?alloc]?initWithframe:SCREEN_BOUNDS];
????
????//創(chuàng)建RESideMenu對象(指定內(nèi)容/左邊/右邊)
????RESideMenu?*sideViewController?=?[[RESideMenu?alloc]?initWithContentViewController:[XPMainViewController?new]?leftMenuViewController:[XPLeftViewController?new]?rightMenuViewController:nil];
????
????sideViewController.backgroundImage?=?[UIImage?imageNamed:@“Stars“];
????//設(shè)置內(nèi)容控制器的陰影顏色/半徑/enable
????sideViewController.contentViewShadowColor?=?[UIColor?blackColor];
????sideViewController.contentViewShadowRadius?=?10;
????sideViewController.contentViewShadowEnabled?=?YES;
????
????//創(chuàng)建跟視圖控制器對象
????self.window.rootViewController?=?sideViewController;
????//顯示
????self.window.backgroundColor?=?[UIColor?clearColor];
????[self.window?makeKeyAndVisible];
????
????return?YES;
}
-?(void)applicationWillResignActive:(UIApplication?*)application?{
????//?Sent?when?the?application?is?about?to?move?from?active?to?inactive?state.?This?can?occur?for?certain?types?of?temporary?interruptions?(such?as?an?incoming?phone?call?or?SMS?message)?or?when?the?user?quits?the?application?and?it?begins?the?transition?to?the?background?state.
????//?Use?this?method?to?pause?ongoing?tasks?disable?timers?and?throttle?down?OpenGL?ES?frame?rates.?Games?should?use?this?method?to?pause?the?game.
}
-?(void)applicationDidEnterBackground:(UIApplication?*)application?{
????//?Use?this?method?to?release?shared?resources?save?user?data?invalidate?timers?and?store?enough?application?state?information?to?restore?your?application?to?its?current?state?in?case?it?is?terminated?later.
????//?If?your?application?supports?background?execution?this?method?is?called?instead?of?applicationWillTerminate:?when?the?user?quits.
}
-?(void)applicationWillEnterForeground:(UIApplication?*)application?{
????//?Called?as?part?of?the?transition?from?the?background?to?the?inactive?state;?here?you?can?undo?many?of?the?changes?made?on?entering?the?background.
}
-?(void)applicationDidBecomeActive:(UIApplication?*)application?{
????//?Restart?any?tasks?that?were?paused?(or?not?yet?started)?while?the?application?was?inactive.?If?the?application?was?previously?in?the?background?optionally?refresh?the?user?interface.
}
-?(void)applicationWillTerminate:(UIApplication?*)application?{
????//?Called?when?the?application?is?about?to?terminate.?Save?data?if?appropriate.?See?also?applicationDidEnterBackground:.
}
@end
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2016-06-17?19:58??WeatherForecast\
?????文件????????6148??2016-06-19?08:47??WeatherForecast\.DS_Store
?????目錄???????????0??2016-06-19?09:18??__MACOSX\
?????目錄???????????0??2016-06-19?09:18??__MACOSX\WeatherForecast\
?????文件?????????120??2016-06-19?08:47??__MACOSX\WeatherForecast\._.DS_Store
?????目錄???????????0??2016-06-17?21:08??WeatherForecast\WeatherForecast\
?????文件????????6148??2016-06-17?20:00??WeatherForecast\WeatherForecast\.DS_Store
?????目錄???????????0??2016-06-19?09:18??__MACOSX\WeatherForecast\WeatherForecast\
?????文件?????????120??2016-06-17?20:00??__MACOSX\WeatherForecast\WeatherForecast\._.DS_Store
?????文件?????????276??2016-06-17?19:57??WeatherForecast\WeatherForecast\AppDelegate.h
?????文件?????????171??2016-06-17?19:57??__MACOSX\WeatherForecast\WeatherForecast\._AppDelegate.h
?????文件????????2921??2016-06-17?20:26??WeatherForecast\WeatherForecast\AppDelegate.m
?????文件?????????171??2016-06-17?20:26??__MACOSX\WeatherForecast\WeatherForecast\._AppDelegate.m
?????目錄???????????0??2016-06-17?21:04??WeatherForecast\WeatherForecast\Assets.xcassets\
?????目錄???????????0??2016-06-17?19:57??WeatherForecast\WeatherForecast\Assets.xcassets\AppIcon.appiconset\
?????文件????????1077??2016-06-17?19:57??WeatherForecast\WeatherForecast\Assets.xcassets\AppIcon.appiconset\Contents.json
?????目錄???????????0??2016-06-19?09:18??__MACOSX\WeatherForecast\WeatherForecast\Assets.xcassets\
?????目錄???????????0??2016-06-19?09:18??__MACOSX\WeatherForecast\WeatherForecast\Assets.xcassets\AppIcon.appiconset\
?????文件?????????171??2016-06-17?19:57??__MACOSX\WeatherForecast\WeatherForecast\Assets.xcassets\AppIcon.appiconset\._Contents.json
?????目錄???????????0??2016-06-17?21:03??WeatherForecast\WeatherForecast\Assets.xcassets\bg.imageset\
?????文件???????60465??2016-06-17?21:03??WeatherForecast\WeatherForecast\Assets.xcassets\bg.imageset\bg.jpg
?????文件?????????299??2016-06-17?21:03??WeatherForecast\WeatherForecast\Assets.xcassets\bg.imageset\Contents.json
?????文件??????????62??2016-06-17?21:04??WeatherForecast\WeatherForecast\Assets.xcassets\Contents.json
?????目錄???????????0??2016-06-17?21:04??WeatherForecast\WeatherForecast\Assets.xcassets\Default-4.7.imageset\
?????文件?????????308??2016-06-17?21:04??WeatherForecast\WeatherForecast\Assets.xcassets\Default-4.7.imageset\Contents.json
?????文件????????5706??2016-06-17?21:04??WeatherForecast\WeatherForecast\Assets.xcassets\Default-4.7.imageset\Default-4.7.png
?????目錄???????????0??2016-06-17?21:04??WeatherForecast\WeatherForecast\Assets.xcassets\Default-5.5.imageset\
?????文件?????????308??2016-06-17?21:04??WeatherForecast\WeatherForecast\Assets.xcassets\Default-5.5.imageset\Contents.json
?????文件???????10771??2016-06-17?21:04??WeatherForecast\WeatherForecast\Assets.xcassets\Default-5.5.imageset\Default-5.5.png
?????目錄???????????0??2016-06-17?21:04??WeatherForecast\WeatherForecast\Assets.xcassets\Default.imageset\
?????文件?????????215??2016-06-17?21:04??WeatherForecast\WeatherForecast\Assets.xcassets\Default.imageset\Contents.json
............此處省略441個文件信息
評論
共有 條評論