Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bc2e69440c |
@@ -1,5 +1,9 @@
|
|||||||
Changelog
|
Changelog
|
||||||
==========
|
==========
|
||||||
|
### 2.1.1
|
||||||
|
|
||||||
|
- Hide close button when push the controller
|
||||||
|
|
||||||
### 2.1.0
|
### 2.1.0
|
||||||
|
|
||||||
- Add push transition with `pushOpenSourceController(from: self)`
|
- Add push transition with `pushOpenSourceController(from: self)`
|
||||||
|
|||||||
BIN
Binary file not shown.
@@ -41,7 +41,7 @@
|
|||||||
</viewController>
|
</viewController>
|
||||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||||
</objects>
|
</objects>
|
||||||
<point key="canvasLocation" x="476" y="138.98050974512745"/>
|
<point key="canvasLocation" x="815.20000000000005" y="138.98050974512745"/>
|
||||||
</scene>
|
</scene>
|
||||||
</scenes>
|
</scenes>
|
||||||
</document>
|
</document>
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class ViewController: UIViewController {
|
|||||||
url: "https://raw.githubusercontent.com/kishikawakatsumi/KeychainAccess/master/LICENSE")]
|
url: "https://raw.githubusercontent.com/kishikawakatsumi/KeychainAccess/master/LICENSE")]
|
||||||
|
|
||||||
// Present controller
|
// Present controller
|
||||||
openSourceVC.pushOpenSourceController(from: self)
|
openSourceVC.presentOpenSourceController(from: self)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Customization
|
// Customization
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
Pod::Spec.new do |s|
|
Pod::Spec.new do |s|
|
||||||
s.name = 'OpenSourceController'
|
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.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.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'
|
s.homepage = 'https://github.com/floriangbh/OpenSourceController'
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ public class OpenSourceController: NSObject {
|
|||||||
open func pushOpenSourceController(from: UIViewController) {
|
open func pushOpenSourceController(from: UIViewController) {
|
||||||
// Create open source controller
|
// Create open source controller
|
||||||
let licenceController = OpenSourceViewController()
|
let licenceController = OpenSourceViewController()
|
||||||
|
licenceController.showCloseButton = false // Don't show close button
|
||||||
|
|
||||||
// Init licence
|
// Init licence
|
||||||
licenceController.licences = self.licences
|
licenceController.licences = self.licences
|
||||||
|
|||||||
@@ -29,9 +29,12 @@ class OpenSourceViewController: UITableViewController {
|
|||||||
/// Contains all licence object before downloaded
|
/// Contains all licence object before downloaded
|
||||||
internal var licences: [LicenceFile]?
|
internal var licences: [LicenceFile]?
|
||||||
|
|
||||||
// Controller configuration for customization
|
/// Controller configuration for customization
|
||||||
internal var config = OpenSourceControllerConfig()
|
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
|
/// Contains all licences object after downloaded
|
||||||
fileprivate var downloadedLicence: [LicenceFile]? {
|
fileprivate var downloadedLicence: [LicenceFile]? {
|
||||||
didSet {
|
didSet {
|
||||||
@@ -58,7 +61,11 @@ class OpenSourceViewController: UITableViewController {
|
|||||||
fileprivate func prepare() {
|
fileprivate func prepare() {
|
||||||
self.prepareTableView()
|
self.prepareTableView()
|
||||||
self.prepareActivityIndicator()
|
self.prepareActivityIndicator()
|
||||||
self.prepareCloseButton()
|
|
||||||
|
if showCloseButton {
|
||||||
|
self.prepareCloseButton()
|
||||||
|
}
|
||||||
|
|
||||||
self.prepareStyle()
|
self.prepareStyle()
|
||||||
self.prepareLicences()
|
self.prepareLicences()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user