Skip to content

Commit

Permalink
More docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ConfusedVorlon committed Jul 30, 2021
1 parent 26dd898 commit 34fcce8
Show file tree
Hide file tree
Showing 24 changed files with 53 additions and 19 deletions.
1 change: 1 addition & 0 deletions Sources/HSUIKit/UIViewController+Alert.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import Foundation
import UIKit

/// Add this to any UIViewController to let it easily present an Alert
public extension UIViewController {

func showAlert(title:String?,message:String?,cancelButton:String = "Cancel") {
Expand Down
1 change: 1 addition & 0 deletions Sources/HSUIKit/UIViewController+Email.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public protocol CanSendEmail:MFMailComposeViewControllerDelegate {
func sendEmail(to:[String],subject:String,body:String, isHtml:Bool,attachments:[EmailAttachment]);
}

/// Add this to any UIViewController to let it easily send an email
public extension CanSendEmail where Self: UIViewController {

/// Send using mailto
Expand Down
7 changes: 6 additions & 1 deletion Sources/HSUIKit/UIViewController+HS.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,14 @@ public protocol FromStoryboard: class {
static func fromStoryboard() -> Self
}

/// Provide easy way to load UIController from storyboard using convention over configuration
/// MyViewController.fromStoryboard()
/// Default (overridable) assumptions are:
/// storyboard filename is MyViewController.storyboard
/// storyboardID should be set in the file as MyViewController
/// file should contain a single view controller whichis set as the initial controller
public extension FromStoryboard where Self: UIViewController {


/// Load VC from storyboard
/// Storyboard ID is by default assumed to be the class name
/// - Returns: the VC
Expand Down
2 changes: 1 addition & 1 deletion Sources/HSUIKit/UIViewController+Preview.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import Foundation
import UIKit


/// Add this to any UIViewController to let it easily present a UIDocumentInteractionController controller using openPreview(...)
public protocol CanShowPreview {
func openPreview(url:URL,animated:Bool)
}
Expand Down
1 change: 1 addition & 0 deletions Sources/HSUIKit/UIViewController+Safari.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import Foundation
import SafariServices

/// Add this to any UIViewController to let it easily present a SFSafariView controller using openSafari(url:)
public protocol CanShowSafari {
func openSafari(url:URL,tint:UIColor?)
}
Expand Down
2 changes: 2 additions & 0 deletions Sources/HSUIKit/UIViewController+Share.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import Foundation
import UIKit

//Easily share an item using UIActivityViewController
public extension UIViewController {

@objc
Expand All @@ -33,6 +34,7 @@ public extension UIViewController {
}

@objc
/// Item to share Url, UIImage, etc
public class ShareItem: NSObject, UIActivityItemSource {

private let subject:String
Expand Down
3 changes: 2 additions & 1 deletion docs/Classes.html
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,8 @@ <h4>Declaration</h4>
<section class="section">
<div class="pointer"></div>
<div class="abstract">

<p>Item to share Url, UIImage, etc</p>

<a href="Classes/ShareItem.html" class="slightly-smaller">See more</a>
</div>
</section>
Expand Down
3 changes: 2 additions & 1 deletion docs/Classes/ShareItem.html
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,8 @@
<section>
<section class="section">
<h1>ShareItem</h1>

<p>Item to share Url, UIImage, etc</p>

</section>
<section class="section task-group-section">
<div class="task-group">
Expand Down
3 changes: 2 additions & 1 deletion docs/Extensions.html
Original file line number Diff line number Diff line change
Expand Up @@ -1810,7 +1810,8 @@ <h4>Declaration</h4>
<section class="section">
<div class="pointer"></div>
<div class="abstract">

<p>Add this to any UIViewController to let it easily present an Alert</p>

<a href="Extensions/UIViewController.html" class="slightly-smaller">See more</a>
</div>
</section>
Expand Down
3 changes: 2 additions & 1 deletion docs/Extensions/UIViewController.html
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,8 @@
<section>
<section class="section">
<h1>UIViewController</h1>

<p>Add this to any UIViewController to let it easily present an Alert</p>

</section>
<section class="section task-group-section">
<div class="task-group">
Expand Down
6 changes: 4 additions & 2 deletions docs/Protocols.html
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,8 @@ <h4>Declaration</h4>
<section class="section">
<div class="pointer"></div>
<div class="abstract">

<p>Add this to any UIViewController to let it easily present a UIDocumentInteractionController controller using openPreview(&hellip;)</p>

<a href="Protocols/CanShowPreview.html" class="slightly-smaller">See more</a>
</div>
</section>
Expand All @@ -538,7 +539,8 @@ <h4>Declaration</h4>
<section class="section">
<div class="pointer"></div>
<div class="abstract">

<p>Add this to any UIViewController to let it easily present a SFSafariView controller using openSafari(url:)</p>

<a href="Protocols/CanShowSafari.html" class="slightly-smaller">See more</a>
</div>
</section>
Expand Down
3 changes: 2 additions & 1 deletion docs/Protocols/CanShowPreview.html
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,8 @@
<section>
<section class="section">
<h1>CanShowPreview</h1>

<p>Add this to any UIViewController to let it easily present a UIDocumentInteractionController controller using openPreview(&hellip;)</p>

</section>
<section class="section task-group-section">
<div class="task-group">
Expand Down
3 changes: 2 additions & 1 deletion docs/Protocols/CanShowSafari.html
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,8 @@
<section>
<section class="section">
<h1>CanShowSafari</h1>

<p>Add this to any UIViewController to let it easily present a SFSafariView controller using openSafari(url:)</p>

</section>
<section class="section task-group-section">
<div class="task-group">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,8 @@ <h4>Declaration</h4>
<section class="section">
<div class="pointer"></div>
<div class="abstract">

<p>Item to share Url, UIImage, etc</p>

<a href="Classes/ShareItem.html" class="slightly-smaller">See more</a>
</div>
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,8 @@
<section>
<section class="section">
<h1>ShareItem</h1>

<p>Item to share Url, UIImage, etc</p>

</section>
<section class="section task-group-section">
<div class="task-group">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1810,7 +1810,8 @@ <h4>Declaration</h4>
<section class="section">
<div class="pointer"></div>
<div class="abstract">

<p>Add this to any UIViewController to let it easily present an Alert</p>

<a href="Extensions/UIViewController.html" class="slightly-smaller">See more</a>
</div>
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,8 @@
<section>
<section class="section">
<h1>UIViewController</h1>

<p>Add this to any UIViewController to let it easily present an Alert</p>

</section>
<section class="section task-group-section">
<div class="task-group">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,8 @@ <h4>Declaration</h4>
<section class="section">
<div class="pointer"></div>
<div class="abstract">

<p>Add this to any UIViewController to let it easily present a UIDocumentInteractionController controller using openPreview(&hellip;)</p>

<a href="Protocols/CanShowPreview.html" class="slightly-smaller">See more</a>
</div>
</section>
Expand All @@ -538,7 +539,8 @@ <h4>Declaration</h4>
<section class="section">
<div class="pointer"></div>
<div class="abstract">

<p>Add this to any UIViewController to let it easily present a SFSafariView controller using openSafari(url:)</p>

<a href="Protocols/CanShowSafari.html" class="slightly-smaller">See more</a>
</div>
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,8 @@
<section>
<section class="section">
<h1>CanShowPreview</h1>

<p>Add this to any UIViewController to let it easily present a UIDocumentInteractionController controller using openPreview(&hellip;)</p>

</section>
<section class="section task-group-section">
<div class="task-group">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,8 @@
<section>
<section class="section">
<h1>CanShowSafari</h1>

<p>Add this to any UIViewController to let it easily present a SFSafariView controller using openSafari(url:)</p>

</section>
<section class="section task-group-section">
<div class="task-group">
Expand Down
4 changes: 4 additions & 0 deletions docs/docsets/.docset/Contents/Resources/Documents/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,10 @@ <h1 id='hshelpers' class='heading'>HSHelpers</h1>
<li>HSTime - Extension on <a href="https://github.com/dreymonde/Time">https://github.com/dreymonde/Time</a></li>
</ul>

<p><a href="https://confusedvorlon.github.io/HSHelpers/index.html">Browse Documentation</a></p>

<p>Note - all the modules are mixed up in the docs, because that&rsquo;s what jazzy seems to do!</p>

</section>
</section>
<section id="footer">
Expand Down
Binary file modified docs/docsets/.tgz
Binary file not shown.
4 changes: 4 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,10 @@ <h1 id='hshelpers' class='heading'>HSHelpers</h1>
<li>HSTime - Extension on <a href="https://github.com/dreymonde/Time">https://github.com/dreymonde/Time</a></li>
</ul>

<p><a href="https://confusedvorlon.github.io/HSHelpers/index.html">Browse Documentation</a></p>

<p>Note - all the modules are mixed up in the docs, because that&rsquo;s what jazzy seems to do!</p>

</section>
</section>
<section id="footer">
Expand Down
2 changes: 1 addition & 1 deletion document.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ sourcekitten doc --spm --module-name HSHelpers > .tmp/mod1.json
sourcekitten doc --spm --module-name HSAppKit > .tmp/mod2.json
sourcekitten doc --spm --module-name HSUIKit > .tmp/mod3.json
sourcekitten doc --spm --module-name HSTime > .tmp/mod4.json
jazzy --sourcekitten-sourcefile .tmp/mod1.json,.tmp/mod2.json,.tmp/mod3.json,.tmp/mod4.json
jazzy --sourcekitten-sourcefile .tmp/mod1.json,.tmp/mod2.json,.tmp/mod3.json,.tmp/mod4.json --disable-search

0 comments on commit 34fcce8

Please sign in to comment.