# Swift

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

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

**Page:** 13

---

## [Looking for a Cool PickerView library](https://forums.kodeco.com/t/looking-for-a-cool-pickerview-library/83160)

<div class="topic-metadata">

**Author:** [@arash72af](https://forums.kodeco.com/u/arash72af)\
**Replies:** 1\
**Last updated:** [October 15, 2019, 1:28am UTC](https://forums.kodeco.com/t/looking-for-a-cool-pickerview-library/83160 "2019-10-15T01:28:48Z")

</div>

Hi guys, hope you are doing well, I am looking for a cool UIPickerView which I didn’t find any cool thing on Cocoapods maybe I am using the wrong keyword, I wanna have some circles and when I select on Each of them show …

---

## [Errors in prepare() function tutorial Custom UICollectionViewLayout Tutorial With Parallax](https://forums.kodeco.com/t/errors-in-prepare-function-tutorial-custom-uicollectionviewlayout-tutorial-with-parallax/82072)

<div class="topic-metadata">

**Author:** [@anon83286624](https://forums.kodeco.com/u/anon83286624)\
**Replies:** 1\
**Last updated:** [October 14, 2019, 11:24pm UTC](https://forums.kodeco.com/t/errors-in-prepare-function-tutorial-custom-uicollectionviewlayout-tutorial-with-parallax/82072 "2019-10-14T23:24:22Z")

</div>

Hi guys, I think I have been encountering a bug in the collectionview tutorial below https://www.raywenderlich.com/527-custom-uicollectionviewlayout-tutorial-with-parallax I am running swift 10.1 and when I get to Ste…

---

## [Core data not being delete permanently through protocol function](https://forums.kodeco.com/t/core-data-not-being-delete-permanently-through-protocol-function/80684)

<div class="topic-metadata">

**Author:** [@timswift](https://forums.kodeco.com/u/timswift)\
**Replies:** 1\
**Last updated:** [October 14, 2019, 8:32pm UTC](https://forums.kodeco.com/t/core-data-not-being-delete-permanently-through-protocol-function/80684 "2019-10-14T20:32:44Z")

</div>

My code is trying to delete a element from a set via button. When the user presses the button the set is deleted from that page but if it is reloaded the code is still there. So it is not permanently deleted. All I am do…

---

## [New MacOS Project:AppKit or SwiftUI?](https://forums.kodeco.com/t/new-macos-project-appkit-or-swiftui/80624)

<div class="topic-metadata">

**Author:** [@rufy](https://forums.kodeco.com/u/rufy)\
**Replies:** 3\
**Last updated:** [October 6, 2019, 1:01pm UTC](https://forums.kodeco.com/t/new-macos-project-appkit-or-swiftui/80624 "2019-10-06T13:01:12Z")

</div>

Hi everybody, I have a new project for Mac to develop. this App is an IDE for web develop. Obviously, the start project has beginning features like CRUD about project, syntax highlighting, opening browser e visualizatio…

---

## [Get top 5 RGB color from camera feed](https://forums.kodeco.com/t/get-top-5-rgb-color-from-camera-feed/83206)

<div class="topic-metadata">

**Author:** [@eladshw](https://forums.kodeco.com/u/eladshw)\
**Replies:** 2\
**Last updated:** [October 2, 2019, 5:57pm UTC](https://forums.kodeco.com/t/get-top-5-rgb-color-from-camera-feed/83206 "2019-10-02T17:57:28Z")

</div>

Hi, I was given an assignment for a Job interview: Open the camera and get the top 5 RGB from the live camera feed(so If I move the iPhone those values should change) Without using any 3rd party libraries! Should I us…

---

## [How can I create a view of Image Albums](https://forums.kodeco.com/t/how-can-i-create-a-view-of-image-albums/82894)

<div class="topic-metadata">

**Author:** [@albertski](https://forums.kodeco.com/u/albertski)\
**Replies:** 1\
**Last updated:** [October 2, 2019, 4:37pm UTC](https://forums.kodeco.com/t/how-can-i-create-a-view-of-image-albums/82894 "2019-10-02T16:37:48Z")

</div>

I want to be able to have a user choose which photo library they want to use in my app. Can someone point me in the right direction to implement this.

---

## [Unable to open MS Word and PDF docs with SFSafariViewController in latest iOS 13.0](https://forums.kodeco.com/t/unable-to-open-ms-word-and-pdf-docs-with-sfsafariviewcontroller-in-latest-ios-13-0/83369)

<div class="topic-metadata">

**Author:** [@kkadapa](https://forums.kodeco.com/u/kkadapa)\
**Replies:** 1\
**Last updated:** [October 2, 2019, 4:25pm UTC](https://forums.kodeco.com/t/unable-to-open-ms-word-and-pdf-docs-with-sfsafariviewcontroller-in-latest-ios-13-0/83369 "2019-10-02T16:25:19Z")

</div>

We are trying to use SFSafariViewController to browse a Word document from our iOS Mobile app using Swift as it gives ReaderView and Font Increase/Decrease within the App. Everything works as expected on the Simulator wi…

---

## ["Download old version" of books](https://forums.kodeco.com/t/download-old-version-of-books/23162)

<div class="topic-metadata">

**Author:** [@imbatman](https://forums.kodeco.com/u/imbatman)\
**Replies:** 2\
**Last updated:** [October 1, 2019, 4:01pm UTC](https://forums.kodeco.com/t/download-old-version-of-books/23162 "2019-10-01T16:01:01Z")

</div>

I just purchased the Mega Swift Bundle. When I’m taken to the Loot page, a bunch of the PDFs say “Download Old Version”. What the??? Why isn’t the latest version available with today’s purchase? Thanks

---

## [How to use array of objects as NSCollectionview Datasource in Xcode MacOS](https://forums.kodeco.com/t/how-to-use-array-of-objects-as-nscollectionview-datasource-in-xcode-macos/82505)

<div class="topic-metadata">

**Author:** [@lordvandad](https://forums.kodeco.com/u/lordvandad)\
**Replies:** 2\
**Last updated:** [September 23, 2019, 2:08pm UTC](https://forums.kodeco.com/t/how-to-use-array-of-objects-as-nscollectionview-datasource-in-xcode-macos/82505 "2019-09-23T14:08:00Z")

</div>

Hiii. I’m new here and new to Swift and Xcode. After some codes, I have an array of image views with this code: \*\*var imageViews = \[NSImageView\]()\*\* and they are filled with images from a folder in my system. I want …

---

## [Confusion about Advanced Auto Layout / Adaptive Layout](https://forums.kodeco.com/t/confusion-about-advanced-auto-layout-adaptive-layout/73552)

<div class="topic-metadata">

**Author:** [@annemarie1185](https://forums.kodeco.com/u/annemarie1185)\
**Replies:** 3\
**Last updated:** [September 20, 2019, 12:23pm UTC](https://forums.kodeco.com/t/confusion-about-advanced-auto-layout-adaptive-layout/73552 "2019-09-20T12:23:30Z")

</div>

Hi My app is a universal one using a storyboard. I’m trying to get my head around the (overly) complicated Auto-Layout and Adaptive Layout, with specific regards to this problem: The app uses a Tab Bar for major navig…

---

## [How to get the time when button pressed?](https://forums.kodeco.com/t/how-to-get-the-time-when-button-pressed/81619)

<div class="topic-metadata">

**Author:** [@refika](https://forums.kodeco.com/u/refika)\
**Replies:** 3\
**Last updated:** [September 20, 2019, 11:58am UTC](https://forums.kodeco.com/t/how-to-get-the-time-when-button-pressed/81619 "2019-09-20T11:58:50Z")

</div>

I am making a calculation app. I get the results to tableview as array and save them in a viewcontroller. But i couldn’t figure out how to get the time when user make a calculation (button pressed). Can you refer me some…

---

## [Passing data between VC](https://forums.kodeco.com/t/passing-data-between-vc/79649)

<div class="topic-metadata">

**Author:** [@refika](https://forums.kodeco.com/u/refika)\
**Replies:** 3\
**Last updated:** [September 12, 2019, 9:08pm UTC](https://forums.kodeco.com/t/passing-data-between-vc/79649 "2019-09-12T21:08:44Z")

</div>

I couldn’t find any documentation about passing data betweetn view controllers. Can you guys share the link? Search engine didn’t help me.

---

## [Delete coredata from a collection view cell using a protocol](https://forums.kodeco.com/t/delete-coredata-from-a-collection-view-cell-using-a-protocol/80021)

<div class="topic-metadata">

**Author:** [@timswift](https://forums.kodeco.com/u/timswift)\
**Replies:** 2\
**Last updated:** [September 8, 2019, 4:39am UTC](https://forums.kodeco.com/t/delete-coredata-from-a-collection-view-cell-using-a-protocol/80021 "2019-09-08T04:39:46Z")

</div>

My code below deletes a string from the index via delete button. However it is not delete from the core data set. If view is refreshed all items in the set are still there. All I want is when the user hits the delete fun…

---

## [Use of unresolved identifier ‘performSegue’ in Tableviewcell](https://forums.kodeco.com/t/use-of-unresolved-identifier-performsegue-in-tableviewcell/78332)

<div class="topic-metadata">

**Author:** [@csayin](https://forums.kodeco.com/u/csayin)\
**Replies:** 2\
**Last updated:** [September 7, 2019, 9:49am UTC](https://forums.kodeco.com/t/use-of-unresolved-identifier-performsegue-in-tableviewcell/78332 "2019-09-07T09:49:15Z")

</div>

Hi, I have table view in main table view. i want go details view when click sub tableview’s cell and put didSelectRowAt function and i prepare “goDetail segue”. However when i wrote that codes; func tableView(\_ tableV…

---

## [UILabel draw vs. UILabel drawText](https://forums.kodeco.com/t/uilabel-draw-vs-uilabel-drawtext/77950)

<div class="topic-metadata">

**Author:** [@rufy](https://forums.kodeco.com/u/rufy)\
**Replies:** 2\
**Last updated:** [September 7, 2019, 9:47am UTC](https://forums.kodeco.com/t/uilabel-draw-vs-uilabel-drawtext/77950 "2019-09-07T09:47:32Z")

</div>

Which is the different between these two methods? how I use them? I’m creating a NSAtributedString that use RubyAnnotation, in which method I’ve to draw the attributed string? and how?

---

## [New tutorial for sdk chatto](https://forums.kodeco.com/t/new-tutorial-for-sdk-chatto/80519)

<div class="topic-metadata">

**Author:** [@xakacuk](https://forums.kodeco.com/u/xakacuk)\
**Replies:** 1\
**Last updated:** [September 6, 2019, 6:17am UTC](https://forums.kodeco.com/t/new-tutorial-for-sdk-chatto/80519 "2019-09-06T06:17:43Z")

</div>

hello, I think that the guys from the Badoo team made a good chat chatto to create a chat, I would like to see a tutorial on how to create a chat from your team using this SDK, where it will also have full chat functiona…

---

## [Table view in swift](https://forums.kodeco.com/t/table-view-in-swift/79978)

<div class="topic-metadata">

**Author:** [@akash\_sht](https://forums.kodeco.com/u/akash_sht)\
**Replies:** 3\
**Last updated:** [August 25, 2019, 7:04pm UTC](https://forums.kodeco.com/t/table-view-in-swift/79978 "2019-08-25T19:04:01Z")

</div>

Hi I’m new to the iOS development world. I’m trying to work in table view but I’m getting this error. Help me.! 24%20PM|341x500

---

## [How do I refresh a tableview?](https://forums.kodeco.com/t/how-do-i-refresh-a-tableview/79336)

<div class="topic-metadata">

**Author:** [@rockyto](https://forums.kodeco.com/u/rockyto)\
**Replies:** 10\
**Last updated:** [August 22, 2019, 9:59pm UTC](https://forums.kodeco.com/t/how-do-i-refresh-a-tableview/79336 "2019-08-22T21:59:36Z")

</div>

I dare to write here to see if you can help me with a detail that I have when making a query and download an arrangement that can have changes, in short, when making a new record I would like A new query is made to my AP…

---

## [Runtime error when saving user generated image to core data (Swift5)](https://forums.kodeco.com/t/runtime-error-when-saving-user-generated-image-to-core-data-swift5/75398)

<div class="topic-metadata">

**Author:** [@timswift](https://forums.kodeco.com/u/timswift)\
**Replies:** 1\
**Last updated:** [August 22, 2019, 6:18pm UTC](https://forums.kodeco.com/t/runtime-error-when-saving-user-generated-image-to-core-data-swift5/75398 "2019-08-22T18:18:49Z")

</div>

I am trying to save a user generated image to core data. If I program the image the code works fine. But when the user selects the image I am getting the error Thread 1: Fatal error: Unexpectedly found nil while unwrapp…

---

## [Vision - convert UIImage to pure Black&White and detect DataMatrix](https://forums.kodeco.com/t/vision-convert-uiimage-to-pure-black-white-and-detect-datamatrix/76530)

<div class="topic-metadata">

**Author:** [@mact](https://forums.kodeco.com/u/mact)\
**Replies:** 1\
**Last updated:** [August 22, 2019, 3:00am UTC](https://forums.kodeco.com/t/vision-convert-uiimage-to-pure-black-white-and-detect-datamatrix/76530 "2019-08-22T03:00:55Z")

</div>

I really need help. I’m creating a DataMatrix reader, and part of codes are with white background only and causes any problem with AVFoundation, but another part has grey with shimmer background (see image below), and th…

---

## [Save Drawing to Gallery in Swift 5](https://forums.kodeco.com/t/save-drawing-to-gallery-in-swift-5/75998)

<div class="topic-metadata">

**Author:** [@timswift](https://forums.kodeco.com/u/timswift)\
**Replies:** 1\
**Last updated:** [August 22, 2019, 1:29am UTC](https://forums.kodeco.com/t/save-drawing-to-gallery-in-swift-5/75998 "2019-08-22T01:29:10Z")

</div>

I am trying to save a drawing to my photo gallery but it’s not saving. Here is the code I am using to draw over UIImageView . Save right func saves the photo. var nextPage = UIButton() var clear…

---

## [How to save layered uiimageview to core data (SWIFT5)](https://forums.kodeco.com/t/how-to-save-layered-uiimageview-to-core-data-swift5/75740)

<div class="topic-metadata">

**Author:** [@timswift](https://forums.kodeco.com/u/timswift)\
**Replies:** 1\
**Last updated:** [August 21, 2019, 11:40pm UTC](https://forums.kodeco.com/t/how-to-save-layered-uiimageview-to-core-data-swift5/75740 "2019-08-21T23:40:27Z")

</div>

I am trying to save a drawing on top of a uiview with a image printed above it it. So UIVIEW \> IMAGE \> DRAWING. What is currently saving is nothing. It is just a blank white uiview. I want to save the layered image. func…

---

## [SwiftUI - Application data / logic architecture](https://forums.kodeco.com/t/swiftui-application-data-logic-architecture/79075)

<div class="topic-metadata">

**Author:** [@hendore](https://forums.kodeco.com/u/hendore)\
**Replies:** 1\
**Last updated:** [August 18, 2019, 11:48pm UTC](https://forums.kodeco.com/t/swiftui-application-data-logic-architecture/79075 "2019-08-18T23:48:56Z")

</div>

I’m fairly new to native development (excluding react-native) and I’ve been playing around with SwiftUI which I’m finding much better than my experience the traditional imperative approach of building apple applications …

---

## [How do I read the tag #](https://forums.kodeco.com/t/how-do-i-read-the-tag/77993)

<div class="topic-metadata">

**Author:** [@hcri1950](https://forums.kodeco.com/u/hcri1950)\
**Replies:** 2\
**Last updated:** [August 17, 2019, 5:20pm UTC](https://forums.kodeco.com/t/how-do-i-read-the-tag/77993 "2019-08-17T17:20:42Z")

</div>

No problem in displaying the Text, but how can I read the tag# with the print statement or the good old NSLog. format. In the old way, I had no problem in capturing the tag # Thank you ahead of time for a reply. struct…

---

## [2D Graphics programming under SWIFT](https://forums.kodeco.com/t/2d-graphics-programming-under-swift/79150)

<div class="topic-metadata">

**Author:** [@mmim](https://forums.kodeco.com/u/mmim)\
**Replies:** 3\
**Last updated:** [August 16, 2019, 8:43pm UTC](https://forums.kodeco.com/t/2d-graphics-programming-under-swift/79150 "2019-08-16T20:43:27Z")

</div>

I wankt to write an app to display 2D graphics out of a file I have. What technique is better here ? Core graphics or metal ?

---

## [Function not saving string on textfield to core data](https://forums.kodeco.com/t/function-not-saving-string-on-textfield-to-core-data/78400)

<div class="topic-metadata">

**Author:** [@timswift](https://forums.kodeco.com/u/timswift)\
**Replies:** 14\
**Last updated:** [August 11, 2019, 7:49am UTC](https://forums.kodeco.com/t/function-not-saving-string-on-textfield-to-core-data/78400 "2019-08-11T07:49:39Z")

</div>

My function below when called is not saving whatever is on the textfield to core data. When appearing in the debug area what appears is “”. This code when used in the view did load function it does work but when I call i…

---

## [SwiftUI View require body and some keyword question](https://forums.kodeco.com/t/swiftui-view-require-body-and-some-keyword-question/78021)

<div class="topic-metadata">

**Author:** [@maomao](https://forums.kodeco.com/u/maomao)\
**Replies:** 7\
**Last updated:** [August 9, 2019, 6:51am UTC](https://forums.kodeco.com/t/swiftui-view-require-body-and-some-keyword-question/78021 "2019-08-09T06:51:28Z")

</div>

I have a question about some keyword and body When you create a struct and you have to add them in the struct. Does anyone know why we have to and what does some keyword mean? Thanks

---

## [What is the benefit of using file handle to write data to stdout?](https://forums.kodeco.com/t/what-is-the-benefit-of-using-file-handle-to-write-data-to-stdout/78474)

<div class="topic-metadata">

**Author:** [@ryanlee](https://forums.kodeco.com/u/ryanlee)\
**Replies:** 1\
**Last updated:** [August 8, 2019, 1:05am UTC](https://forums.kodeco.com/t/what-is-the-benefit-of-using-file-handle-to-write-data-to-stdout/78474 "2019-08-08T01:05:07Z")

</div>

I just curious about the swift code template: e.g. Birthday Cake Candles | HackerRank import Foundation // Complete the birthdayCakeCandles function below. func birthdayCakeCandles(ar: \[Int\]) -\> Int { } let stdout =…

---

## [Newbie in swift: Problem in Mac OS to read from files with mixed multiple types](https://forums.kodeco.com/t/newbie-in-swift-problem-in-mac-os-to-read-from-files-with-mixed-multiple-types/78420)

<div class="topic-metadata">

**Author:** [@mmim](https://forums.kodeco.com/u/mmim)\
**Replies:** 1\
**Last updated:** [August 7, 2019, 12:27pm UTC](https://forums.kodeco.com/t/newbie-in-swift-problem-in-mac-os-to-read-from-files-with-mixed-multiple-types/78420 "2019-08-07T12:27:36Z")

</div>

I am trying to read from a file in swift with mixed data type. As an example: 80 eight bit coded characters, no line feed Another 60 eight bit coded characters, no line feed 1024 eight bit, unsigned numbers Another 160…

---

## [Vertical alignment](https://forums.kodeco.com/t/vertical-alignment/77531)

<div class="topic-metadata">

**Author:** [@rufy](https://forums.kodeco.com/u/rufy)\
**Replies:** 2\
**Last updated:** [August 1, 2019, 12:50pm UTC](https://forums.kodeco.com/t/vertical-alignment/77531 "2019-08-01T12:50:15Z")

</div>

Hi everybody, to show in my app Japanese Text with phonetic text I’ve found this tutorial. in the bottom of the page there is the example project as well. the problem is this code show the text on the top of the label…

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

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