Skip to content

Commit 178c2ec

Browse files
committed
[docs] Update docs for 1.2
1 parent 653d5e4 commit 178c2ec

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1314
-775
lines changed

Alderis/ColorPickerConfiguration.swift

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import UIKit
1010

1111
/// An enumeration of the tabs `ColorPickerViewController` features. Use these enumeration values to
12-
/// set tab-related settings on ColorPickerConfiguration.
12+
/// set tab-related settings on `ColorPickerConfiguration`.
1313
@objc(HBColorPickerTab)
1414
public enum ColorPickerTab: Int, CaseIterable {
1515
/// Tab 1: A grid of 9 variations of 11 colours, and a grayscale ramp. The first and default tab.
@@ -44,13 +44,13 @@ open class ColorPickerConfiguration: NSObject {
4444
@objc open var color: UIColor
4545

4646
/// Whether to allow the user to set an alpha transparency value on the color. This controls the
47-
/// visibility of an Alpha slider on the Sliders tab. When set to false, alpha values provided via
48-
/// the `color` property, or by the user when entering a hexadecimal value on the Sliders tab,
47+
/// visibility of an Alpha slider on the Sliders tab. When set to `false`, alpha values provided
48+
/// via the `color` property, or by the user when entering a hexadecimal value on the Sliders tab,
4949
/// will be discarded.
5050
@objc open var supportsAlpha = true
5151

52-
/// The title to display at the top of the popup. If set to nil, no title will be displayed. The
53-
/// default is nil.
52+
/// The title to display at the top of the popup. If set to `nil`, no title will be displayed. The
53+
/// default is `nil`.
5454
@objc open var title: String?
5555

5656
/// The initial tab to select when the color picker is presented. The default is
@@ -62,21 +62,21 @@ open class ColorPickerConfiguration: NSObject {
6262
@objc open var initialTab = ColorPickerTab.swatch
6363

6464
/// The tabs the user can select and switch between at the top of the window, if tabs are enabled
65-
/// by showTabs.
65+
/// by `showTabs`.
6666
///
6767
/// - see: `initialTab`
6868
@nonobjc open var visibleTabs: [ColorPickerTab] = [.swatch, .map, .sliders, .accessibility]
6969

70-
/// Maps visibleTabs to Objective-C due to Swift limitations. This is an implementation detail.
71-
/// Ignore this and use visibleTabs per usual.
70+
/// Maps `visibleTabs` to Objective-C due to Swift limitations. This is an implementation detail.
71+
/// Ignore this and use `visibleTabs` per usual.
7272
@objc(visibleTabs)
7373
open var _visibleTabsObjC: [ColorPickerTab.RawValue] {
7474
get { visibleTabs.map(\.rawValue) }
7575
set { visibleTabs = newValue.map { ColorPickerTab(rawValue: $0)! } }
7676
}
7777

78-
/// Whether to display the tab selection at the top of the popup. The default is true. When set to
79-
/// false, the user will only be able to access the tab specified in initialTab.
78+
/// Whether to display the tab selection at the top of the popup. The default is `true`. When set
79+
/// to `false`, the user will only be able to access the tab specified in initialTab.
8080
@objc open var showTabs = true
8181

8282
/// When the Smart Invert accessibility feature is enabled, Alderis instructs the system to not
@@ -85,7 +85,7 @@ open class ColorPickerConfiguration: NSObject {
8585
@objc open var overrideSmartInvert = true
8686

8787
/// Whether the user can end a drag interaction by dropping on the color picker window, allowing
88-
/// them to drag a color from a supporting app. The default is true.
88+
/// them to drag a color from a supporting app. The default is `true`.
8989
@objc open var isDropInteractionEnabled = true
9090

9191
}

Alderis/ColorPickerDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import UIKit
1010

11-
/// Use ColorPickerDelegate to handle the user’s response to `ColorPickerViewController`.
11+
/// Use `ColorPickerDelegate` to handle the user’s response to `ColorPickerViewController`.
1212
@objc(HBColorPickerDelegate)
1313
public protocol ColorPickerDelegate: NSObjectProtocol {
1414

Alderis/ColorPickerInnerViewController.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,14 +414,17 @@ extension ColorPickerInnerViewController: ColorPickerTabDelegate {
414414

415415
extension ColorPickerInnerViewController: UIDropInteractionDelegate {
416416

417+
/// :nodoc:
417418
public func dropInteraction(_ interaction: UIDropInteraction, canHandle session: UIDropSession) -> Bool {
418419
return session.items.count == 1 && session.canLoadObjects(ofClass: UIColor.self)
419420
}
420421

422+
/// :nodoc:
421423
public func dropInteraction(_ interaction: UIDropInteraction, sessionDidUpdate session: UIDropSession) -> UIDropProposal {
422424
return UIDropProposal(operation: .copy)
423425
}
424426

427+
/// :nodoc:
425428
public func dropInteraction(_ interaction: UIDropInteraction, performDrop session: UIDropSession) {
426429
session.loadObjects(ofClass: UIColor.self) { items in
427430
if let color = items.first as? UIColor {
@@ -434,6 +437,7 @@ extension ColorPickerInnerViewController: UIDropInteractionDelegate {
434437

435438
extension ColorPickerInnerViewController: UIPopoverPresentationControllerDelegate {
436439

440+
/// :nodoc:
437441
public func presentationControllerWillDismiss(_ presentationController: UIPresentationController) {
438442
saveTapped()
439443
}

Alderis/ColorPickerViewController.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ import UIKit
1616
/// `sourceView` or other similar properties on the view controller’s `popoverPresentationController`
1717
/// before presentation.
1818
///
19-
/// To review examples of ColorPickerViewController in use, run `pod try Alderis`.
19+
/// To review examples of `ColorPickerViewController` in use, run `pod try Alderis`.
2020
@objc(HBColorPickerViewController)
2121
open class ColorPickerViewController: UIViewController {
2222

2323
/// Do not rely on this fallback value - always specify a color!
2424
private static let defaultColor = UIColor(white: 0.6, alpha: 1)
2525

26-
/// Initialise an instance of ColorPickerViewController with a configuration object.
26+
/// Initialise an instance of `ColorPickerViewController` with a configuration object.
2727
///
2828
/// Remember to set the `delegate` before presenting the view controller.
2929
@objc public init(configuration: ColorPickerConfiguration) {
@@ -47,13 +47,13 @@ open class ColorPickerViewController: UIViewController {
4747
/// - see: `ColorPickerConfiguration`
4848
@objc open var configuration: ColorPickerConfiguration!
4949

50-
/// Deprecated. Set overrideSmartInvert on the `ColorPickerConfiguration` instead.
50+
/// Deprecated. Set `ColorPickerConfiguration.overrideSmartInvert` instead.
5151
///
5252
/// - see: `ColorPickerConfiguration.overrideSmartInvert`
5353
@available(*, deprecated, message: "Use ColorPickerConfiguration instead")
5454
@objc open var overrideSmartInvert = true
5555

56-
/// Deprecated. Set color on the `ColorPickerConfiguration` instead.
56+
/// Deprecated. Set `ColorPickerConfiguration.color` instead.
5757
///
5858
/// - see: `ColorPickerConfiguration.color`
5959
@available(*, deprecated, message: "Use ColorPickerConfiguration instead")

Alderis/ColorWell.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ open class ColorWell: UIControl {
3333
}
3434

3535
/// Whether the user can begin a drag interaction from this view, allowing them to drop the color
36-
/// into a supporting app. The default is false.
36+
/// into a supporting app. The default is `false`.
3737
@objc open var isDragInteractionEnabled = false {
3838
didSet { updateDragDropInteraction() }
3939
}
@@ -51,6 +51,7 @@ open class ColorWell: UIControl {
5151
didSet { updateDragDropInteraction() }
5252
}
5353

54+
#if swift(>=5.3)
5455
/// Whether the user can long press (iPhone) or right-click (Mac/iPad) the view, allowing them to
5556
/// copy the color in various formats, or paste a color from another source.
5657
///
@@ -62,7 +63,6 @@ open class ColorWell: UIControl {
6263
/// ```
6364
///
6465
/// Requires iOS 14 or newer.
65-
#if swift(>=5.3)
6666
@available(iOS 14, *)
6767
open override var isContextMenuInteractionEnabled: Bool {
6868
didSet { updateDragDropInteraction() }
@@ -337,6 +337,7 @@ extension ColorWell: UIDropInteractionDelegate {
337337
@available(iOS 15, *)
338338
extension ColorWell: UIToolTipInteractionDelegate {
339339

340+
/// :nodoc:
340341
public func toolTipInteraction(_ interaction: UIToolTipInteraction, configurationAt point: CGPoint) -> UIToolTipConfiguration? {
341342
UIToolTipConfiguration(toolTip: contextMenuTitle)
342343
}
@@ -349,6 +350,7 @@ extension ColorWell: UIToolTipInteractionDelegate {
349350
@available(iOS 13, *)
350351
extension ColorWell { // UIContextMenuInteractionDelegate
351352

353+
/// :nodoc:
352354
open override func contextMenuInteraction(_ interaction: UIContextMenuInteraction, configurationForMenuAtLocation location: CGPoint) -> UIContextMenuConfiguration? {
353355
return UIContextMenuConfiguration(identifier: color, previewProvider: nil) { items in
354356
var children = [UIMenuElement]()
@@ -398,5 +400,4 @@ extension ColorWell { // UIContextMenuInteractionDelegate
398400
/// Deprecated. Use `ColorWell` instead.
399401
@available(*, deprecated, renamed: "ColorWell")
400402
@objc(HBColorPickerCircleView)
401-
open class ColorPickerCircleView: ColorWell {
402-
}
403+
open class ColorPickerCircleView: ColorWell {}

docs/Classes/ColorPickerConfiguration.html

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,20 @@
1717
<a title="ColorPickerConfiguration Class Reference"></a>
1818
<header>
1919
<div class="content-wrapper">
20-
<p><a href="../index.html">Alderis 1.1.2 Docs</a></p>
21-
<p class="header-right"><a href="https://github.com/hbang/Alderis"><img src="../img/gh.png"/>View on GitHub</a></p>
22-
<p class="header-right"><a href="dash-feed://https%3A%2F%2Fhbang.github.io%2FAlderis%2Fdocsets%2FAlderis.xml"><img src="../img/dash.png"/>Install in Dash</a></p>
23-
<p class="header-right">
20+
<p><a href="../index.html">Alderis 1.2 Docs</a></p>
21+
<p class="header-right"><a href="https://github.com/hbang/Alderis"><img src="../img/gh.png" alt="GitHub"/>View on GitHub</a></p>
22+
<p class="header-right"><a href="dash-feed://https%3A%2F%2Fhbang.github.io%2FAlderis%2Fdocsets%2FAlderis.xml"><img src="../img/dash.png" alt="Dash"/>Install in Dash</a></p>
23+
<div class="header-right">
2424
<form role="search" action="../search.json">
2525
<input type="text" placeholder="Search documentation" data-typeahead>
2626
</form>
27-
</p>
27+
</div>
2828
</div>
2929
</header>
3030
<div class="content-wrapper">
3131
<p id="breadcrumbs">
3232
<a href="../index.html">Alderis Reference</a>
33-
<img id="carat" src="../img/carat.png" />
33+
<img id="carat" src="../img/carat.png" alt=""/>
3434
ColorPickerConfiguration Class Reference
3535
</p>
3636
</div>
@@ -107,7 +107,7 @@ <h1>ColorPickerConfiguration</h1>
107107
<div class="declaration">
108108
<div class="language">
109109

110-
<pre class="highlight swift"><code><span class="kd">@objc(HBColorPickerConfiguration)</span>
110+
<pre class="highlight swift"><code><span class="kd">@objc</span><span class="p">(</span><span class="kt">HBColorPickerConfiguration</span><span class="p">)</span>
111111
<span class="kd">open</span> <span class="kd">class</span> <span class="kt">ColorPickerConfiguration</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>
112112

113113
</div>
@@ -189,8 +189,8 @@ <h4>Declaration</h4>
189189
<div class="pointer"></div>
190190
<div class="abstract">
191191
<p>Whether to allow the user to set an alpha transparency value on the color. This controls the
192-
visibility of an Alpha slider on the Sliders tab. When set to false, alpha values provided via
193-
the <code><a href="../Classes/ColorPickerConfiguration.html#/c:@M@Alderis@objc(cs)HBColorPickerConfiguration(py)color">color</a></code> property, or by the user when entering a hexadecimal value on the Sliders tab,
192+
visibility of an Alpha slider on the Sliders tab. When set to <code>false</code>, alpha values provided
193+
via the <code><a href="../Classes/ColorPickerConfiguration.html#/c:@M@Alderis@objc(cs)HBColorPickerConfiguration(py)color">color</a></code> property, or by the user when entering a hexadecimal value on the Sliders tab,
194194
will be discarded.</p>
195195

196196
</div>
@@ -219,8 +219,8 @@ <h4>Declaration</h4>
219219
<section class="section">
220220
<div class="pointer"></div>
221221
<div class="abstract">
222-
<p>The title to display at the top of the popup. If set to nil, no title will be displayed. The
223-
default is nil.</p>
222+
<p>The title to display at the top of the popup. If set to <code>nil</code>, no title will be displayed. The
223+
default is <code>nil</code>.</p>
224224

225225
</div>
226226
<div class="declaration">
@@ -285,7 +285,7 @@ <h4>Declaration</h4>
285285
<div class="pointer"></div>
286286
<div class="abstract">
287287
<p>The tabs the user can select and switch between at the top of the window, if tabs are enabled
288-
by showTabs.</p>
288+
by <code><a href="../Classes/ColorPickerConfiguration.html#/c:@M@Alderis@objc(cs)HBColorPickerConfiguration(py)showTabs">showTabs</a></code>.</p>
289289
<div class="aside aside-see">
290290
<p class="aside-title">See</p>
291291
<code><a href="../Classes/ColorPickerConfiguration.html#/c:@M@Alderis@objc(cs)HBColorPickerConfiguration(py)initialTab">initialTab</a></code>
@@ -318,15 +318,15 @@ <h4>Declaration</h4>
318318
<section class="section">
319319
<div class="pointer"></div>
320320
<div class="abstract">
321-
<p>Maps visibleTabs to Objective-C due to Swift limitations. This is an implementation detail.
322-
Ignore this and use visibleTabs per usual.</p>
321+
<p>Maps <code><a href="../Classes/ColorPickerConfiguration.html#/s:7Alderis24ColorPickerConfigurationC11visibleTabsSayAA0bC3TabOGvp">visibleTabs</a></code> to Objective-C due to Swift limitations. This is an implementation detail.
322+
Ignore this and use <code><a href="../Classes/ColorPickerConfiguration.html#/s:7Alderis24ColorPickerConfigurationC11visibleTabsSayAA0bC3TabOGvp">visibleTabs</a></code> per usual.</p>
323323

324324
</div>
325325
<div class="declaration">
326326
<h4>Declaration</h4>
327327
<div class="language">
328328
<p class="aside-title">Swift</p>
329-
<pre class="highlight swift"><code><span class="kd">@objc(visibleTabs)</span>
329+
<pre class="highlight swift"><code><span class="kd">@objc</span><span class="p">(</span><span class="n"><a href="../Classes/ColorPickerConfiguration.html#/s:7Alderis24ColorPickerConfigurationC11visibleTabsSayAA0bC3TabOGvp">visibleTabs</a></span><span class="p">)</span>
330330
<span class="kd">open</span> <span class="k">var</span> <span class="nv">_visibleTabsObjC</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Enums/ColorPickerTab.html">ColorPickerTab</a></span><span class="o">.</span><span class="kt">RawValue</span><span class="p">]</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
331331

332332
</div>
@@ -347,8 +347,8 @@ <h4>Declaration</h4>
347347
<section class="section">
348348
<div class="pointer"></div>
349349
<div class="abstract">
350-
<p>Whether to display the tab selection at the top of the popup. The default is true. When set to
351-
false, the user will only be able to access the tab specified in initialTab.</p>
350+
<p>Whether to display the tab selection at the top of the popup. The default is <code>true</code>. When set
351+
to <code>false</code>, the user will only be able to access the tab specified in initialTab.</p>
352352

353353
</div>
354354
<div class="declaration">
@@ -407,7 +407,7 @@ <h4>Declaration</h4>
407407
<div class="pointer"></div>
408408
<div class="abstract">
409409
<p>Whether the user can end a drag interaction by dropping on the color picker window, allowing
410-
them to drag a color from a supporting app. The default is true.</p>
410+
them to drag a color from a supporting app. The default is <code>true</code>.</p>
411411

412412
</div>
413413
<div class="declaration">
@@ -427,11 +427,10 @@ <h4>Declaration</h4>
427427
</section>
428428
</section>
429429
<section id="footer">
430-
<p>&copy; 2021 <a class="link" href="https://hbang.github.io/" target="_blank" rel="external">HASHBANG Productions</a>. All rights reserved. (Last updated: 2021-03-10)</p>
431-
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
430+
<p>&copy; 2022 <a class="link" href="https://hbang.github.io/" target="_blank" rel="external noopener">HASHBANG Productions</a>. All rights reserved. (Last updated: 2022-05-23)</p>
431+
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
432432
</section>
433433
</article>
434434
</div>
435435
</body>
436-
</div>
437436
</html>

0 commit comments

Comments
 (0)