Education

RSS for tag

Teach students of all ages to code in Swift using a variety of resources in your curriculum.

Posts under Education tag

18 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Apple SwiftUI Landmarks tutorial
Apple SwiftUI landmarks tutorial error: Can someone who has gone through this tutorial help me figure out why when adding the hike view folders from the project resources and its hike JSON data files, does the project appear to start crashing the previews on the canvas? I reverted back to where things were working by removing the project files I was directed to add and now the previews work again.
0
0
355
Jan ’24
Swift Playgrounds lessons not showing Swift 5.9
Hey folks! I remember some weeks/months ago to get some lessons with updated Swift 5.9, I'm just not sure if this happened while I was using Swift Playgrounds beta from TestFlight. Anyways, I went back to study using Swift Playgrounds and all the lessons are using Swift 5.8 here. I don't know what happened or how can I have the lessons updated again. Anyone else noticed this issue? Any tip on how to solve it?
7
0
697
Jan ’24
Simple barcode reader. Please help
Hello everyone, first let me say a few words about myself. I am an IT student and I want to learn and develop some applications in Swift. Now I am working on one application and I need a barcode scanner to complete it. So I need help from someone who can help me with a simple barcode scanner. My idea is that the barcode will be on one screen and they have to read the code and write it to a variable. That's my idea. I will appreciate the full code or help. thank you for answer
2
0
539
Jan ’24
Xcode Playgrounds + Xcode 15
We are in class working with Develop in Swift Explorations. We created a new playground file to create a learning playground for notes and exercises and since the update to Xcode 15, it is running extremely sluggish and slow. Playground file is build for iOS and using Simulator for iPhone 15. We also tried to run for Mac and same issues. In addition, the Macbook Air M2s are running VERY hot - which is unusual.
4
0
827
Oct ’23
Starting with iOS Dev.
I am starting with programming. I changed career of late. I learnt basics of python very recently. I am keen to work as iOS developer in future. There's ambiguity how to kickstart my journey of programming and app dev. I need suggestion regarding what resources to follow. It's hard to do it without proper and directed guidance. In Book store, I could see books. I downloaded two of them, one is Develop in Swift Fundamentals and the other book is Develop in Swift Explorations. I am confused which one to read first. Is there some other good resources available online? Some YT channel I could refer? Please help me!
3
0
590
Oct ’23
Managed apple ID and Wallet app support
Hi everyone, I'm currently working on implementing some of the discussed ideas, but I've run into an issue. Our company uses managed Apple IDs on all of our iPhones are company-owned. Recently, we updated some of these devices to iOS 17, but we've noticed that the Wallet app is not visible on them. There is no restrictions from our MDM and without the managed Apple ID signed in i can see the app and its usable.
0
0
652
Oct ’23
[Need help!] Performance Issue: Laggy Scroll in SwiftUI App with ScrollView
I'm using ScrollView to display my course list, and each card in the list, named 'CourseCardView' as shown in the code. When I test it on both the simulator and a physical device, I notice that scrolling is not smooth and feels laggy. I'm not sure how to address this issue. Here is my code: // // CourseListView.swift // LexueSwiftUI // // Created by bobh on 2023/9/3. // import SwiftUI struct CourseCardView: View { let cardHeight: CGFloat = 150 let cardCornelRadius: CGFloat = 10 let cardHorizontalPadding: CGFloat = 10 @State var courseName = "course name" @State var courseCategory = "category name" @State var progress = 66 var body: some View { ZStack { Image("default_course_bg2") .resizable() .blur(radius: 5, opaque: true) .cornerRadius(cardCornelRadius) .padding(.horizontal, cardHorizontalPadding) .frame(height: cardHeight) Color.white .cornerRadius(cardCornelRadius) .padding(.horizontal, cardHorizontalPadding) .frame(height: cardHeight) .opacity(0.1) VStack(alignment: .leading, spacing: 2) { Spacer() Text(courseName) .bold() .font(.title) .foregroundColor(.white) .lineLimit(1) .shadow(color: .black.opacity(0.5), radius: 5, x: 0, y: 2) .padding(.leading, 10) Text(courseCategory) .bold() .font(.headline) .foregroundColor(.white) .lineLimit(1) .shadow(color: .black.opacity(0.5), radius: 5, x: 0, y: 2) .padding(.leading, 10) .padding(.bottom, 5) ProgressView(value: Double(progress) / 100.0) .padding(.horizontal, 10) .padding(.bottom, 10) .accentColor(.white) .shadow(color: .black.opacity(0.3), radius: 5, x: 0, y: 2) } .frame(height: cardHeight) .frame(maxWidth: .infinity, alignment: .leading) .padding(.horizontal, cardHorizontalPadding) VStack { HStack { Spacer() Button(action: { }) { Image(systemName: "star") .foregroundColor(.white) .font(.system(size: 24).weight(.regular)) .shadow(color: .black.opacity(0.3), radius: 5, x: 0, y: 2) } .padding(.trailing, 10) .padding(.top, 10) } Spacer() } .frame(height: cardHeight) .frame(maxWidth: .infinity, alignment: .leading) .padding(.horizontal, cardHorizontalPadding) } .shadow(color: .black.opacity(0.3), radius: 5, x: 0, y: 2) } } private struct ListView: View { @Binding var courses: [CourseShortInfo] @Binding var isRefreshing: Bool @Environment(\.refresh) private var refreshAction @ViewBuilder var refreshToolbar: some View { if let doRefresh = refreshAction { if isRefreshing { ProgressView() } else { Button(action: { Task{ await doRefresh() } }) { Image(systemName: "arrow.clockwise") } } } } var body: some View { VStack { ScrollView(.vertical) { LazyVStack(spacing: 20){ ForEach(courses) { item in CourseCardView(courseName: item.shortname!, courseCategory: item.coursecategory!, progress: item.progress!) .listRowSeparator(.hidden) } } } .toolbar { refreshToolbar } } } } struct CourseListView: View { @State private var courseList = GlobalVariables.shared.courseList @State var isRefreshing: Bool = false @State var searchText: String = "" func testRefresh() async { Task { isRefreshing = true Thread.sleep(forTimeInterval: 1.5) withAnimation { isRefreshing = false } } } var body: some View { NavigationView { VStack { ListView(courses: $courseList, isRefreshing: $isRefreshing) .refreshable { print("refresh") await testRefresh() } } .searchable(text: $searchText, prompt: "Search the course") .navigationTitle("Course") .navigationBarTitleDisplayMode(.large) } } } struct CourseListView_Previews: PreviewProvider { static var previews: some View { CourseListView() } } The global variable code: import Foundation import SwiftUI class GlobalVariables { static let shared = GlobalVariables() @Published var isLogin = true @Published var courseList: [CourseShortInfo] = [ CourseShortInfo(id: 11201, shortname: "数据结构与C++程序设计", progress: 66, coursecategory: "自动化学院"), CourseShortInfo(id: 11202, shortname: "数值分析", progress: 20, coursecategory: "数学学院"), CourseShortInfo(id: 11203, shortname: "数据结构与C++程序设计", progress: 66, coursecategory: "自动化学院"), CourseShortInfo(id: 11204, shortname: "数值分析", progress: 20, coursecategory: "数学学院"), CourseShortInfo(id: 11205, shortname: "数据结构与C++程序设计", progress: 66, coursecategory: "自动化学院"), CourseShortInfo(id: 11206, shortname: "数值分析", progress: 20, coursecategory: "数学学院"), CourseShortInfo(id: 11207, shortname: "数据结构与C++程序设计", progress: 66, coursecategory: "自动化学院"), CourseShortInfo(id: 11208, shortname: "数值分析", progress: 20, coursecategory: "数学学院"), CourseShortInfo(id: 11209, shortname: "数据结构与C++程序设计", progress: 66, coursecategory: "自动化学院"), CourseShortInfo(id: 11210, shortname: "数值分析", progress: 20, coursecategory: "数学学院") ] var debugMode = true private init() { } }
1
0
994
Sep ’23
How to make the device supervised with Account-driven Device Enrollment
Hi, Apple Team I'm really excited by a new feature account-driven Device Enrollment, and I tried it soon. The movie says It's available on iOS, iPadOS, and macOS. And just like profile-based Device Enrollment for macOS, it results in the device being Supervised, giving you the highest level of management. And for MDMs, all it takes is a few changes to support it. however my device is still not supervised after the account-driven Device Enrollment flow completes. (My trial is noted in https://zenn.dev/yusukeiwaki/scraps/dacd131de1e966 sorry in Japanese) How can we make the device supervised with account-driven Device Enrollment? Thanks,
1
0
675
Aug ’23
Need a help
Hi there, I'm studying SwiftUI on my own, but unfortunately I'm still not able to write complex lines of code, or even code an app independently, which is very frustrating for me. I love coding, it's a way to express my creativity. I already have a lot of ideas, but I can't put them into practice because I feel like I don't have learned enough about this programming language. Can any of you suggest me some free courses or other resources that have also helped you in your first steps with coding?
2
0
736
Jul ’23
Desparate to learn Swift coding but there are no places to learn nearby
I would love to learn swift. I live in South Florida, and there doesn't seem to be any places to go to learn swift either in an in-person setting or online class that I can find to be using the latest software. All the online courses i have found are pre recorded and use outdated version of xcode and swift. I am also 43 and work full-time. I want to learn the language and how to build apps as a possible new marketable skill in the future. I can't afford a full blown college admission and I won't take a student loan. I am willing to pay up to a few thousand to get the proper education. Can anyone point me in the right direction. I have minimal exposure to coding. I have tinkered with arduino, and I have an electronics background. Right now i'm following along at https://learn.codewithchris.com/enrollments
1
0
672
Jun ’23