Skip to content

Commit

Permalink
Merge pull request #57 from ceyhuno/master
Browse files Browse the repository at this point in the history
Dispatched Presenter.init(config:view:delegate:) call in SwiftMessages class to the main queue
  • Loading branch information
wtmoose authored Jan 15, 2017
2 parents 83e0ce7 + 0153648 commit 5b6ceb6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Change Log
All notable changes to this project will be documented in this file.

## [3.1.4](https://github.com/SwiftKickMobile/SwiftMessages/releases/tag/3.1.4)

### Bug Fixes

* Fixed an issue where UIKit components were being instantiated off the main queue.

## [3.1.3](https://github.com/SwiftKickMobile/SwiftMessages/releases/tag/3.1.3)

### Features
Expand Down
4 changes: 2 additions & 2 deletions SwiftMessages.podspec
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Pod::Spec.new do |spec|
spec.name = 'SwiftMessages'
spec.version = '3.1.3'
spec.version = '3.1.4'
spec.license = { :type => 'MIT' }
spec.homepage = 'https://github.com/SwiftKickMobile/SwiftMessages'
spec.authors = { 'Timothy Moose' => '[email protected]' }
spec.summary = 'A very flexible message bar for iOS written in Swift.'
spec.source = {:git => 'https://github.com/SwiftKickMobile/SwiftMessages.git', :tag => '3.1.3'}
spec.source = {:git => 'https://github.com/SwiftKickMobile/SwiftMessages.git', :tag => '3.1.4'}
spec.platform = :ios, '8.0'
spec.ios.deployment_target = '8.0'
spec.source_files = 'SwiftMessages/**/*.swift'
Expand Down
7 changes: 5 additions & 2 deletions SwiftMessages/SwiftMessages.swift
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,13 @@ open class SwiftMessages: PresenterDelegate {
- Parameter view: The view to be displayed.
*/
open func show(config: Config, view: UIView) {
syncQueue.async { [weak self] in
DispatchQueue.main.async { [weak self] in
guard let strongSelf = self else { return }
let presenter = Presenter(config: config, view: view, delegate: strongSelf)
strongSelf.enqueue(presenter: presenter)
strongSelf.syncQueue.async { [weak self] in
guard let strongSelf = self else { return }
strongSelf.enqueue(presenter: presenter)
}
}
}

Expand Down

0 comments on commit 5b6ceb6

Please sign in to comment.