Swift

369 readers
5 users here now

This group focus on the content related to the development of Apple Eco-system software. So feel free to share and talk about, for example;

founded 2 years ago
MODERATORS
51
52
4
SwiftUI Sensory Feedback (useyourloaf.com)
submitted 1 year ago by balder1993 to c/swift
 
 

In iOS 17, Apple added a range of sensory feedback view modifiers to SwiftUI removing the need to rely on UIKit.

53
 
 

#Predicate is a new Macro available since Swift 5.9 and Xcode 15, allowing you to filter or search a data collection. It can be seen as a replacement for the old-fashioned NSPredicate we’re used to from the Objective-C days.

54
3
submitted 1 year ago by balder1993 to c/swift
 
 

An overview of the different types of charts you can make with Swift Charts

55
4
submitted 1 year ago by balder1993 to c/swift
 
 

Get ready to dive deep into the inner workings of the Objective-C language and runtime! Each post delves into a specific aspect of the language and explores the details of its implementation. I hope you’ll find this valuable to demystify the language, tackle tricky bugs, and optimize your code for performance.

56
 
 

Hi,

I thought we could make a list of open source Swift projects that's open to public contribution. Which is one of the most effective ways to really learn programming.

We could follow this template to make it easy for readers:

Title in Bold

Short Description:

Link:

57
58
 
 

We’re excited to announce a new open source package called Swift HTTP Types.

Building upon insights from Swift on server, app developers, and the broader Swift community, Swift HTTP Types is designed to provide a shared set of currency types for client/server HTTP operations in Swift....

59
 
 

So I've got the following code, which seems to work, and I'm wondering if there is a better, cleaner way to approach adding/editing elements in an array.

var category: Category
var idx: Int = -1

switch mode {
case .add:
    category = Category()
case .edit(let _category):
    category = _category
    idx = categoryViewModel.categories.firstIndex(of: _category) ?? idx
}

category.name = categoryName
category.icon = "category-\(categoryIdx)"
category.color = colors[colorIdx]

switch mode {
case .add:
    categoryViewModel.categories.append(category)
case .edit:
    categoryViewModel.categories[idx] = category
}

I understand I'm not checking idx to make sure it's not -1. I'm not concerned about that part right now. It's the overall approach I'm looking for thoughts on.

Thanks!

60
61
3
WWDC 2023: What's New in Core Data (betterprogramming.pub)
submitted 2 years ago by balder1993 to c/swift
 
 

Although at WWDC 2023, Apple will mainly focus on introducing the new data framework SwiftData, Core Data, as the cornerstone of SwiftData, has also been enhanced to some extent.

62
 
 

MainActor is a new attribute introduced in Swift 5.5 as a global actor providing an executor which performs its tasks on the main thread. When building apps, it’s essential to perform UI updating tasks on the main thread, which can sometimes be challenging when using several background threads. Using the @MainActor attribute will help ensure your UI is always updated on the main thread.

63
5
iOS Dev Weekly - Issue 616 (iosdevweekly.com)
submitted 2 years ago by balder1993 to c/swift
64
65
66
4
iOS 17: Notable UIKit Additions (www.swiftjectivec.com)
submitted 2 years ago by balder1993 to c/swift
67
68
69
3
submitted 2 years ago by balder1993 to c/swift
70
3
submitted 2 years ago* (last edited 2 years ago) by Mustafaalbazy to c/swift
 
 

I have used a few SSG framework such as Next and Hugo, and my personal blog is built by Hugo which is based on GO programming language.

IME i've noticed the majority of SSG are based on Javascript and Typescript for some reason.

Never thought of Swift as an SSG, but it sounds interesting for me to play with and built a blog or something, and maybe even migrate my current blog to a swift-based SSG if they are as good as, say, Hugo.

Do you guys have any experience with Swift-SSG?

Edit: typos

71
72
73
74
 
 

Hi all,

Lets use this post to make a list of all free online courses and books that teach Swift programming.

Please post using the following template, to make easy for us to follow.

  • Title:
  • Author:
  • Description:
  • Link: