# Swift

**URL:** https://forums.kodeco.com/c/general/swift/15.md?page=10

[Latest](https://forums.kodeco.com/latest.md) · [Categories](https://forums.kodeco.com/categories.md) · [Tags](https://forums.kodeco.com/tags.md)

**Page:** 11

---

## [SwiftUI - data flow theory](https://forums.kodeco.com/t/swiftui-data-flow-theory/98042)

<div class="topic-metadata">

**Author:** [@trungngo](https://forums.kodeco.com/u/trungngo)\
**Replies:** 1\
**Last updated:** [March 15, 2020, 7:04am UTC](https://forums.kodeco.com/t/swiftui-data-flow-theory/98042 "2020-03-15T07:04:41Z")

</div>

When learning from WWDC Data Flow Through SwiftUI - WWDC19 - Videos - Apple Developer , I see this sentence but don’t really get it: View are a function of State, not a sequence of event. Is there anyone else can help…

---

## [Take random selfie while user is watching video using an app](https://forums.kodeco.com/t/take-random-selfie-while-user-is-watching-video-using-an-app/101380)

<div class="topic-metadata">

**Author:** [@dpktk](https://forums.kodeco.com/u/dpktk)\
**Replies:** 1\
**Last updated:** [March 15, 2020, 6:32am UTC](https://forums.kodeco.com/t/take-random-selfie-while-user-is-watching-video-using-an-app/101380 "2020-03-15T06:32:08Z")

</div>

Hi, We are developing an iOS e-learning app that enables users to pay and watch a series of videos hosted online. The client would like the app to take photos of the user using the device front camera, at random interv…

---

## [How much RAM FOR XCODE](https://forums.kodeco.com/t/how-much-ram-for-xcode/101423)

<div class="topic-metadata">

**Author:** [@cannabiolog420](https://forums.kodeco.com/u/cannabiolog420)\
**Replies:** 1\
**Last updated:** [March 15, 2020, 6:04am UTC](https://forums.kodeco.com/t/how-much-ram-for-xcode/101423 "2020-03-15T06:04:24Z")

</div>

Hi everyone I cant afford 16gb ram so Is 8 GB ram enough?if it is how long it ll be?

---

## [How to change C-style for loop to Swift](https://forums.kodeco.com/t/how-to-change-c-style-for-loop-to-swift/100180)

<div class="topic-metadata">

**Author:** [@game\_gecko](https://forums.kodeco.com/u/game_gecko)\
**Replies:** 4\
**Last updated:** [March 6, 2020, 10:35pm UTC](https://forums.kodeco.com/t/how-to-change-c-style-for-loop-to-swift/100180 "2020-03-06T22:35:36Z")

</div>

I am looking at a video tutorial on another site that is using and older version of Swift. I get the error message “C-style for statement has been removed in Swift 3” . Is there an app to convert C for statements, or can…

---

## [Preview layer not being constrained to uiview](https://forums.kodeco.com/t/preview-layer-not-being-constrained-to-uiview/97164)

<div class="topic-metadata">

**Author:** [@timswift](https://forums.kodeco.com/u/timswift)\
**Replies:** 1\
**Last updated:** [February 26, 2020, 5:28am UTC](https://forums.kodeco.com/t/preview-layer-not-being-constrained-to-uiview/97164 "2020-02-26T05:28:01Z")

</div>

My Swift code below is trying to constrain the previewLayer to the bounds of the UIView which is named camera view. However that is not happening. The previewLayer is much bigger than the constraint cameraView UIView. Th…

---

## [Swift Key Paths](https://forums.kodeco.com/t/swift-key-paths/99043)

<div class="topic-metadata">

**Author:** [@lducot2](https://forums.kodeco.com/u/lducot2)\
**Replies:** 1\
**Last updated:** [February 25, 2020, 4:02pm UTC](https://forums.kodeco.com/t/swift-key-paths/99043 "2020-02-25T16:02:05Z")

</div>

Hello. I was wondering if someone could point me to an example of a good use case for Swift’s key path syntax. I see them more often now in SwiftUI and Combine, but typically, you also need to provide an object with the …

---

## [How can I copy this feature?](https://forums.kodeco.com/t/how-can-i-copy-this-feature/93647)

<div class="topic-metadata">

**Author:** [@cranimax](https://forums.kodeco.com/u/cranimax)\
**Replies:** 2\
**Last updated:** [February 24, 2020, 3:32pm UTC](https://forums.kodeco.com/t/how-can-i-copy-this-feature/93647 "2020-02-24T15:32:53Z")

</div>

I already asked this over on stackoverflow weeks ago. I like to implement this resizable circle in my app. Any Idea how to do that? thx

---

## [Feeling overwhelmed by Advanced iOS App Architecture](https://forums.kodeco.com/t/feeling-overwhelmed-by-advanced-ios-app-architecture/96735)

<div class="topic-metadata">

**Author:** [@happiehappie](https://forums.kodeco.com/u/happiehappie)\
**Replies:** 6\
**Last updated:** [February 17, 2020, 7:58am UTC](https://forums.kodeco.com/t/feeling-overwhelmed-by-advanced-ios-app-architecture/96735 "2020-02-17T07:58:04Z")

</div>

Hi guys, Not sure if this is the right place to ask this, but I have approximately 2-3 years of experience writing Swift and I am very keen to level up. I picked up the Advanced iOS App Architecture book but I feel over…

---

## [iOS Crash Logs functions](https://forums.kodeco.com/t/ios-crash-logs-functions/29146)

<div class="topic-metadata">

**Author:** [@jonny](https://forums.kodeco.com/u/jonny)\
**Replies:** 3\
**Last updated:** [February 14, 2020, 7:50am UTC](https://forums.kodeco.com/t/ios-crash-logs-functions/29146 "2020-02-14T07:50:47Z")

</div>

Hi I’m following the this tutorial to try and debug my app on my local device. I can’t seem to work out where the problem is. I have sync’d my device and am viewing it through XCode, so I expected to see the functions w…

---

## [SwiftUI Something wrong with button and canvas](https://forums.kodeco.com/t/swiftui-something-wrong-with-button-and-canvas/86256)

<div class="topic-metadata">

**Author:** [@sunwalker](https://forums.kodeco.com/u/sunwalker)\
**Replies:** 10\
**Last updated:** [February 9, 2020, 9:41am UTC](https://forums.kodeco.com/t/swiftui-something-wrong-with-button-and-canvas/86256 "2020-02-09T09:41:39Z")

</div>

Hello there. I don’t know what am I doing wrong, but after I selected the background image for my buttons, they don’t look like the image and I could not find out why. Anyone can help me please? Another thing. I also …

---

## [Getting a thread 1 exc bad instruction error when saving image litteral to core data swift](https://forums.kodeco.com/t/getting-a-thread-1-exc-bad-instruction-error-when-saving-image-litteral-to-core-data-swift/95666)

<div class="topic-metadata">

**Author:** [@timswift](https://forums.kodeco.com/u/timswift)\
**Replies:** 1\
**Last updated:** [February 5, 2020, 3:50pm UTC](https://forums.kodeco.com/t/getting-a-thread-1-exc-bad-instruction-error-when-saving-image-litteral-to-core-data-swift/95666 "2020-02-05T15:50:44Z")

</div>

My swift code below is trying to save 2 image litterals to a core data attribut named pic. I am getting a error at newUser.pic = #imageLiteral(resourceName: “Jessica”).jpegData(compressionQuality: 0.9) as NSObject? STATI…

---

## [Help with an issue relating to callbacks and @escaping?](https://forums.kodeco.com/t/help-with-an-issue-relating-to-callbacks-and-escaping/85606)

<div class="topic-metadata">

**Author:** [@ncrusher](https://forums.kodeco.com/u/ncrusher)\
**Replies:** 3\
**Last updated:** [February 1, 2020, 10:09am UTC](https://forums.kodeco.com/t/help-with-an-issue-relating-to-callbacks-and-escaping/85606 "2020-02-01T10:09:37Z")

</div>

I’m pretty much a beginner and I’ve gotten a little out of my depth. At this point I’ve learned the fundamentals and the only way to keep learning is just to start creating apps and tackle any new knowledge I need as I r…

---

## [How to get a avfoundation uiview to save a video on a imagevewivew](https://forums.kodeco.com/t/how-to-get-a-avfoundation-uiview-to-save-a-video-on-a-imagevewivew/93200)

<div class="topic-metadata">

**Author:** [@timswift](https://forums.kodeco.com/u/timswift)\
**Replies:** 14\
**Last updated:** [February 1, 2020, 9:39am UTC](https://forums.kodeco.com/t/how-to-get-a-avfoundation-uiview-to-save-a-video-on-a-imagevewivew/93200 "2020-02-01T09:39:25Z")

</div>

My swift code below uses a avfoudnation uiview to take a photo and save it on the imageview. All I want to do is be able to take a video and save in then have be displayed on the imageview if possible. I am not concern w…

---

## [Moving between ViewControllers without a storyboard or NavController](https://forums.kodeco.com/t/moving-between-viewcontrollers-without-a-storyboard-or-navcontroller/95909)

<div class="topic-metadata">

**Author:** [@pdl5000](https://forums.kodeco.com/u/pdl5000)\
**Replies:** 9\
**Last updated:** [February 1, 2020, 9:38am UTC](https://forums.kodeco.com/t/moving-between-viewcontrollers-without-a-storyboard-or-navcontroller/95909 "2020-02-01T09:38:17Z")

</div>

Hi, There are many tutorials out there explaining how to program UI / Auto Layout without using a StoryBoard, which is great & I have learned a lot. But… How do you switch between two ViewControllers without using a m…

---

## [Brand new app SwiftUI or UIKit](https://forums.kodeco.com/t/brand-new-app-swiftui-or-uikit/89773)

<div class="topic-metadata">

**Author:** [@stevepsharpe](https://forums.kodeco.com/u/stevepsharpe)\
**Replies:** 5\
**Last updated:** [February 1, 2020, 3:26am UTC](https://forums.kodeco.com/t/brand-new-app-swiftui-or-uikit/89773 "2020-02-01T03:26:48Z")

</div>

Hey everyone. I’ve used Swift and UIKit in the past, but I haven’t touched iOS development in a good couple of years. I’m about to start a new project and I suspect it will take me 4-6 months part time whilst learning …

---

## [Containerview delegate](https://forums.kodeco.com/t/containerview-delegate/93989)

<div class="topic-metadata">

**Author:** [@neverfollowr](https://forums.kodeco.com/u/neverfollowr)\
**Replies:** 1\
**Last updated:** [January 14, 2020, 10:12am UTC](https://forums.kodeco.com/t/containerview-delegate/93989 "2020-01-14T10:12:58Z")

</div>

I have two view controllers in a container view. Since Im not instantiating a viewcontroller before pushing it via navigation/segue how would I set the delegate to self. A bit confused since there isnt a parent/child rel…

---

## [Leverage browser caching](https://forums.kodeco.com/t/leverage-browser-caching/88947)

<div class="topic-metadata">

**Author:** [@atulsen](https://forums.kodeco.com/u/atulsen)\
**Replies:** 2\
**Last updated:** [January 14, 2020, 9:55am UTC](https://forums.kodeco.com/t/leverage-browser-caching/88947 "2020-01-14T09:55:08Z")

</div>

Please check this problems and give me best suggestions regarding website. I already try this: ExpiresActive On Images ExpiresByType image/jpeg “access plus 1 year” ExpiresByType image/gif “access plus 1 year” Exp…

---

## [How to make struct available in different objects?](https://forums.kodeco.com/t/how-to-make-struct-available-in-different-objects/93485)

<div class="topic-metadata">

**Author:** [@observerward](https://forums.kodeco.com/u/observerward)\
**Replies:** 5\
**Last updated:** [January 14, 2020, 9:48am UTC](https://forums.kodeco.com/t/how-to-make-struct-available-in-different-objects/93485 "2020-01-14T09:48:36Z")

</div>

I want to use same struct in two different objects and provide it between them.

---

## [Recall an ObservedObject so that I can view my Array?](https://forums.kodeco.com/t/recall-an-observedobject-so-that-i-can-view-my-array/92237)

<div class="topic-metadata">

**Author:** [@hcri1950](https://forums.kodeco.com/u/hcri1950)\
**Replies:** 2\
**Last updated:** [January 14, 2020, 9:37am UTC](https://forums.kodeco.com/t/recall-an-observedobject-so-that-i-can-view-my-array/92237 "2020-01-14T09:37:23Z")

</div>

0 I am able to to populate my SwiftUi with this code in the ContentView with no problems. What I am trying to do is to recall my Array in a ForEach loop as a Function Call Can someone tell me on how I can recall my @…

---

## [UICollectionView](https://forums.kodeco.com/t/uicollectionview/91678)

<div class="topic-metadata">

**Author:** [@gene8189](https://forums.kodeco.com/u/gene8189)\
**Replies:** 1\
**Last updated:** [January 14, 2020, 12:09am UTC](https://forums.kodeco.com/t/uicollectionview/91678 "2020-01-14T00:09:32Z")

</div>

Hi guys. I\`m a beginner to swift and looking for some guidance on creating UICollectionView. I had followed the instructions from https://www.raywenderlich.com/9334-uicollectionview-tutorial-getting-started#toc-anchor-00…

---

## [Unable to create a connection in SQLite with Swift course](https://forums.kodeco.com/t/unable-to-create-a-connection-in-sqlite-with-swift-course/84975)

<div class="topic-metadata">

**Author:** [@patleo](https://forums.kodeco.com/u/patleo)\
**Replies:** 3\
**Last updated:** [January 13, 2020, 7:56pm UTC](https://forums.kodeco.com/t/unable-to-create-a-connection-in-sqlite-with-swift-course/84975 "2020-01-13T19:56:28Z")

</div>

Hi there! I’m having problem on creating a connection on this course. I dont really know why it cannot create a connection. I have create the directory they have specified on the Get Start section but it still does not …

---

## [\[VAPOR\] FluentMySQL Querying and Saving to DB](https://forums.kodeco.com/t/vapor-fluentmysql-querying-and-saving-to-db/89576)

<div class="topic-metadata">

**Author:** [@lganti](https://forums.kodeco.com/u/lganti)\
**Replies:** 5\
**Last updated:** [January 13, 2020, 6:06am UTC](https://forums.kodeco.com/t/vapor-fluentmysql-querying-and-saving-to-db/89576 "2020-01-13T06:06:30Z")

</div>

This is a question regarding HOW/WHERE This is what I am trying to accomplish: Interact with Google Sheets API, fetch the columns and parse as per my needs and provide endpoints so that both Android and iOS clients can…

---

## [Is there any major difference b/w 1st edition & 3rd edition Datastructures & Algorithms in Swift?](https://forums.kodeco.com/t/is-there-any-major-difference-b-w-1st-edition-3rd-edition-datastructures-algorithms-in-swift/87908)

<div class="topic-metadata">

**Author:** [@chethu](https://forums.kodeco.com/u/chethu)\
**Replies:** 2\
**Last updated:** [January 12, 2020, 6:15am UTC](https://forums.kodeco.com/t/is-there-any-major-difference-b-w-1st-edition-3rd-edition-datastructures-algorithms-in-swift/87908 "2020-01-12T06:15:40Z")

</div>

Hello, Venerated Swift Developers, I am having Interviews in the next few weeks for ios developer’s job. I had purchased the 1st edition of Raywenderlich Data Structure & Algorithms in Swift language previously to prep…

---

## [So Sad On The Lack Of Responses](https://forums.kodeco.com/t/so-sad-on-the-lack-of-responses/92591)

<div class="topic-metadata">

**Author:** [@hcri1950](https://forums.kodeco.com/u/hcri1950)\
**Replies:** 9\
**Last updated:** [January 1, 2020, 5:11am UTC](https://forums.kodeco.com/t/so-sad-on-the-lack-of-responses/92591 "2020-01-01T05:11:50Z")

</div>

This used to be the best place to seek help from the community and always willing to help when it was before Swift came out. But now Raywenderlich has grown and the community has gone. And who ever is left as Guardians p…

---

## [What is the best way to display the latest 10 images from an album?](https://forums.kodeco.com/t/what-is-the-best-way-to-display-the-latest-10-images-from-an-album/91655)

<div class="topic-metadata">

**Author:** [@albertski](https://forums.kodeco.com/u/albertski)\
**Replies:** 2\
**Last updated:** [January 1, 2020, 3:31pm UTC](https://forums.kodeco.com/t/what-is-the-best-way-to-display-the-latest-10-images-from-an-album/91655 "2020-01-01T15:31:16Z")

</div>

This is what I am doing. A user chooses what album they want to use and the number of images they want to use from the album. For example 15 images. When a user navigates to a certain controller view it will display the …

---

## [Simple API call and printing JSON](https://forums.kodeco.com/t/simple-api-call-and-printing-json/91807)

<div class="topic-metadata">

**Author:** [@taoscowboy](https://forums.kodeco.com/u/taoscowboy)\
**Replies:** 5\
**Last updated:** [January 1, 2020, 6:40am UTC](https://forums.kodeco.com/t/simple-api-call-and-printing-json/91807 "2020-01-01T06:40:31Z")

</div>

I have been trying to learn xcode and swift by example.I have tried tons of examples I searched for, all of which fail in one way or another…usually wrong swift version or syntax. I want to make a very simple app that ma…

---

## [I want to learn swift well but my English is not good](https://forums.kodeco.com/t/i-want-to-learn-swift-well-but-my-english-is-not-good/91225)

<div class="topic-metadata">

**Author:** [@f\_front](https://forums.kodeco.com/u/f_front)\
**Replies:** 2\
**Last updated:** [January 1, 2020, 6:34am UTC](https://forums.kodeco.com/t/i-want-to-learn-swift-well-but-my-english-is-not-good/91225 "2020-01-01T06:34:19Z")

</div>

I want to learn swift well but my English is not good. What should I do?

---

## [Where to learn how to add a SQL database to apps in Swift 5.1?](https://forums.kodeco.com/t/where-to-learn-how-to-add-a-sql-database-to-apps-in-swift-5-1/89005)

<div class="topic-metadata">

**Author:** [@jamesh](https://forums.kodeco.com/u/jamesh)\
**Replies:** 1\
**Last updated:** [January 1, 2020, 6:27am UTC](https://forums.kodeco.com/t/where-to-learn-how-to-add-a-sql-database-to-apps-in-swift-5-1/89005 "2020-01-01T06:27:18Z")

</div>

So, I’m a beginner and want to learn how to add a relatively small database to my Swift/iOS app. I found the RW site because there is a class called " SQLite With Swift Tutorial: Getting Started" - which looked exactly …

---

## [Swift, code tutorial Raywenderlich](https://forums.kodeco.com/t/swift-code-tutorial-raywenderlich/92015)

<div class="topic-metadata">

**Author:** [@simpleroger](https://forums.kodeco.com/u/simpleroger)\
**Replies:** 2\
**Last updated:** [January 1, 2020, 6:16am UTC](https://forums.kodeco.com/t/swift-code-tutorial-raywenderlich/92015 "2020-01-01T06:16:42Z")

</div>

struct LabelStyle: ViewModifier { func body(content: Content) → some View{ return content .foregroundColor(Color.white) .shadow(color: Color.black, radius: 5, x:2,y:2) .font(Font.custom(“Arial Rounded MT Bold”, size…

---

## [Create similar Game like "Heads up!"](https://forums.kodeco.com/t/create-similar-game-like-heads-up/91571)

<div class="topic-metadata">

**Author:** [@olaf\_sch](https://forums.kodeco.com/u/olaf_sch)\
**Replies:** 3\
**Last updated:** [December 23, 2019, 1:41pm UTC](https://forums.kodeco.com/t/create-similar-game-like-heads-up/91571 "2019-12-23T13:41:42Z")

</div>

Hello, I plann to have a personal, simple app which would allow me to have funny game sessions. It would not be necessary to have user accounts, high score etc. management. All i am looking for are related projects wh…

[Previous page](https://forums.kodeco.com/c/general/swift/15.md?page=9)

[Next page](https://forums.kodeco.com/c/general/swift/15.md?page=11)
