馃憤
Added swift3 and swift2.3 branches.
However, the demo app hangs the Auto Layout engine in certain scenarios. I've filed the following radar:
Summary:
In Xcode 8 beta 6, calling UIView.layoutIfNeeded() hangs main queue with high CPU utilization in certain circumstances. The hang appears to be in a private method layoutBelowIfNeeded().Steps to Reproduce:
- Open the attached Demo application in Xcode 8 beta 6. Demo app can be found in SwiftMessages.zip in Demo/Demo.xcworkspace.
- Run app in Simulator or on device.
- Select the "Explore" row.
- Select Presentation Style "Bottom"
- Select Layout "Tab"
- Tap "Show"
Expected Results:
Message view animates up from behind the status bar.Actual Results:
Main queue hangs with high CPU utilization in the function UIView.layoutIfNeeded().Version:
iOS 10 beta 7Notes:
Hangs under Xcode 8 beta 6 in Simulator or on device running iOS 10 beta 7.Configuration:
iPhone 6sAttachments:
'SwiftMessages.zip' was successfully uploaded.
A workaround has been promoted to swift3 and swift2.3. Description of the workaround added to Radar:
Workaround found:
- Open TabView.xib in Xcode 8.
- Select iPhone 6s as initial device view.
- Perform reproduction steps.
The swift3 and swift2.3 have been updated with the latest changes from master. The releases are being held up by CocoaPods. To use either of these branches with CocoaPods requires version 1.1.0, which hasn't been released yet. The release candidate, however, can be installed with:
sudo gem install cocoapods --pre
Then add the following to the podfile (for the swift3 branch):
pod 'SwiftMessages', :git => 'https://github.com/SwiftKickMobile/SwiftMessages.git', :branch => 'swift3'
From the readme:
Add one of the following lines to your Podfile depending on your Swift version:
# Swift 3.0 & Xcode 8
pod 'SwiftMessages'
# Swift 2.3 & Xcode 8
pod 'SwiftMessages', '~> 2.0.0'
# Swift 2.2 & Xcode 7.3.1
pod 'SwiftMessages', '~> 1.1.4'
Note that Swift 2.3 and Swift 3.0 require CocoaPods 1.1.0, which is in beta as of September 20, 2016. CocoaPods 1.1.0 beta can be installed with the following command:
sudo gem install cocoapods --pre
Add one of the following lines to your Cartfile depending on your Swift version:
# Swift 3.0 & Xcode 8
github "SwiftKickMobile/SwiftMessages"
# Swift 2.3 & Xcode 8
github "SwiftKickMobile/SwiftMessages" ~> 2.0.0
# Swift 2.2 & Xcode 7.3.1
github "SwiftKickMobile/SwiftMessages" ~> 1.1.4
Most helpful comment
The swift3 and swift2.3 have been updated with the latest changes from master. The releases are being held up by CocoaPods. To use either of these branches with CocoaPods requires version 1.1.0, which hasn't been released yet. The release candidate, however, can be installed with:
Then add the following to the podfile (for the swift3 branch):