Using interactiveDismissDisabled with SwiftUI

Hello, I share the newest function interactiveDismissDisabled with SwiftUI 3. With the newly added interactiveDismissDisabled, you can control the status of closing the relevant screen with a finger swipe. struct DismissDisabledExample: View { @State private var showSecondScreen: Bool = false var body: some View { Button { showSecondScreen.toggle() } label: { Text("Show Screen") .underline() .foregroundColor(.blue)… Continue reading Using interactiveDismissDisabled with SwiftUI

Using onSubmit and submitLabel with SwiftUI

Hello, I share new TextField helper functions onSubmit block and submitLabel with SwiftUI 3. You can easily change the name of the submit button on the keyboard with the .submitLabel function. The .onSubmit function allows us to read data after pressing the submit button and then take the necessary action. struct TextFieldManagmentExample: View { @State… Continue reading Using onSubmit and submitLabel with SwiftUI

Using markdown with SwiftUI

Hello, I share a new markdown support implementation with SwiftUI 3. This year I’m very happy because the newest SwiftUI version added very nice implementations. You can add Text in markdown support strings. struct MarkdownSupportExample: View { var body: some View { Text("Heey! My new apps **available** on *[AppStore](https://apps.apple.com/tr/developer/kenan-atmaca/id1005261563)*") } }

Using TimelineView with SwiftUI

Hello, I’m sharing a new TimelineView block with Swift 3 today. With this newly added TimelineView, you can prepare very impressive animations. It refreshes the block in it temporally with high GPU performance. By using the Canvas object with TimelineView, you can make drawings that can change instantly. struct TimelineViewExample: View { private let emoji… Continue reading Using TimelineView with SwiftUI

Using badge with SwiftUI

Hello, I’m sharing a new view function badge with SwiftUI 3 today. With the new badge function, you can easily add a numeric or text badge. struct BadgeExample: View { var body: some View { TabView { Text("Profile Screen") .tabItem { Label("Profile", systemImage: "person") } .badge(2) } } }

Using searchable with SwiftUI

Hello, I share the new searchable property Swift 3 today. This newly added searchable object is easily added to List or NavigationView. I share a basic example below. struct SearchableExample: View { @State private var searchText: String = "" var body: some View { NavigationView { Text("Searching for -> \(searchText)") .searchable(text: $searchText, prompt: "Search..") .navigationTitle("Searchable… Continue reading Using searchable with SwiftUI

Using List swipeActions with SwiftUI

Hello, I share a new swipe action block with the List element in SwiftUI 3 today. With this newly added block to the list, you can now easily perform action operations. struct ListSwipeExample: View { @State private var nameList: [String] = ["Kenan", "Steve", "Eric", "Susan", "Luis", "Mona", "Jesica"] var body: some View { List {… Continue reading Using List swipeActions with SwiftUI

New Button modifiers with SwiftUI

Hello, I share new button modifiers with SwiftUI today. New Button modifiers have come and started very simple code blocks views. You can check the code sample I shared below. struct ButtonModifiersExample: View { var body: some View { VStack(spacing: 20) { Button("Plain", role: .none, action: {}) .buttonStyle(.plain) Button("Auto", role: .none, action: {}) .buttonStyle(.automatic) Button("Log out",… Continue reading New Button modifiers with SwiftUI

Using refreshable with SwiftUI

Hello, I will share a new code sample with SwiftUI. The newest of this action has arrived in SwiftUI 3. The refresh list data has now become easier. struct RefreshableExample: View { var body: some View { RefreshableScrollView { ForEach(0…99, id: \.self) { _ in ListRowView(title: "Hello World!", image: "globe") } } onRefresh: { print("Refreshed..") }… Continue reading Using refreshable with SwiftUI

Custom PageIndicator with SwiftUI

Hello, I will share the custom page indicator with SwiftUI today. When I share below very simple custom page indicator. You can use it basically in your apps. struct ContentView: View { @State var selectedIndex: Int = 0 var body: some View { VStack { Spacer() PageIndicatorView(selectedIndex: $selectedIndex, count: 4, color: Color.gray.opacity(0.7), selectedColor: .black) }… Continue reading Custom PageIndicator with SwiftUI