Kaynağa Gözat

Fix documentation

onevcat 10 yıl önce
ebeveyn
işleme
ef59ea0a37

+ 4 - 4
Kingfisher.xcodeproj/xcshareddata/xcschemes/Kingfisher.xcscheme

@@ -23,11 +23,11 @@
       </BuildActionEntries>
    </BuildAction>
    <TestAction
+      buildConfiguration = "Debug"
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
       shouldUseLaunchSchemeArgsEnv = "YES"
-      codeCoverageEnabled = "YES"
-      buildConfiguration = "Debug">
+      codeCoverageEnabled = "YES">
       <Testables>
          <TestableReference
             skipped = "NO">
@@ -53,11 +53,11 @@
       </AdditionalOptions>
    </TestAction>
    <LaunchAction
+      buildConfiguration = "Debug"
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
       launchStyle = "0"
       useCustomWorkingDirectory = "NO"
-      buildConfiguration = "Debug"
       ignoresPersistentStateOnLaunch = "NO"
       debugDocumentVersioning = "YES"
       debugServiceExtension = "internal"
@@ -75,10 +75,10 @@
       </AdditionalOptions>
    </LaunchAction>
    <ProfileAction
+      buildConfiguration = "Release"
       shouldUseLaunchSchemeArgsEnv = "YES"
       savedToolIdentifier = ""
       useCustomWorkingDirectory = "NO"
-      buildConfiguration = "Release"
       debugDocumentVersioning = "YES">
       <MacroExpansion>
          <BuildableReference

+ 9 - 9
Kingfisher/KingfisherManager.swift

@@ -97,10 +97,10 @@ public class KingfisherManager {
     If not found, it will download the image at `resource.downloadURL` and cache it with `resource.cacheKey`.
     These default behaviors could be adjusted by passing different options. See `KingfisherOptions` for more.
     
-    :param: resource          Resource object contains information such as `cacheKey` and `downloadURL`.
-    :param: optionsInfo       A dictionary could control some behaviors. See `KingfisherOptionsInfo` for more.
-    :param: progressBlock     Called every time downloaded data changed. This could be used as a progress UI.
-    :param: completionHandler Called when the whole retriving process finished.
+    - parameter resource:          Resource object contains information such as `cacheKey` and `downloadURL`.
+    - parameter optionsInfo:       A dictionary could control some behaviors. See `KingfisherOptionsInfo` for more.
+    - parameter progressBlock:     Called every time downloaded data changed. This could be used as a progress UI.
+    - parameter completionHandler: Called when the whole retriving process finished.
     
     - returns: A `RetrieveImageTask` task object. You can use this object to cancel the task.
     */
@@ -181,12 +181,12 @@ public class KingfisherManager {
     
     These default behaviors could be adjusted by passing different options. See `KingfisherOptions` for more.
     
-    :param: URL               The image URL.
-    :param: optionsInfo       A dictionary could control some behaviors. See `KingfisherOptionsInfo` for more.
-    :param: progressBlock     Called every time downloaded data changed. This could be used as a progress UI.
-    :param: completionHandler Called when the whole retriving process finished.
+    - parameter URL:               The image URL.
+    - parameter optionsInfo:       A dictionary could control some behaviors. See `KingfisherOptionsInfo` for more.
+    - parameter progressBlock:     Called every time downloaded data changed. This could be used as a progress UI.
+    - parameter completionHandler: Called when the whole retriving process finished.
     
-    :returns: A `RetrieveImageTask` task object. You can use this object to cancel the task.
+    - returns: A `RetrieveImageTask` task object. You can use this object to cancel the task.
     */
     public func retrieveImageWithURL(URL: NSURL,
                              optionsInfo: KingfisherOptionsInfo?,

+ 63 - 63
Kingfisher/UIButton+Kingfisher.swift

@@ -36,10 +36,10 @@ public extension UIButton {
     It will ask for Kingfisher's manager to get the image for the `cacheKey` property in `resource` and then set it for a button state.
     The memory and disk will be searched first. If the manager does not find it, it will try to download the image at the `resource.downloadURL` and store it with `resource.cacheKey` for next use.
     
-    :param: resource Resource object contains information such as `cacheKey` and `downloadURL`.
-    :param: state The state that uses the specified image.
+    - parameter resource: Resource object contains information such as `cacheKey` and `downloadURL`.
+    - parameter state:    The state that uses the specified image.
     
-    :returns: A task represents the retriving process.
+    - returns: A task represents the retriving process.
     */
     public func kf_setImageWithResource(resource: Resource,
                                   forState state: UIControlState) -> RetrieveImageTask
@@ -68,11 +68,11 @@ public extension UIButton {
     /**
     Set an image to use for a specified state with a resource and a placeholder image.
     
-    :param: resource         Resource object contains information such as `cacheKey` and `downloadURL`.
-    :param: state            The state that uses the specified image.
-    :param: placeholderImage A placeholder image when retrieving the image at URL.
+    - parameter resource:         Resource object contains information such as `cacheKey` and `downloadURL`.
+    - parameter state:            The state that uses the specified image.
+    - parameter placeholderImage: A placeholder image when retrieving the image at URL.
     
-    :returns: A task represents the retriving process.
+    - returns: A task represents the retriving process.
     */
     public func kf_setImageWithResource(resource: Resource,
                                   forState state: UIControlState,
@@ -100,12 +100,12 @@ public extension UIButton {
     /**
     Set an image to use for a specified state with a resource, a placeholder image and options.
     
-    :param: resource         Resource object contains information such as `cacheKey` and `downloadURL`.
-    :param: state            The state that uses the specified image.
-    :param: placeholderImage A placeholder image when retrieving the image at URL.
-    :param: optionsInfo      A dictionary could control some behaviors. See `KingfisherOptionsInfo` for more.
+    - parameter resource:         Resource object contains information such as `cacheKey` and `downloadURL`.
+    - parameter state:            The state that uses the specified image.
+    - parameter placeholderImage: A placeholder image when retrieving the image at URL.
+    - parameter optionsInfo:      A dictionary could control some behaviors. See `KingfisherOptionsInfo` for more.
     
-    :returns: A task represents the retriving process.
+    - returns: A task represents the retriving process.
     */
     public func kf_setImageWithResource(resource: Resource,
                                   forState state: UIControlState,
@@ -136,13 +136,13 @@ public extension UIButton {
     /**
     Set an image to use for a specified state with a resource, a placeholder image, options and completion handler.
     
-    :param: resource          Resource object contains information such as `cacheKey` and `downloadURL`.
-    :param: state             The state that uses the specified image.
-    :param: placeholderImage  A placeholder image when retrieving the image at URL.
-    :param: optionsInfo       A dictionary could control some behaviors. See `KingfisherOptionsInfo` for more.
-    :param: completionHandler Called when the image retrieved and set.
+    - parameter resource:          Resource object contains information such as `cacheKey` and `downloadURL`.
+    - parameter state:             The state that uses the specified image.
+    - parameter placeholderImage:  A placeholder image when retrieving the image at URL.
+    - parameter optionsInfo:       A dictionary could control some behaviors. See `KingfisherOptionsInfo` for more.
+    - parameter completionHandler: Called when the image retrieved and set.
     
-    :returns: A task represents the retriving process.
+    - returns: A task represents the retriving process.
     */
     public func kf_setImageWithResource(resource: Resource,
                                   forState state: UIControlState,
@@ -177,14 +177,14 @@ public extension UIButton {
     /**
     Set an image to use for a specified state with a resource, a placeholder image, options, progress handler and completion handler.
     
-    :param: resource          Resource object contains information such as `cacheKey` and `downloadURL`.
-    :param: state             The state that uses the specified image.
-    :param: placeholderImage  A placeholder image when retrieving the image at URL.
-    :param: optionsInfo       A dictionary could control some behaviors. See `KingfisherOptionsInfo` for more.
-    :param: progressBlock     Called when the image downloading progress gets updated.
-    :param: completionHandler Called when the image retrieved and set.
+    - parameter resource:          Resource object contains information such as `cacheKey` and `downloadURL`.
+    - parameter state:             The state that uses the specified image.
+    - parameter placeholderImage:  A placeholder image when retrieving the image at URL.
+    - parameter optionsInfo:       A dictionary could control some behaviors. See `KingfisherOptionsInfo` for more.
+    - parameter progressBlock:     Called when the image downloading progress gets updated.
+    - parameter completionHandler: Called when the image retrieved and set.
     
-    :returns: A task represents the retriving process.
+    - returns: A task represents the retriving process.
     */
     public func kf_setImageWithResource(resource: Resource,
                                   forState state: UIControlState,
@@ -216,14 +216,14 @@ public extension UIButton {
     /**
     Set an image to use for a specified state with a URL, a placeholder image, options, progress handler and completion handler.
     
-    :param: URL               The URL of image for specified state.
-    :param: state             The state that uses the specified image.
-    :param: placeholderImage  A placeholder image when retrieving the image at URL.
-    :param: optionsInfo       A dictionary could control some behaviors. See `KingfisherOptionsInfo` for more.
-    :param: progressBlock     Called when the image downloading progress gets updated.
-    :param: completionHandler Called when the image retrieved and set.
+    - parameter URL:               The URL of image for specified state.
+    - parameter state:             The state that uses the specified image.
+    - parameter placeholderImage:  A placeholder image when retrieving the image at URL.
+    - parameter optionsInfo:       A dictionary could control some behaviors. See `KingfisherOptionsInfo` for more.
+    - parameter progressBlock:     Called when the image downloading progress gets updated.
+    - parameter completionHandler: Called when the image retrieved and set.
     
-    :returns: A task represents the retriving process.
+    - returns: A task represents the retriving process.
     */
     public func kf_setImageWithURL(URL: NSURL,
                         forState state: UIControlState,
@@ -283,10 +283,10 @@ public extension UIButton {
     It will ask for Kingfisher's manager to get the image for the `cacheKey` property in `resource` and then set it for a button state.
     The memory and disk will be searched first. If the manager does not find it, it will try to download the image at the `resource.downloadURL` and store it with `resource.cacheKey` for next use.
     
-    :param: resource Resource object contains information such as `cacheKey` and `downloadURL`.
-    :param: state    The state that uses the specified image.
+    - parameter resource: Resource object contains information such as `cacheKey` and `downloadURL`.
+    - parameter state:    The state that uses the specified image.
     
-    :returns: A task represents the retriving process.
+    - returns: A task represents the retriving process.
     */
     public func kf_setBackgroundImageWithResource(resource: Resource,
                                             forState state: UIControlState) -> RetrieveImageTask
@@ -315,11 +315,11 @@ public extension UIButton {
     /**
     Set the background image to use for a specified state with a resource and a placeholder image.
     
-    :param: resource         Resource object contains information such as `cacheKey` and `downloadURL`.
-    :param: state            The state that uses the specified image.
-    :param: placeholderImage A placeholder image when retrieving the image at URL.
+    - parameter resource:         Resource object contains information such as `cacheKey` and `downloadURL`.
+    - parameter state:            The state that uses the specified image.
+    - parameter placeholderImage: A placeholder image when retrieving the image at URL.
     
-    :returns: A task represents the retriving process.
+    - returns: A task represents the retriving process.
     */
     public func kf_setBackgroundImageWithResource(resource: Resource,
                                             forState state: UIControlState,
@@ -347,12 +347,12 @@ public extension UIButton {
     /**
     Set the background image to use for a specified state with a resource, a placeholder image and options.
     
-    :param: resource         Resource object contains information such as `cacheKey` and `downloadURL`.
-    :param: state            The state that uses the specified image.
-    :param: placeholderImage A placeholder image when retrieving the image at URL.
-    :param: optionsInfo      A dictionary could control some behaviors. See `KingfisherOptionsInfo` for more.
+    - parameter resource:         Resource object contains information such as `cacheKey` and `downloadURL`.
+    - parameter state:            The state that uses the specified image.
+    - parameter placeholderImage: A placeholder image when retrieving the image at URL.
+    - parameter optionsInfo:      A dictionary could control some behaviors. See `KingfisherOptionsInfo` for more.
     
-    :returns: A task represents the retriving process.
+    - returns: A task represents the retriving process.
     */
     public func kf_setBackgroundImageWithResource(resource: Resource,
                                             forState state: UIControlState,
@@ -383,13 +383,13 @@ public extension UIButton {
     /**
     Set the background image to use for a specified state with a resource, a placeholder image, options and completion handler.
     
-    :param: resource          Resource object contains information such as `cacheKey` and `downloadURL`.
-    :param: state             The state that uses the specified image.
-    :param: placeholderImage  A placeholder image when retrieving the image at URL.
-    :param: optionsInfo       A dictionary could control some behaviors. See `KingfisherOptionsInfo` for more.
-    :param: completionHandler Called when the image retrieved and set.
+    - parameter resource:          Resource object contains information such as `cacheKey` and `downloadURL`.
+    - parameter state:             The state that uses the specified image.
+    - parameter placeholderImage:  A placeholder image when retrieving the image at URL.
+    - parameter optionsInfo:       A dictionary could control some behaviors. See `KingfisherOptionsInfo` for more.
+    - parameter completionHandler: Called when the image retrieved and set.
     
-    :returns: A task represents the retriving process.
+    - returns: A task represents the retriving process.
     */
     public func kf_setBackgroundImageWithResource(resource: Resource,
                                             forState state: UIControlState,
@@ -424,12 +424,12 @@ public extension UIButton {
     Set the background image to use for a specified state with a resource,
     a placeholder image, options progress handler and completion handler.
     
-    :param: resource          Resource object contains information such as `cacheKey` and `downloadURL`.
-    :param: state             The state that uses the specified image.
-    :param: placeholderImage  A placeholder image when retrieving the image at URL.
-    :param: optionsInfo       A dictionary could control some behaviors. See `KingfisherOptionsInfo` for more.
-    :param: progressBlock     Called when the image downloading progress gets updated.
-    :param: completionHandler Called when the image retrieved and set.
+    - parameter resource:          Resource object contains information such as `cacheKey` and `downloadURL`.
+    - parameter state:             The state that uses the specified image.
+    - parameter placeholderImage:  A placeholder image when retrieving the image at URL.
+    - parameter optionsInfo:       A dictionary could control some behaviors. See `KingfisherOptionsInfo` for more.
+    - parameter progressBlock:     Called when the image downloading progress gets updated.
+    - parameter completionHandler: Called when the image retrieved and set.
     
     - returns: A task represents the retriving process.
     */
@@ -464,14 +464,14 @@ public extension UIButton {
     Set the background image to use for a specified state with a URL,
     a placeholder image, options progress handler and completion handler.
     
-    :param: URL               The URL of image for specified state.
-    :param: state             The state that uses the specified image.
-    :param: placeholderImage  A placeholder image when retrieving the image at URL.
-    :param: optionsInfo       A dictionary could control some behaviors. See `KingfisherOptionsInfo` for more.
-    :param: progressBlock     Called when the image downloading progress gets updated.
-    :param: completionHandler Called when the image retrieved and set.
+    - parameter URL:               The URL of image for specified state.
+    - parameter state:             The state that uses the specified image.
+    - parameter placeholderImage:  A placeholder image when retrieving the image at URL.
+    - parameter optionsInfo:       A dictionary could control some behaviors. See `KingfisherOptionsInfo` for more.
+    - parameter progressBlock:     Called when the image downloading progress gets updated.
+    - parameter completionHandler: Called when the image retrieved and set.
     
-    :returns: A task represents the retriving process.
+    - returns: A task represents the retriving process.
     */
     public func kf_setBackgroundImageWithURL(URL: NSURL,
                                   forState state: UIControlState,

+ 25 - 25
Kingfisher/UIImageView+Kingfisher.swift

@@ -38,9 +38,9 @@ public extension UIImageView {
     It will ask for Kingfisher's manager to get the image for the `cacheKey` property in `resource`.
     The memory and disk will be searched first. If the manager does not find it, it will try to download the image at the `resource.downloadURL` and store it with `resource.cacheKey` for next use.
     
-    :param: resource Resource object contains information such as `cacheKey` and `downloadURL`.
+    - parameter resource: Resource object contains information such as `cacheKey` and `downloadURL`.
     
-    :returns: A task represents the retriving process.
+    - returns: A task represents the retriving process.
     */
     public func kf_setImageWithResource(resource: Resource) -> RetrieveImageTask
     {
@@ -66,10 +66,10 @@ public extension UIImageView {
     /**
     Set an image with a resource and a placeholder image.
     
-    :param: resource         Resource object contains information such as `cacheKey` and `downloadURL`.
-    :param: placeholderImage A placeholder image when retrieving the image at URL.
+    - parameter resource:         Resource object contains information such as `cacheKey` and `downloadURL`.
+    - parameter placeholderImage: A placeholder image when retrieving the image at URL.
     
-    :returns: A task represents the retriving process.
+    - returns: A task represents the retriving process.
     */
     public func kf_setImageWithResource(resource: Resource,
                                 placeholderImage: UIImage?) -> RetrieveImageTask
@@ -94,11 +94,11 @@ public extension UIImageView {
     /**
     Set an image with a resource, a placaholder image and options.
     
-    :param: resource         Resource object contains information such as `cacheKey` and `downloadURL`.
-    :param: placeholderImage A placeholder image when retrieving the image at URL.
-    :param: optionsInfo      A dictionary could control some behaviors. See `KingfisherOptionsInfo` for more.
+    - parameter resource:         Resource object contains information such as `cacheKey` and `downloadURL`.
+    - parameter placeholderImage: A placeholder image when retrieving the image at URL.
+    - parameter optionsInfo:      A dictionary could control some behaviors. See `KingfisherOptionsInfo` for more.
     
-    :returns: A task represents the retriving process.
+    - returns: A task represents the retriving process.
     */
     public func kf_setImageWithResource(resource: Resource,
                                 placeholderImage: UIImage?,
@@ -126,12 +126,12 @@ public extension UIImageView {
     /**
     Set an image with a resource, a placeholder image, options and completion handler.
     
-    :param: resource          Resource object contains information such as `cacheKey` and `downloadURL`.
-    :param: placeholderImage  A placeholder image when retrieving the image at URL.
-    :param: optionsInfo       A dictionary could control some behaviors. See `KingfisherOptionsInfo` for more.
-    :param: completionHandler Called when the image retrieved and set.
+    - parameter resource:          Resource object contains information such as `cacheKey` and `downloadURL`.
+    - parameter placeholderImage:  A placeholder image when retrieving the image at URL.
+    - parameter optionsInfo:       A dictionary could control some behaviors. See `KingfisherOptionsInfo` for more.
+    - parameter completionHandler: Called when the image retrieved and set.
     
-    :returns: A task represents the retriving process.
+    - returns: A task represents the retriving process.
     */
     public func kf_setImageWithResource(resource: Resource,
                                 placeholderImage: UIImage?,
@@ -162,11 +162,11 @@ public extension UIImageView {
     /**
     Set an image with a URL, a placeholder image, options, progress handler and completion handler.
     
-    :param: resource          Resource object contains information such as `cacheKey` and `downloadURL`.
-    :param: placeholderImage  A placeholder image when retrieving the image at URL.
-    :param: optionsInfo       A dictionary could control some behaviors. See `KingfisherOptionsInfo` for more.
-    :param: progressBlock     Called when the image downloading progress gets updated.
-    :param: completionHandler Called when the image retrieved and set.
+    - parameter resource:          Resource object contains information such as `cacheKey` and `downloadURL`.
+    - parameter placeholderImage:  A placeholder image when retrieving the image at URL.
+    - parameter optionsInfo:       A dictionary could control some behaviors. See `KingfisherOptionsInfo` for more.
+    - parameter progressBlock:     Called when the image downloading progress gets updated.
+    - parameter completionHandler: Called when the image retrieved and set.
     
     - returns: A task represents the retriving process.
     */
@@ -211,13 +211,13 @@ public extension UIImageView {
     /**
     Set an image with a URL, a placeholder image, options, progress handler and completion handler.
     
-    :param: URL               The URL of image.
-    :param: placeholderImage  A placeholder image when retrieving the image at URL.
-    :param: optionsInfo       A dictionary could control some behaviors. See `KingfisherOptionsInfo` for more.
-    :param: progressBlock     Called when the image downloading progress gets updated.
-    :param: completionHandler Called when the image retrieved and set.
+    - parameter URL:               The URL of image.
+    - parameter placeholderImage:  A placeholder image when retrieving the image at URL.
+    - parameter optionsInfo:       A dictionary could control some behaviors. See `KingfisherOptionsInfo` for more.
+    - parameter progressBlock:     Called when the image downloading progress gets updated.
+    - parameter completionHandler: Called when the image retrieved and set.
     
-    :returns: A task represents the retriving process.
+    - returns: A task represents the retriving process.
     */
     
     public func kf_setImageWithURL(URL: NSURL,

+ 2 - 1
Pods/Pods.xcodeproj/project.pbxproj

@@ -404,7 +404,7 @@
 		915A53AD384F95102F62877B /* Project object */ = {
 			isa = PBXProject;
 			attributes = {
-				LastUpgradeCheck = 0510;
+				LastUpgradeCheck = 0700;
 			};
 			buildConfigurationList = EDC76D882C236F42B5E30A8C /* Build configuration list for PBXProject "Pods" */;
 			compatibilityVersion = "Xcode 3.2";
@@ -528,6 +528,7 @@
 				CLANG_WARN_UNREACHABLE_CODE = YES;
 				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
 				COPY_PHASE_STRIP = NO;
+				ENABLE_TESTABILITY = YES;
 				GCC_C_LANGUAGE_STANDARD = gnu99;
 				GCC_DYNAMIC_NO_PIC = NO;
 				GCC_OPTIMIZATION_LEVEL = 0;