Преглед изворни кода

Update Outdated iOS Example Code (#3268)

* feat (Response) : add info for debugDescription

add parameters info for debugDescription of DataResponse and DownloadResponse

* refactor (Response) : update

* feat (Response) : add Response Body for debugDescription

* merge from Alamofire master

* style (iOS Example) : update style

* refactor (MasterViewController) : remove an unused property

* refactor (DetailViewController) : indexPath NSIndexPath -> IndexPath

* refactor (iOS Example) : update Main.storyboard

* refactor (DetailViewController) : indexPath NSIndexPath -> IndexPath

* Revert "style (iOS Example) : update style"

* refactor (DetailViewController) : indexPath NSIndexPath -> IndexPath

* Revert "refactor (iOS Example) : update Main.storyboard"

This reverts commit 5d465049acc45db7339c15c3c084245b32cafcd7.
rain2540 пре 5 година
родитељ
комит
f628497b80

+ 2 - 2
Example/Source/DetailViewController.swift

@@ -151,7 +151,7 @@ extension DetailViewController {
     }
 
     override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
-        switch Sections(rawValue: (indexPath as NSIndexPath).section)! {
+        switch Sections(rawValue: indexPath.section)! {
         case .headers:
             let cell = tableView.dequeueReusableCell(withIdentifier: "Header")!
             let field = headers.keys.sorted(by: <)[indexPath.row]
@@ -191,7 +191,7 @@ extension DetailViewController {
     }
 
     override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
-        switch Sections(rawValue: (indexPath as NSIndexPath).section)! {
+        switch Sections(rawValue: indexPath.section)! {
         case .body:
             return 300
         default:

+ 0 - 1
Example/Source/MasterViewController.swift

@@ -31,7 +31,6 @@ class MasterViewController: UITableViewController {
     @IBOutlet var titleImageView: UIImageView!
 
     var detailViewController: DetailViewController?
-    var objects = NSMutableArray()
 
     private var reachability: NetworkReachabilityManager!