onevcat 2 лет назад
Родитель
Сommit
07e4fe5ea8

+ 1 - 1
Sources/Documentation.docc/Resources/code-files/01-ViewController-5.swift

@@ -35,7 +35,7 @@ extension ViewController: UITableViewDataSource {
     func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
         let cell = tableView.dequeueReusableCell(withIdentifier: "SampleCell", for: indexPath) as! SampleCell
         cell.sampleLabel.text = "Index \(indexPath.row)"
-        cell.sampleImageView.backgroundColor = .gray
+        cell.sampleImageView.backgroundColor = .lightGray
         return cell
     }
 }

BIN
Sources/Documentation.docc/Resources/tutorial-art/add-dependency.png


BIN
Sources/Documentation.docc/Resources/tutorial-art/add-library.png


BIN
Sources/Documentation.docc/Resources/tutorial-art/add-to-project.png


BIN
Sources/Documentation.docc/Resources/tutorial-art/create-project.png


BIN
Sources/Documentation.docc/Resources/tutorial-art/preview-1.png


+ 16 - 5
Sources/Documentation.docc/Tutorials/GettingStartedUIKit.tutorial

@@ -20,13 +20,13 @@
                 
         @ContentAndMedia {
             After creating your UIKit app, the first step is to install Kingfisher. For this, we use Swift Package Manager.
-            @Image(source: create-project, alt: "")
+            @Image(source: create-project.png, alt: "")
         }
         
         @Steps {
             @Step {
                 Choose "File" → "Add Package Dependencies…". In the pop-up window, enter the URL below to the search 
-                bar, and click the "Copy Dependency" button. 
+                bar, and click the "Add Package" button. 
                 
                 `https://github.com/onevcat/Kingfisher.git` 
                 
@@ -35,12 +35,12 @@
             
             @Step {
                 After downloading, add the package to your created project.
-                @Image(source: add-to-project, alt: "")
+                @Image(source: add-to-project.png, alt: "")
             }
             
             @Step {
                 Select your app target in the "project and target list", switch to the "Build Phases" tab, expand the "Link Binary With Libraries" section, and confirm that "Kingfisher" is added. If not, click the "+" button and add it to the list.
-                @Image(source: add-library, alt: "")
+                @Image(source: add-library.png, alt: "")
             }
             
             @Step {
@@ -85,8 +85,19 @@
                 @Code(name: "ViewController.swift", file: 01-ViewController-4.swift)
             }
             @Step {
-                Extend `ViewController` to conform the `UI
+                Extend `ViewController` to conform the `UITableViewDataSource`. For the sake of simplicity, we will 
+                only return one cell at first.
+                @Code(name: "ViewController.swift", file: 01-ViewController-5.swift) {
+                    @Image(source:preview-1.png, alt:"An iOS app with a list which contains a single cell.")
+                }
+                Run the app, now you should see a list which contains a single cell with a light grey placeholder and a
+                text label.
+                
             }
         }
     }
+        
+    @Section(title: "Loading image with Kingfisher") {
+        
+    }
 }