Description
- Ruby (>= 2.4, rbenv or rvm recommended)
- Bundler (
gem install bundler
)
/// After reading an article from Antoine v.d. SwiftLee @twannl about conditional view modifier, I had an idea to improve my code I write for specific OS. | |
/// https://www.avanderlee.com/swiftui/conditional-view-modifier | |
extension Bool { | |
static var iOS: Bool { | |
#if os(iOS) | |
return true | |
#else | |
return false | |
#endif |
import SwiftUI | |
struct UserActivityView: View { | |
@State private(set) var activityType: String? = nil | |
@State private(set) var currentActivity: NSUserActivity? = nil | |
var body: some View { | |
Text(activityType ?? "No activity restored yet") | |
.onContinueUserActivity("userActivity", perform: { userActivity in | |
self.activityType = userActivity.activityType |
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog.
I hereby claim:
To claim this, I am signing this object:
cp -R /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.2\ \(14C89\) \ | |
/Applications/Xcode-7.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport |