├── XHNewsParsingSwift
├── XHNewsParsingSwift.xcodeproj
│ ├── xcuserdata
│ │ ├── dw_ios.xcuserdatad
│ │ │ ├── xcdebugger
│ │ │ │ └── Breakpoints_v2.xcbkptlist
│ │ │ └── xcschemes
│ │ │ │ ├── xcschememanagement.plist
│ │ │ │ └── XHNewsParsingSwift.xcscheme
│ │ └── Jack.xcuserdatad
│ │ │ └── xcschemes
│ │ │ ├── xcschememanagement.plist
│ │ │ └── XHNewsParsingSwift.xcscheme
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ ├── Jack.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ │ │ └── dw_ios.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── project.pbxproj
├── XHNewsParsingSwift
│ ├── Images.xcassets
│ │ ├── cell_photo_default_small.imageset
│ │ │ ├── cell_photo_default_small@2x.png
│ │ │ └── Contents.json
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── LaunchImage.launchimage
│ │ │ └── Contents.json
│ ├── XHNewsItem.swift
│ ├── XHWebViewDetailController.swift
│ ├── Info.plist
│ ├── AppDelegate.swift
│ ├── XHNewsTableViewController.swift
│ └── Base.lproj
│ │ └── Main.storyboard
└── XHNewsParsingSwiftTests
│ ├── Info.plist
│ └── XHNewsParsingSwiftTests.swift
├── README.md
└── LICENSE
/XHNewsParsingSwift/XHNewsParsingSwift.xcodeproj/xcuserdata/dw_ios.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/XHNewsParsingSwift/XHNewsParsingSwift.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/XHNewsParsingSwift/XHNewsParsingSwift/Images.xcassets/cell_photo_default_small.imageset/cell_photo_default_small@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xhzengAIB/XHNewsParsingSwift/HEAD/XHNewsParsingSwift/XHNewsParsingSwift/Images.xcassets/cell_photo_default_small.imageset/cell_photo_default_small@2x.png
--------------------------------------------------------------------------------
/XHNewsParsingSwift/XHNewsParsingSwift.xcodeproj/project.xcworkspace/xcuserdata/Jack.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xhzengAIB/XHNewsParsingSwift/HEAD/XHNewsParsingSwift/XHNewsParsingSwift.xcodeproj/project.xcworkspace/xcuserdata/Jack.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/XHNewsParsingSwift/XHNewsParsingSwift.xcodeproj/project.xcworkspace/xcuserdata/dw_ios.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xhzengAIB/XHNewsParsingSwift/HEAD/XHNewsParsingSwift/XHNewsParsingSwift.xcodeproj/project.xcworkspace/xcuserdata/dw_ios.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/XHNewsParsingSwift/XHNewsParsingSwift/Images.xcassets/cell_photo_default_small.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "2x",
6 | "filename" : "cell_photo_default_small@2x.png"
7 | }
8 | ],
9 | "info" : {
10 | "version" : 1,
11 | "author" : "xcode"
12 | }
13 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | XHNewsParsing
4 | =============
5 |
6 | XHNewsParsing is sina news client, use swift.
7 |
8 | 1、use NSOperationQueue and NSURLConnection load net work data.
9 | 2、use UITableView show news data.
10 |
11 |
12 |
--------------------------------------------------------------------------------
/XHNewsParsingSwift/XHNewsParsingSwift/XHNewsItem.swift:
--------------------------------------------------------------------------------
1 | //
2 | // XHNewsTableViewController.swift
3 | // XHNewsParsingSwift
4 | //
5 | // Created by dw_iOS on 14-6-5.
6 | // Copyright (c) 2014年 嗨,我是曾宪华(@xhzengAIB),曾加入YY Inc.担任高级移动开发工程师,拍立秀App联合创始人,热衷于简洁、而富有理性的事物 QQ:543413507 主页:http://zengxianhua.com All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | class XHNewsItem {
12 | var newsTitle = NSString()
13 | var newsThumb = NSString()
14 | var newsID = NSString()
15 | }
16 |
--------------------------------------------------------------------------------
/XHNewsParsingSwift/XHNewsParsingSwift/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "40x40",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "60x60",
16 | "scale" : "2x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/XHNewsParsingSwift/XHNewsParsingSwift/Images.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "orientation" : "portrait",
5 | "idiom" : "iphone",
6 | "extent" : "full-screen",
7 | "minimum-system-version" : "7.0",
8 | "scale" : "2x"
9 | },
10 | {
11 | "orientation" : "portrait",
12 | "idiom" : "iphone",
13 | "subtype" : "retina4",
14 | "extent" : "full-screen",
15 | "minimum-system-version" : "7.0",
16 | "scale" : "2x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/XHNewsParsingSwift/XHNewsParsingSwift.xcodeproj/xcuserdata/Jack.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | XHNewsParsingSwift.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 7D959CDE19404DAA008E110D
16 |
17 | primary
18 |
19 |
20 | 7D959CF219404DAA008E110D
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/XHNewsParsingSwift/XHNewsParsingSwift.xcodeproj/xcuserdata/dw_ios.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | XHNewsParsingSwift.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 7D959CDE19404DAA008E110D
16 |
17 | primary
18 |
19 |
20 | 7D959CF219404DAA008E110D
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/XHNewsParsingSwift/XHNewsParsingSwiftTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | com.duowan..${PRODUCT_NAME:rfc1034identifier}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Jack
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/XHNewsParsingSwift/XHNewsParsingSwift/XHWebViewDetailController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // XHWebViewDetailController.swift
3 | // XHNewsParsingSwift
4 | //
5 | // Created by dw_iOS on 14-6-5.
6 | // Copyright (c) 2014年 嗨,我是曾宪华(@xhzengAIB),曾加入YY Inc.担任高级移动开发工程师,拍立秀App联合创始人,热衷于简洁、而富有理性的事物 QQ:543413507 主页:http://zengxianhua.com All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import UIKit
11 |
12 | class XHWebViewDetailController : UIViewController {
13 | var detailID = NSString()
14 |
15 | var detailURL = "http://qingbin.sinaapp.com/api/html/"
16 |
17 | @IBOutlet var webView : UIWebView?
18 |
19 |
20 | override func viewDidLoad() {
21 | super.viewDidLoad()
22 | // Do any additional setup after loading the view, typically from a nib.
23 | }
24 |
25 | override func viewDidAppear(animated: Bool) {
26 | super.viewDidAppear(animated)
27 | loadDataSource();
28 | }
29 |
30 | func loadDataSource() {
31 | var urlString = detailURL + "\(detailID).html"
32 | var url: NSURL = NSURL(string: urlString)!
33 |
34 | var urlRequest = NSURLRequest(URL :url)
35 | webView?.loadRequest(urlRequest)
36 | }
37 | }
--------------------------------------------------------------------------------
/XHNewsParsingSwift/XHNewsParsingSwiftTests/XHNewsParsingSwiftTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // XHNewsTableViewController.swift
3 | // XHNewsParsingSwift
4 | //
5 | // Created by dw_iOS on 14-6-5.
6 | // Copyright (c) 2014年 嗨,我是曾宪华(@xhzengAIB),曾加入YY Inc.担任高级移动开发工程师,拍立秀App联合创始人,热衷于简洁、而富有理性的事物 QQ:543413507 主页:http://zengxianhua.com All rights reserved.
7 | //
8 |
9 | import XCTest
10 |
11 | class XHNewsParsingSwiftTests: XCTestCase {
12 |
13 | override func setUp() {
14 | super.setUp()
15 | // Put setup code here. This method is called before the invocation of each test method in the class.
16 | }
17 |
18 | override func tearDown() {
19 | // Put teardown code here. This method is called after the invocation of each test method in the class.
20 | super.tearDown()
21 | }
22 |
23 | func testExample() {
24 | // This is an example of a functional test case.
25 | XCTAssert(true, "Pass")
26 | }
27 |
28 | func testPerformanceExample() {
29 | // This is an example of a performance test case.
30 | self.measureBlock() {
31 | // Put the code you want to measure the time of here.
32 | }
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/XHNewsParsingSwift/XHNewsParsingSwift/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | com.duowan..${PRODUCT_NAME:rfc1034identifier}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UIStatusBarTintParameters
32 |
33 | UINavigationBar
34 |
35 | Style
36 | UIBarStyleDefault
37 | Translucent
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/XHNewsParsingSwift/XHNewsParsingSwift/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // XHNewsParsingSwift
4 | //
5 | // Created by dw_iOS on 14-6-5.
6 | // Copyright (c) 2014年 嗨,我是曾宪华(@xhzengAIB),曾加入YY Inc.担任高级移动开发工程师,拍立秀App联合创始人,热衷于简洁、而富有理性的事物 QQ:543413507 主页:http://zengxianhua.com All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 |
17 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
18 | // Override point for customization after application launch.
19 | return true
20 | }
21 |
22 | func applicationWillResignActive(application: UIApplication) {
23 | // 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.
24 | // 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.
25 | }
26 |
27 | func applicationDidEnterBackground(application: UIApplication) {
28 | // 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.
29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
30 | }
31 |
32 | func applicationWillEnterForeground(application: UIApplication) {
33 | // 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.
34 | }
35 |
36 | func applicationDidBecomeActive(application: UIApplication) {
37 | // 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.
38 | }
39 |
40 | func applicationWillTerminate(application: UIApplication) {
41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
42 | }
43 |
44 |
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/XHNewsParsingSwift/XHNewsParsingSwift.xcodeproj/xcuserdata/dw_ios.xcuserdatad/xcschemes/XHNewsParsingSwift.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
49 |
50 |
51 |
52 |
61 |
62 |
68 |
69 |
70 |
71 |
72 |
73 |
79 |
80 |
86 |
87 |
88 |
89 |
91 |
92 |
95 |
96 |
97 |
--------------------------------------------------------------------------------
/XHNewsParsingSwift/XHNewsParsingSwift.xcodeproj/xcuserdata/Jack.xcuserdatad/xcschemes/XHNewsParsingSwift.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
49 |
50 |
51 |
52 |
53 |
54 |
64 |
66 |
72 |
73 |
74 |
75 |
76 |
77 |
83 |
85 |
91 |
92 |
93 |
94 |
96 |
97 |
100 |
101 |
102 |
--------------------------------------------------------------------------------
/XHNewsParsingSwift/XHNewsParsingSwift/XHNewsTableViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // XHNewsTableViewController.swift
3 | // XHNewsParsingSwift
4 | //
5 | // Created by dw_iOS on 14-6-5.
6 | // Copyright (c) 2014年 嗨,我是曾宪华(@xhzengAIB),曾加入YY Inc.担任高级移动开发工程师,拍立秀App联合创始人,热衷于简洁、而富有理性的事物 QQ:543413507 主页:http://zengxianhua.com All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import UIKit
11 |
12 | class XHNewsTableViewController : UITableViewController {
13 | var dataSource = []
14 |
15 | var thumbQueue = NSOperationQueue()
16 |
17 | let hackerNewsApiUrl = "http://qingbin.sinaapp.com/api/lists?ntype=%E5%9B%BE%E7%89%87&pageNo=1&pagePer=10&list.htm"
18 |
19 | override func awakeFromNib() {
20 | super.awakeFromNib()
21 | }
22 |
23 | override func viewDidLoad() {
24 | super.viewDidLoad()
25 | // Do any additional setup after loading the view, typically from a nib.
26 |
27 | let refreshControl = UIRefreshControl()
28 | refreshControl.attributedTitle = NSAttributedString(string: "下拉刷新")
29 | refreshControl.addTarget(self, action: "loadDataSource", forControlEvents: UIControlEvents.ValueChanged)
30 | self.refreshControl = refreshControl
31 |
32 | loadDataSource();
33 | }
34 |
35 | override func viewDidAppear(animated: Bool) {
36 | super.viewDidAppear(animated)
37 | }
38 |
39 | override func didReceiveMemoryWarning() {
40 | super.didReceiveMemoryWarning()
41 | // Dispose of any resources that can be recreated.
42 | }
43 |
44 | func loadDataSource() {
45 | self.refreshControl?.beginRefreshing()
46 | var url: NSURL = NSURL(string: hackerNewsApiUrl)!
47 |
48 | var request = NSURLRequest(URL: url)
49 | var loadDataSourceQueue = NSOperationQueue();
50 |
51 | NSURLConnection.sendAsynchronousRequest(request, queue: loadDataSourceQueue, completionHandler: { response, data, error in
52 | if (error != nil) {
53 | println(error)
54 | dispatch_async(dispatch_get_main_queue(), {
55 | // self.refreshControl?.endRefreshing()
56 | })
57 | } else {
58 | let json = NSJSONSerialization.JSONObjectWithData(data, options: NSJSONReadingOptions.MutableContainers, error: nil) as NSDictionary
59 | let newsDataSource = json["item"] as NSArray
60 |
61 | var currentNewsDataSource = NSMutableArray()
62 | for currentNews : AnyObject in newsDataSource {
63 | let newsItem = XHNewsItem()
64 | newsItem.newsTitle = currentNews["title"] as NSString
65 | newsItem.newsThumb = currentNews["thumb"] as NSString
66 | newsItem.newsID = currentNews["id"] as NSString
67 | currentNewsDataSource.addObject(newsItem)
68 | }
69 |
70 | dispatch_async(dispatch_get_main_queue(), {
71 | self.dataSource = currentNewsDataSource
72 | self.tableView.reloadData()
73 | self.refreshControl?.endRefreshing()
74 | })
75 | }
76 | })
77 | }
78 |
79 | // #pragma mark - Segues
80 | override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
81 | if segue.identifier == "showWebDetail" {
82 | let indexPath = self.tableView.indexPathForSelectedRow() as NSIndexPath!
83 | let newsItem = dataSource[indexPath.row] as XHNewsItem
84 | let controller = segue.destinationViewController as XHWebViewDetailController
85 | controller.detailID = newsItem.newsID;
86 | }
87 |
88 | }
89 |
90 |
91 | // #pragma mark - Table View
92 |
93 | override func numberOfSectionsInTableView(tableView: UITableView) -> Int {
94 | return 1
95 | }
96 |
97 | override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
98 | return dataSource.count
99 | }
100 |
101 | override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
102 | let cell = tableView.dequeueReusableCellWithIdentifier("XHNewsCell", forIndexPath: indexPath) as UITableViewCell
103 |
104 | let newsItem = dataSource[indexPath.row] as XHNewsItem
105 |
106 | cell.textLabel.text = newsItem.newsTitle
107 | cell.detailTextLabel?.text = newsItem.newsID;
108 | cell.imageView.image = UIImage(named :"cell_photo_default_small")
109 | cell.imageView.contentMode = UIViewContentMode.ScaleAspectFit
110 |
111 | var url: NSURL = NSURL(string: newsItem.newsThumb)!
112 |
113 |
114 | let request = NSURLRequest(URL :url)
115 | NSURLConnection.sendAsynchronousRequest(request, queue: thumbQueue, completionHandler: { response, data, error in
116 | if (error != nil) {
117 | println(error)
118 |
119 | } else {
120 | let image = UIImage.init(data :data)
121 | dispatch_async(dispatch_get_main_queue(), {
122 | cell.imageView.image = image
123 | })
124 | }
125 | })
126 |
127 |
128 | return cell
129 | }
130 |
131 | override func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {
132 | return 80
133 | }
134 |
135 | }
136 |
--------------------------------------------------------------------------------
/XHNewsParsingSwift/XHNewsParsingSwift/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
27 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
--------------------------------------------------------------------------------
/XHNewsParsingSwift/XHNewsParsingSwift.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 7D00ACC71941600F009AC5DB /* XHNewsItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D00ACC61941600F009AC5DB /* XHNewsItem.swift */; };
11 | 7D959CE519404DAA008E110D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D959CE419404DAA008E110D /* AppDelegate.swift */; };
12 | 7D959CEC19404DAA008E110D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7D959CEA19404DAA008E110D /* Main.storyboard */; };
13 | 7D959CEE19404DAA008E110D /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7D959CED19404DAA008E110D /* Images.xcassets */; };
14 | 7D959CFA19404DAA008E110D /* XHNewsParsingSwiftTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D959CF919404DAA008E110D /* XHNewsParsingSwiftTests.swift */; };
15 | 7D959D0419404DFF008E110D /* XHNewsTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D959D0319404DFF008E110D /* XHNewsTableViewController.swift */; };
16 | 7D959D0619404E4B008E110D /* XHWebViewDetailController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D959D0519404E4B008E110D /* XHWebViewDetailController.swift */; };
17 | /* End PBXBuildFile section */
18 |
19 | /* Begin PBXContainerItemProxy section */
20 | 7D959CF419404DAA008E110D /* PBXContainerItemProxy */ = {
21 | isa = PBXContainerItemProxy;
22 | containerPortal = 7D959CD719404DAA008E110D /* Project object */;
23 | proxyType = 1;
24 | remoteGlobalIDString = 7D959CDE19404DAA008E110D;
25 | remoteInfo = XHNewsParsingSwift;
26 | };
27 | /* End PBXContainerItemProxy section */
28 |
29 | /* Begin PBXFileReference section */
30 | 7D00ACC61941600F009AC5DB /* XHNewsItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = XHNewsItem.swift; sourceTree = ""; };
31 | 7D959CDF19404DAA008E110D /* XHNewsParsingSwift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = XHNewsParsingSwift.app; sourceTree = BUILT_PRODUCTS_DIR; };
32 | 7D959CE319404DAA008E110D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
33 | 7D959CE419404DAA008E110D /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
34 | 7D959CEB19404DAA008E110D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
35 | 7D959CED19404DAA008E110D /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
36 | 7D959CF319404DAA008E110D /* XHNewsParsingSwiftTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = XHNewsParsingSwiftTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
37 | 7D959CF819404DAA008E110D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
38 | 7D959CF919404DAA008E110D /* XHNewsParsingSwiftTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XHNewsParsingSwiftTests.swift; sourceTree = ""; };
39 | 7D959D0319404DFF008E110D /* XHNewsTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = XHNewsTableViewController.swift; sourceTree = ""; };
40 | 7D959D0519404E4B008E110D /* XHWebViewDetailController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = XHWebViewDetailController.swift; sourceTree = ""; };
41 | /* End PBXFileReference section */
42 |
43 | /* Begin PBXFrameworksBuildPhase section */
44 | 7D959CDC19404DAA008E110D /* Frameworks */ = {
45 | isa = PBXFrameworksBuildPhase;
46 | buildActionMask = 2147483647;
47 | files = (
48 | );
49 | runOnlyForDeploymentPostprocessing = 0;
50 | };
51 | 7D959CF019404DAA008E110D /* Frameworks */ = {
52 | isa = PBXFrameworksBuildPhase;
53 | buildActionMask = 2147483647;
54 | files = (
55 | );
56 | runOnlyForDeploymentPostprocessing = 0;
57 | };
58 | /* End PBXFrameworksBuildPhase section */
59 |
60 | /* Begin PBXGroup section */
61 | 7D959CD619404DAA008E110D = {
62 | isa = PBXGroup;
63 | children = (
64 | 7D959CE119404DAA008E110D /* XHNewsParsingSwift */,
65 | 7D959CF619404DAA008E110D /* XHNewsParsingSwiftTests */,
66 | 7D959CE019404DAA008E110D /* Products */,
67 | );
68 | sourceTree = "";
69 | };
70 | 7D959CE019404DAA008E110D /* Products */ = {
71 | isa = PBXGroup;
72 | children = (
73 | 7D959CDF19404DAA008E110D /* XHNewsParsingSwift.app */,
74 | 7D959CF319404DAA008E110D /* XHNewsParsingSwiftTests.xctest */,
75 | );
76 | name = Products;
77 | sourceTree = "";
78 | };
79 | 7D959CE119404DAA008E110D /* XHNewsParsingSwift */ = {
80 | isa = PBXGroup;
81 | children = (
82 | 7D959CE419404DAA008E110D /* AppDelegate.swift */,
83 | 7D00ACC61941600F009AC5DB /* XHNewsItem.swift */,
84 | 7D959D0319404DFF008E110D /* XHNewsTableViewController.swift */,
85 | 7D959D0519404E4B008E110D /* XHWebViewDetailController.swift */,
86 | 7D959CEA19404DAA008E110D /* Main.storyboard */,
87 | 7D959CED19404DAA008E110D /* Images.xcassets */,
88 | 7D959CE219404DAA008E110D /* Supporting Files */,
89 | );
90 | path = XHNewsParsingSwift;
91 | sourceTree = "";
92 | };
93 | 7D959CE219404DAA008E110D /* Supporting Files */ = {
94 | isa = PBXGroup;
95 | children = (
96 | 7D959CE319404DAA008E110D /* Info.plist */,
97 | );
98 | name = "Supporting Files";
99 | sourceTree = "";
100 | };
101 | 7D959CF619404DAA008E110D /* XHNewsParsingSwiftTests */ = {
102 | isa = PBXGroup;
103 | children = (
104 | 7D959CF919404DAA008E110D /* XHNewsParsingSwiftTests.swift */,
105 | 7D959CF719404DAA008E110D /* Supporting Files */,
106 | );
107 | path = XHNewsParsingSwiftTests;
108 | sourceTree = "";
109 | };
110 | 7D959CF719404DAA008E110D /* Supporting Files */ = {
111 | isa = PBXGroup;
112 | children = (
113 | 7D959CF819404DAA008E110D /* Info.plist */,
114 | );
115 | name = "Supporting Files";
116 | sourceTree = "";
117 | };
118 | /* End PBXGroup section */
119 |
120 | /* Begin PBXNativeTarget section */
121 | 7D959CDE19404DAA008E110D /* XHNewsParsingSwift */ = {
122 | isa = PBXNativeTarget;
123 | buildConfigurationList = 7D959CFD19404DAA008E110D /* Build configuration list for PBXNativeTarget "XHNewsParsingSwift" */;
124 | buildPhases = (
125 | 7D959CDB19404DAA008E110D /* Sources */,
126 | 7D959CDC19404DAA008E110D /* Frameworks */,
127 | 7D959CDD19404DAA008E110D /* Resources */,
128 | );
129 | buildRules = (
130 | );
131 | dependencies = (
132 | );
133 | name = XHNewsParsingSwift;
134 | productName = XHNewsParsingSwift;
135 | productReference = 7D959CDF19404DAA008E110D /* XHNewsParsingSwift.app */;
136 | productType = "com.apple.product-type.application";
137 | };
138 | 7D959CF219404DAA008E110D /* XHNewsParsingSwiftTests */ = {
139 | isa = PBXNativeTarget;
140 | buildConfigurationList = 7D959D0019404DAA008E110D /* Build configuration list for PBXNativeTarget "XHNewsParsingSwiftTests" */;
141 | buildPhases = (
142 | 7D959CEF19404DAA008E110D /* Sources */,
143 | 7D959CF019404DAA008E110D /* Frameworks */,
144 | 7D959CF119404DAA008E110D /* Resources */,
145 | );
146 | buildRules = (
147 | );
148 | dependencies = (
149 | 7D959CF519404DAA008E110D /* PBXTargetDependency */,
150 | );
151 | name = XHNewsParsingSwiftTests;
152 | productName = XHNewsParsingSwiftTests;
153 | productReference = 7D959CF319404DAA008E110D /* XHNewsParsingSwiftTests.xctest */;
154 | productType = "com.apple.product-type.bundle.unit-test";
155 | };
156 | /* End PBXNativeTarget section */
157 |
158 | /* Begin PBXProject section */
159 | 7D959CD719404DAA008E110D /* Project object */ = {
160 | isa = PBXProject;
161 | attributes = {
162 | LastUpgradeCheck = 0600;
163 | ORGANIZATIONNAME = "广州华多网络科技有限公司 多玩事业部 iOS软件工程师 曾宪华";
164 | TargetAttributes = {
165 | 7D959CDE19404DAA008E110D = {
166 | CreatedOnToolsVersion = 6.0;
167 | };
168 | 7D959CF219404DAA008E110D = {
169 | CreatedOnToolsVersion = 6.0;
170 | TestTargetID = 7D959CDE19404DAA008E110D;
171 | };
172 | };
173 | };
174 | buildConfigurationList = 7D959CDA19404DAA008E110D /* Build configuration list for PBXProject "XHNewsParsingSwift" */;
175 | compatibilityVersion = "Xcode 3.2";
176 | developmentRegion = English;
177 | hasScannedForEncodings = 0;
178 | knownRegions = (
179 | en,
180 | Base,
181 | );
182 | mainGroup = 7D959CD619404DAA008E110D;
183 | productRefGroup = 7D959CE019404DAA008E110D /* Products */;
184 | projectDirPath = "";
185 | projectRoot = "";
186 | targets = (
187 | 7D959CDE19404DAA008E110D /* XHNewsParsingSwift */,
188 | 7D959CF219404DAA008E110D /* XHNewsParsingSwiftTests */,
189 | );
190 | };
191 | /* End PBXProject section */
192 |
193 | /* Begin PBXResourcesBuildPhase section */
194 | 7D959CDD19404DAA008E110D /* Resources */ = {
195 | isa = PBXResourcesBuildPhase;
196 | buildActionMask = 2147483647;
197 | files = (
198 | 7D959CEC19404DAA008E110D /* Main.storyboard in Resources */,
199 | 7D959CEE19404DAA008E110D /* Images.xcassets in Resources */,
200 | );
201 | runOnlyForDeploymentPostprocessing = 0;
202 | };
203 | 7D959CF119404DAA008E110D /* Resources */ = {
204 | isa = PBXResourcesBuildPhase;
205 | buildActionMask = 2147483647;
206 | files = (
207 | );
208 | runOnlyForDeploymentPostprocessing = 0;
209 | };
210 | /* End PBXResourcesBuildPhase section */
211 |
212 | /* Begin PBXSourcesBuildPhase section */
213 | 7D959CDB19404DAA008E110D /* Sources */ = {
214 | isa = PBXSourcesBuildPhase;
215 | buildActionMask = 2147483647;
216 | files = (
217 | 7D959D0419404DFF008E110D /* XHNewsTableViewController.swift in Sources */,
218 | 7D959CE519404DAA008E110D /* AppDelegate.swift in Sources */,
219 | 7D959D0619404E4B008E110D /* XHWebViewDetailController.swift in Sources */,
220 | 7D00ACC71941600F009AC5DB /* XHNewsItem.swift in Sources */,
221 | );
222 | runOnlyForDeploymentPostprocessing = 0;
223 | };
224 | 7D959CEF19404DAA008E110D /* Sources */ = {
225 | isa = PBXSourcesBuildPhase;
226 | buildActionMask = 2147483647;
227 | files = (
228 | 7D959CFA19404DAA008E110D /* XHNewsParsingSwiftTests.swift in Sources */,
229 | );
230 | runOnlyForDeploymentPostprocessing = 0;
231 | };
232 | /* End PBXSourcesBuildPhase section */
233 |
234 | /* Begin PBXTargetDependency section */
235 | 7D959CF519404DAA008E110D /* PBXTargetDependency */ = {
236 | isa = PBXTargetDependency;
237 | target = 7D959CDE19404DAA008E110D /* XHNewsParsingSwift */;
238 | targetProxy = 7D959CF419404DAA008E110D /* PBXContainerItemProxy */;
239 | };
240 | /* End PBXTargetDependency section */
241 |
242 | /* Begin PBXVariantGroup section */
243 | 7D959CEA19404DAA008E110D /* Main.storyboard */ = {
244 | isa = PBXVariantGroup;
245 | children = (
246 | 7D959CEB19404DAA008E110D /* Base */,
247 | );
248 | name = Main.storyboard;
249 | sourceTree = "";
250 | };
251 | /* End PBXVariantGroup section */
252 |
253 | /* Begin XCBuildConfiguration section */
254 | 7D959CFB19404DAA008E110D /* Debug */ = {
255 | isa = XCBuildConfiguration;
256 | buildSettings = {
257 | ALWAYS_SEARCH_USER_PATHS = NO;
258 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
259 | CLANG_CXX_LIBRARY = "libc++";
260 | CLANG_ENABLE_MODULES = YES;
261 | CLANG_ENABLE_OBJC_ARC = YES;
262 | CLANG_WARN_BOOL_CONVERSION = YES;
263 | CLANG_WARN_CONSTANT_CONVERSION = YES;
264 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
265 | CLANG_WARN_EMPTY_BODY = YES;
266 | CLANG_WARN_ENUM_CONVERSION = YES;
267 | CLANG_WARN_INT_CONVERSION = YES;
268 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
269 | CLANG_WARN_UNREACHABLE_CODE = YES;
270 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
271 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
272 | COPY_PHASE_STRIP = NO;
273 | ENABLE_STRICT_OBJC_MSGSEND = YES;
274 | GCC_C_LANGUAGE_STANDARD = gnu99;
275 | GCC_DYNAMIC_NO_PIC = NO;
276 | GCC_OPTIMIZATION_LEVEL = 0;
277 | GCC_PREPROCESSOR_DEFINITIONS = (
278 | "DEBUG=1",
279 | "$(inherited)",
280 | );
281 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
282 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
283 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
284 | GCC_WARN_UNDECLARED_SELECTOR = YES;
285 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
286 | GCC_WARN_UNUSED_FUNCTION = YES;
287 | GCC_WARN_UNUSED_VARIABLE = YES;
288 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
289 | METAL_ENABLE_DEBUG_INFO = YES;
290 | ONLY_ACTIVE_ARCH = YES;
291 | SDKROOT = iphoneos;
292 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
293 | };
294 | name = Debug;
295 | };
296 | 7D959CFC19404DAA008E110D /* Release */ = {
297 | isa = XCBuildConfiguration;
298 | buildSettings = {
299 | ALWAYS_SEARCH_USER_PATHS = NO;
300 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
301 | CLANG_CXX_LIBRARY = "libc++";
302 | CLANG_ENABLE_MODULES = YES;
303 | CLANG_ENABLE_OBJC_ARC = YES;
304 | CLANG_WARN_BOOL_CONVERSION = YES;
305 | CLANG_WARN_CONSTANT_CONVERSION = YES;
306 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
307 | CLANG_WARN_EMPTY_BODY = YES;
308 | CLANG_WARN_ENUM_CONVERSION = YES;
309 | CLANG_WARN_INT_CONVERSION = YES;
310 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
311 | CLANG_WARN_UNREACHABLE_CODE = YES;
312 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
313 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
314 | COPY_PHASE_STRIP = YES;
315 | ENABLE_NS_ASSERTIONS = NO;
316 | ENABLE_STRICT_OBJC_MSGSEND = YES;
317 | GCC_C_LANGUAGE_STANDARD = gnu99;
318 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
319 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
320 | GCC_WARN_UNDECLARED_SELECTOR = YES;
321 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
322 | GCC_WARN_UNUSED_FUNCTION = YES;
323 | GCC_WARN_UNUSED_VARIABLE = YES;
324 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
325 | METAL_ENABLE_DEBUG_INFO = NO;
326 | SDKROOT = iphoneos;
327 | VALIDATE_PRODUCT = YES;
328 | };
329 | name = Release;
330 | };
331 | 7D959CFE19404DAA008E110D /* Debug */ = {
332 | isa = XCBuildConfiguration;
333 | buildSettings = {
334 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
335 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
336 | INFOPLIST_FILE = XHNewsParsingSwift/Info.plist;
337 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
338 | PRODUCT_NAME = "$(TARGET_NAME)";
339 | };
340 | name = Debug;
341 | };
342 | 7D959CFF19404DAA008E110D /* Release */ = {
343 | isa = XCBuildConfiguration;
344 | buildSettings = {
345 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
346 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
347 | INFOPLIST_FILE = XHNewsParsingSwift/Info.plist;
348 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
349 | PRODUCT_NAME = "$(TARGET_NAME)";
350 | };
351 | name = Release;
352 | };
353 | 7D959D0119404DAA008E110D /* Debug */ = {
354 | isa = XCBuildConfiguration;
355 | buildSettings = {
356 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/XHNewsParsingSwift.app/XHNewsParsingSwift";
357 | FRAMEWORK_SEARCH_PATHS = (
358 | "$(SDKROOT)/Developer/Library/Frameworks",
359 | "$(inherited)",
360 | );
361 | GCC_PREPROCESSOR_DEFINITIONS = (
362 | "DEBUG=1",
363 | "$(inherited)",
364 | );
365 | INFOPLIST_FILE = XHNewsParsingSwiftTests/Info.plist;
366 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
367 | METAL_ENABLE_DEBUG_INFO = YES;
368 | PRODUCT_NAME = "$(TARGET_NAME)";
369 | TEST_HOST = "$(BUNDLE_LOADER)";
370 | };
371 | name = Debug;
372 | };
373 | 7D959D0219404DAA008E110D /* Release */ = {
374 | isa = XCBuildConfiguration;
375 | buildSettings = {
376 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/XHNewsParsingSwift.app/XHNewsParsingSwift";
377 | FRAMEWORK_SEARCH_PATHS = (
378 | "$(SDKROOT)/Developer/Library/Frameworks",
379 | "$(inherited)",
380 | );
381 | INFOPLIST_FILE = XHNewsParsingSwiftTests/Info.plist;
382 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
383 | METAL_ENABLE_DEBUG_INFO = NO;
384 | PRODUCT_NAME = "$(TARGET_NAME)";
385 | TEST_HOST = "$(BUNDLE_LOADER)";
386 | };
387 | name = Release;
388 | };
389 | /* End XCBuildConfiguration section */
390 |
391 | /* Begin XCConfigurationList section */
392 | 7D959CDA19404DAA008E110D /* Build configuration list for PBXProject "XHNewsParsingSwift" */ = {
393 | isa = XCConfigurationList;
394 | buildConfigurations = (
395 | 7D959CFB19404DAA008E110D /* Debug */,
396 | 7D959CFC19404DAA008E110D /* Release */,
397 | );
398 | defaultConfigurationIsVisible = 0;
399 | defaultConfigurationName = Release;
400 | };
401 | 7D959CFD19404DAA008E110D /* Build configuration list for PBXNativeTarget "XHNewsParsingSwift" */ = {
402 | isa = XCConfigurationList;
403 | buildConfigurations = (
404 | 7D959CFE19404DAA008E110D /* Debug */,
405 | 7D959CFF19404DAA008E110D /* Release */,
406 | );
407 | defaultConfigurationIsVisible = 0;
408 | defaultConfigurationName = Release;
409 | };
410 | 7D959D0019404DAA008E110D /* Build configuration list for PBXNativeTarget "XHNewsParsingSwiftTests" */ = {
411 | isa = XCConfigurationList;
412 | buildConfigurations = (
413 | 7D959D0119404DAA008E110D /* Debug */,
414 | 7D959D0219404DAA008E110D /* Release */,
415 | );
416 | defaultConfigurationIsVisible = 0;
417 | defaultConfigurationName = Release;
418 | };
419 | /* End XCConfigurationList section */
420 | };
421 | rootObject = 7D959CD719404DAA008E110D /* Project object */;
422 | }
423 |
--------------------------------------------------------------------------------