Skip to content

Commit

Permalink
Fix examples #major
Browse files Browse the repository at this point in the history
  • Loading branch information
aromanov91 committed Nov 9, 2024
1 parent d14b9e9 commit 703fff7
Show file tree
Hide file tree
Showing 13 changed files with 92 additions and 254 deletions.
6 changes: 5 additions & 1 deletion Example/Example WatchKit App/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,16 @@
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>CLKComplicationPrincipalClass</key>
<string>$(PRODUCT_MODULE_NAME).ComplicationController</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
<key>WKWatchKitApp</key>
<key>WKApplication</key>
<true/>
<key>WKWatchOnly</key>
<true/>
</dict>
</plist>
208 changes: 48 additions & 160 deletions Example/Example.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1330"
LastUpgradeVersion = "1610"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1530"
LastUpgradeVersion = "1610"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
1 change: 0 additions & 1 deletion Example/Shared/ComponentsList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ struct ComponentsList: View {
}
}
}
.navigationable()
#else
Text("Support will be in the future")
#endif
Expand Down
2 changes: 1 addition & 1 deletion Example/Shared/DemoPages/SegmentedControlDemo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ struct SegmentedControlDemo: View {
Text(item)
Text("Subtitle")
.subheadline()
.onSurfaceHighEmphasisForegroundColor()
.onSurfacePrimaryForeground()
}
}
.segmentedControlStyle(SelectionOnlySegmentedControlStyle())
Expand Down
2 changes: 1 addition & 1 deletion Example/Shared/DemoPages/SurfaceDemo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ struct SurfaceDemo: View {
Surface {
Text("Text")
.title3()
.onSurfaceHighEmphasisForegroundColor()
.onSurfacePrimaryForeground()
}
.surfaceStyle(.secondary)

Expand Down
2 changes: 1 addition & 1 deletion Sources/OversizeUI/Controls/Avatar/AvatarPreview.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Copyright © 2023 Aleksandr Romanov
// File.swift, created on 10.03.2023
// AvatarPreview.swift, created on 10.03.2023
//

import SwiftUI
Expand Down
56 changes: 28 additions & 28 deletions Sources/OversizeUI/Controls/PageView/Page.swift
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ public extension Page where LeadingBar == EmptyView, TitleLabel == EmptyView, He
leadingBar = nil
titleLabel = nil
header = nil
// smallHeader = nil

_searchQuery = .constant(.init())
_displaySearchBar = .constant(false)
}
Expand All @@ -454,7 +454,7 @@ public extension Page where TrailingBar == EmptyView, TitleLabel == EmptyView, H
trailingBar = nil
titleLabel = nil
header = nil
// smallHeader = nil

_searchQuery = .constant(.init())
_displaySearchBar = .constant(false)
}
Expand All @@ -477,7 +477,7 @@ public extension Page where TrailingBar == EmptyView, LeadingBar == EmptyView, T
trailingBar = nil
titleLabel = nil
header = nil
// smallHeader = nil

_searchQuery = .constant(.init())
_displaySearchBar = .constant(false)
}
Expand All @@ -501,7 +501,7 @@ public extension Page where TrailingBar == EmptyView, LeadingBar == EmptyView, T
topToolbar = nil
titleLabel = nil
header = nil
// smallHeader = nil

_searchQuery = .constant(.init())
_displaySearchBar = .constant(false)
}
Expand All @@ -524,7 +524,7 @@ public extension Page where LeadingBar == EmptyView, TopToolbar == EmptyView, Ti
topToolbar = nil
titleLabel = nil
header = nil
// smallHeader = nil

_searchQuery = .constant(.init())
_displaySearchBar = .constant(false)
}
Expand All @@ -547,7 +547,7 @@ public extension Page where TrailingBar == EmptyView, TopToolbar == EmptyView, T
topToolbar = nil
titleLabel = nil
header = nil
// smallHeader = nil

_searchQuery = .constant(.init())
_displaySearchBar = .constant(false)
}
Expand All @@ -569,7 +569,7 @@ public extension Page where TopToolbar == EmptyView, TitleLabel == EmptyView, He
topToolbar = nil
titleLabel = nil
header = nil
// smallHeader = nil

_searchQuery = .constant(.init())
_displaySearchBar = .constant(false)
}
Expand All @@ -592,7 +592,7 @@ public extension Page where TrailingBar == EmptyView, LeadingBar == EmptyView, T
trailingBar = nil
topToolbar = nil
header = nil
// smallHeader = nil

_searchQuery = .constant(.init())
_displaySearchBar = .constant(false)
}
Expand All @@ -614,7 +614,7 @@ public extension Page where TrailingBar == EmptyView, TopToolbar == EmptyView, H
trailingBar = nil
topToolbar = nil
header = nil
// smallHeader = nil

_searchQuery = .constant(.init())
_displaySearchBar = .constant(false)
}
Expand All @@ -636,7 +636,7 @@ public extension Page where LeadingBar == EmptyView, TopToolbar == EmptyView, He
leadingBar = nil
topToolbar = nil
header = nil
// smallHeader = nil

_searchQuery = .constant(.init())
_displaySearchBar = .constant(false)
}
Expand All @@ -657,7 +657,7 @@ public extension Page where TrailingBar == EmptyView, Header == EmptyView {
self.content = content()
trailingBar = nil
header = nil
// smallHeader = nil

_searchQuery = .constant(.init())
_displaySearchBar = .constant(false)
}
Expand All @@ -678,7 +678,7 @@ public extension Page where LeadingBar == EmptyView, Header == EmptyView {
self.content = content()
leadingBar = nil
header = nil
// smallHeader = nil

_searchQuery = .constant(.init())
_displaySearchBar = .constant(false)
}
Expand All @@ -699,7 +699,7 @@ public extension Page where TopToolbar == EmptyView, Header == EmptyView {
self.content = content()
topToolbar = nil
header = nil
// smallHeader = nil

_searchQuery = .constant(.init())
_displaySearchBar = .constant(false)
}
Expand All @@ -720,7 +720,7 @@ public extension Page where TitleLabel == EmptyView, Header == EmptyView {
self.content = content()
titleLabel = nil
header = nil
// smallHeader = nil

_searchQuery = .constant(.init())
_displaySearchBar = .constant(false)
}
Expand All @@ -743,7 +743,7 @@ public extension Page where LeadingBar == EmptyView, TitleLabel == EmptyView {
leadingBar = nil
titleLabel = nil
self.header = header()
// smallHeader = nil

_searchQuery = .constant(.init())
_displaySearchBar = .constant(false)
}
Expand All @@ -766,7 +766,7 @@ public extension Page where TrailingBar == EmptyView, TitleLabel == EmptyView {
trailingBar = nil
titleLabel = nil
self.header = header()
// smallHeader = nil

_searchQuery = .constant(.init())
_displaySearchBar = .constant(false)
}
Expand All @@ -790,7 +790,7 @@ public extension Page where TrailingBar == EmptyView, LeadingBar == EmptyView, T
trailingBar = nil
titleLabel = nil
self.header = header()
// smallHeader = nil

_searchQuery = .constant(.init())
_displaySearchBar = .constant(false)
}
Expand All @@ -815,7 +815,7 @@ public extension Page where TrailingBar == EmptyView, LeadingBar == EmptyView, T
topToolbar = nil
titleLabel = nil
self.header = header()
// smallHeader = nil

_searchQuery = .constant(.init())
_displaySearchBar = .constant(false)
}
Expand All @@ -839,7 +839,7 @@ public extension Page where LeadingBar == EmptyView, TopToolbar == EmptyView, Ti
topToolbar = nil
titleLabel = nil
self.header = header()
// smallHeader = nil

_searchQuery = .constant(.init())
_displaySearchBar = .constant(false)
}
Expand All @@ -863,7 +863,7 @@ public extension Page where TrailingBar == EmptyView, TopToolbar == EmptyView, T
topToolbar = nil
titleLabel = nil
self.header = header()
// smallHeader = nil

_searchQuery = .constant(.init())
_displaySearchBar = .constant(false)
}
Expand All @@ -886,7 +886,7 @@ public extension Page where TopToolbar == EmptyView, TitleLabel == EmptyView {
topToolbar = nil
titleLabel = nil
self.header = header()
// smallHeader = nil

_searchQuery = .constant(.init())
_displaySearchBar = .constant(false)
}
Expand All @@ -910,7 +910,7 @@ public extension Page where TrailingBar == EmptyView, LeadingBar == EmptyView, T
trailingBar = nil
topToolbar = nil
self.header = header()
// smallHeader = nil

_searchQuery = .constant(.init())
_displaySearchBar = .constant(false)
}
Expand All @@ -933,7 +933,7 @@ public extension Page where TrailingBar == EmptyView, TopToolbar == EmptyView {
trailingBar = nil
topToolbar = nil
self.header = header()
// smallHeader = nil

_searchQuery = .constant(.init())
_displaySearchBar = .constant(false)
}
Expand All @@ -956,7 +956,7 @@ public extension Page where LeadingBar == EmptyView, TopToolbar == EmptyView {
leadingBar = nil
topToolbar = nil
self.header = header()
// smallHeader = nil

_searchQuery = .constant(.init())
_displaySearchBar = .constant(false)
}
Expand All @@ -978,7 +978,7 @@ public extension Page where TrailingBar == EmptyView {
self.content = content()
trailingBar = nil
self.header = header()
// smallHeader = nil

_searchQuery = .constant(.init())
_displaySearchBar = .constant(false)
}
Expand All @@ -1000,7 +1000,7 @@ public extension Page where LeadingBar == EmptyView {
self.content = content()
leadingBar = nil
self.header = header()
// smallHeader = nil

_searchQuery = .constant(.init())
_displaySearchBar = .constant(false)
}
Expand All @@ -1022,7 +1022,7 @@ public extension Page where TopToolbar == EmptyView {
self.content = content()
topToolbar = nil
self.header = header()
// smallHeader = nil

_searchQuery = .constant(.init())
_displaySearchBar = .constant(false)
}
Expand All @@ -1044,7 +1044,7 @@ public extension Page where TitleLabel == EmptyView {
self.content = content()
titleLabel = nil
self.header = header()
// smallHeader = nil

_searchQuery = .constant(.init())
_displaySearchBar = .constant(false)
}
Expand Down
37 changes: 0 additions & 37 deletions Sources/OversizeUI/Controls/Row/Row.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ public struct Row<LeadingLabel, TrailingLabel>: View where LeadingLabel: View, T
private let leadingLabel: LeadingLabel?
private let trailingLabel: TrailingLabel?

// private var leadingType: RowLeadingType?
// private var trallingType: RowTrailingType?

private let action: (() -> Void)?

private var isPremiumOption = false
Expand Down Expand Up @@ -63,26 +60,6 @@ public struct Row<LeadingLabel, TrailingLabel>: View where LeadingLabel: View, T
leadingRadius = nil
}

@available(*, deprecated, message: "Use leading: {} and tralling: {}")
public init(_ title: String,
subtitle: String? = nil,
// leadingType: RowLeadingType? = nil,
// trallingType: RowTrailingType? = nil,
paddingHorizontal _: Space = .medium,
paddingVertical _: Space = .small,
action: (() -> Void)? = nil)
{
self.title = title
self.subtitle = subtitle
// self.leadingType = leadingType
// self.trallingType = trallingType
self.action = action
leadingLabel = nil
trailingLabel = nil
leadingSize = nil
leadingRadius = nil
}

public var body: some View {
if action != nil {
Button {
Expand Down Expand Up @@ -246,20 +223,6 @@ public extension Row {
control.textColor = color
return control
}
//
// @available(*, deprecated, message: "Use leading: {} and tralling: {}")
// func rowLeading(_ leading: RowLeadingType?) -> Row {
// var control = self
// control.leadingType = leading
// return control
// }
//
// @available(*, deprecated, message: "Use leading: {} and tralling: {}")
// func rowTrailing(_ trailing: RowTrailingType?) -> Row {
// var control = self
// control.trallingType = trailing
// return control
// }
}

public extension View {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
////
//// Copyright © 2023 Alexander Romanov
//// File.swift, created on 26.11.2023
////
//
// Copyright © 2023 Alexander Romanov
// ScrollViewHeader.swift, created on 26.11.2023
//
//

import SwiftUI
Expand Down
Loading

0 comments on commit 703fff7

Please sign in to comment.