Compare commits

...
1 Commits
Author SHA1 Message Date
Florian Gabach bc2e69440c Bump to 2.1.1 2017-12-10 15:18:17 +01:00
7 changed files with 17 additions and 5 deletions
+4
View File
@@ -1,5 +1,9 @@
Changelog
==========
### 2.1.1
- Hide close button when push the controller
### 2.1.0
- Add push transition with `pushOpenSourceController(from: self)`
@@ -41,7 +41,7 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="476" y="138.98050974512745"/>
<point key="canvasLocation" x="815.20000000000005" y="138.98050974512745"/>
</scene>
</scenes>
</document>
@@ -49,7 +49,7 @@ class ViewController: UIViewController {
url: "https://raw.githubusercontent.com/kishikawakatsumi/KeychainAccess/master/LICENSE")]
// Present controller
openSourceVC.pushOpenSourceController(from: self)
openSourceVC.presentOpenSourceController(from: self)
}
// Customization
+1 -1
View File
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'OpenSourceController'
s.version = '2.1.0'
s.version = '2.1.1'
s.summary = 'Display all the librarys licence used in your application. Enjoy !'
s.description = 'Display a screen with all licence used in your apply can be painful to maintain. OpenSourceController was built to respond to this problem. OpenSourceController is a simple parser to display the licences which are used in your application.'
s.homepage = 'https://github.com/floriangbh/OpenSourceController'
@@ -40,6 +40,7 @@ public class OpenSourceController: NSObject {
open func pushOpenSourceController(from: UIViewController) {
// Create open source controller
let licenceController = OpenSourceViewController()
licenceController.showCloseButton = false // Don't show close button
// Init licence
licenceController.licences = self.licences
@@ -29,9 +29,12 @@ class OpenSourceViewController: UITableViewController {
/// Contains all licence object before downloaded
internal var licences: [LicenceFile]?
// Controller configuration for customization
/// Controller configuration for customization
internal var config = OpenSourceControllerConfig()
/// Do we need to show the close button ? (disable if push the controller)
internal var showCloseButton: Bool = true
/// Contains all licences object after downloaded
fileprivate var downloadedLicence: [LicenceFile]? {
didSet {
@@ -58,7 +61,11 @@ class OpenSourceViewController: UITableViewController {
fileprivate func prepare() {
self.prepareTableView()
self.prepareActivityIndicator()
self.prepareCloseButton()
if showCloseButton {
self.prepareCloseButton()
}
self.prepareStyle()
self.prepareLicences()
}