A multiplatform SwiftUI project demonstrating various SwiftUI features.

Related tags

SwiftUI App WikiDemo
Overview

WikiDemo

A multiplatform SwiftUI project demonstrating various SwiftUI features, including creating a master-detail interface. It's a multiplatform version of the MacWikiDemo project. I use this project as a sample project in the following articles:

The master view shows a list of pages. Select a page to show the page's contents in the detail view.

The detail view has two views: a text view where you type Markdown and a web view that shows HTML.

System Requirements

  • Xcode 13.0+ for iOS version
  • Xcode 13.1+ for Mac version
  • iOS 14+
  • macOS 11+

Adding Pages

Click the Add button at the bottom of the list to add a new page.

Renaming Pages

iOS

Tap the Edit button. Tap on the name of a page to rename it.

Mac

Select the page from the sidebar and press the Return key to rename the page.

I find that with SwiftUI that all you have to do is select the page to change the page name. I consider it a bug.

Deleting Pages

iOS

Tap the Edit button. Tap the minus button next to the page you want to remove. Tap the Delete button to finish deleting.

Mac

Select the page and press the Delete key to delete a page.

You may have to press the Esc key afer selecting the page to select the page instead of renaming it.

Interesting Files

  • The ContentView.swift and PageListView.swift files have the code for creating a master-detail interface.
  • The Wiki.swift and Page.swift files have the code for working with file wrappers.
  • The PageListView.swift and Wiki.swift files have the code for list item removal.
  • The PageListView.swift file in the iOS folder has code for disabling the text fields in the page list until someone taps the Edit button on iOS.
You might also like...
Don't start from scratch, start from Here! This is a starter project for iOS projects. It contains all the basic configurations and common libraries for your project.

Starter-iOS Don't start from scratch, start from Here! This is a starter project for iOS projects. It contains all the basic configurations and common

NewsAPI-Project - News API Project For iOS
NewsAPI-Project - News API Project For iOS

NewsAPI-Project Es necesario descargar y realizar un pod install para ejecutar e

SwiftUI-MSALSample - Sample project to login with MSAL using SwiftUI
SwiftUI-MSALSample - Sample project to login with MSAL using SwiftUI

SwiftUI-MSALSample I could not find a good walkthrough on how to implement MSAL

Watchos-navlink-swiftui-bug - Example Project to demonstrate bug in SwiftUI when NavigationLink is activated inside a TabView
This SwiftUI project is a result of the third 'milestone' in "Hacking With Swift's 100 Days of SwiftUI".

exercise-tracker This SwiftUI project is a result of the third 'milestone' in "Hacking With Swift's 100 Days of SwiftUI". In this exercise tracking ap

Currency Converter project coded by SwiftUI and Swift5
Currency Converter project coded by SwiftUI and Swift5

SwiftUI-Currency-Converter Currency Converter project coded by SwiftUI and Swift5 Features Implemented with SwiftUI Supports darkmode for sure SwiftUI

Building Expense Tracker iOS App with Core Data & SwiftUI Completed Project
Building Expense Tracker iOS App with Core Data & SwiftUI Completed Project

Completed Project for Building Expense Tracker iOS App with Core Data & SwiftUI Follow the tutorial at alfianlosari.com Features Create, edit, and del

This is an example project of SwiftUI and Combine using GitHub API.
This is an example project of SwiftUI and Combine using GitHub API.

SwiftUI-Combine-Example This is an example project of SwiftUI and Combine using GitHub GET /search/users API. 📋 Requirements Swift5.1 Beta Xcode11.0

Completed Project for Cross Platform Image Filter SwiftUI macOS & iOS App
Completed Project for Cross Platform Image Filter SwiftUI macOS & iOS App

Completed Project for Cross Platform Image Filter SwiftUI macOS & iOS App Follow the tutorial at alfianlosari.com Features Filter image using predefin

Comments
  • How to save/open a core data file in the

    How to save/open a core data file in the "package" file

    Is it possible to create/open a core data file from this Package ?

    In the init() function could one create an NSPersistentContainer in the main directory and then have the MOC as a variable on the FileDocument ?

    Similarly in the fileWrapper() function could one just call the MOC.save() method.

    I am guess this seems to easy - unless perhaps one creates an in memory database in init() and then writes that to file in fileWrapper()

    Any thoughts on whether this might be feasible ?

    opened by duncangroenewald 1
  • To disable textfield for edit mode on iOS13

    To disable textfield for edit mode on iOS13

    As we can't use .onChange on iOS 13 here is solution with .onReceive: .

    onReceive(Just(editMode?.wrappedValue)) { newValue in
                            if (newValue != nil) && (newValue!.isEditing) {
                                disableTextField = false // Edit button tapped
                                } else {
                                disableTextField = true // Done button tapped
                                }
                        }
    

    You just have to import Combine, works the same

    opened by LukaszDziwosz 0
Owner
Swift Dev Journal
Swift Dev Journal is an online publication for iOS and Mac developers.
Swift Dev Journal
A multiplatform SwiftUI app for SwiftUIJam

Avec Moi (english: with me) Context A multiplatform (macOS, iOS, watchOS) SwiftUI app submitted to SwiftUI Jam 2021. Description I'm currently learnin

Asad Mansoor 1 Nov 8, 2021
An app to count stitches in crochet patterns. Multiplatform.

An app to count your crochet patterns' stitches! Made with 100% SwiftUI, no UIKit, and no 3rd party dependencies. Powered by regular expressions. Down

Zheng 9 Oct 24, 2022
BioMatrix is an app that allows users to quiz themselves on various biology questions!

Welcome to BioMatrix! It is an app that allows users to quiz themselves on a variety of biology questions! This app allows various functionalities!

null 6 May 28, 2022
With the Coverless App, you can discover many books of various genres

Coverless Não julgue um livro pela capa: use a sinopse! Com o App Coverless, você pode descobrir muitos livros de vários gêneros. Salve seus livros de

Oliver (Bruno) 1 Oct 26, 2021
CollectionComposer2 - Copy random image files from various sources to destination folder - ready to use

CollectionComposer2 This is a small tool to copy a random number of image files from different source folders to a destination folder. As an additiona

Holger Hinzberg 0 Jan 4, 2022
CZWeatherKit is a simple, extensible weather library for iOS, tvOS, and OS X that allows for easy fetching of weather data from various weather services.

CZWeatherKit is a simple, extensible weather library for iOS, tvOS, and OS X that allows for easy fetching of weather data from various weather services.

Comyar 455 Nov 20, 2022
News App 📱 built to demonstrate the use of SwiftUI 3 features, Async/Await, CoreData and MVVM architecture pattern.

Box Feed News App ?? built to demonstrate the use of following features, SwiftUI 3 Async/Await AsyncImage List Refreshable Swipe Actions Separator Cor

Sameer Nawaz 113 Dec 20, 2022
Swift UI features and general iOS development coding lab

SwiftUI & iOS development concepts code lab Contains sample projects with documentation Overview SwiftUI provides views, controls and layout structure

Samuel Owino 4 Dec 14, 2022
An application on the iPad for people who cook. It comes with features such as smart recipes, recipe management and ingredient inventory tracking.

ChopChop ChopChop is an application on the iPad for people who cook. It comes with features such as smart recipes, recipe management and ingredient in

Seow Alex 0 Dec 23, 2021
A Swifty way to toggle your features.

Requirements Installation Usage TODO Communication Credits License Requirements iOS 8.0+ Xcode 8.1+ Swift 3.1+ Installation CocoaPods Create a Podfile

Marco Santarossa 11 Aug 10, 2021