# Swift

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

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

**Page:** 33

---

## [Xcode 8 / Swift 3: “Expression of type UIViewController? is unused” warning when pop](https://forums.kodeco.com/t/xcode-8-swift-3-expression-of-type-uiviewcontroller-is-unused-warning-when-pop/20751)

<div class="topic-metadata">

**Author:** [@vimipatel](https://forums.kodeco.com/u/vimipatel)\
**Replies:** 1\
**Last updated:** [October 5, 2016, 11:53am UTC](https://forums.kodeco.com/t/xcode-8-swift-3-expression-of-type-uiviewcontroller-is-unused-warning-when-pop/20751 "2016-10-05T11:53:50Z")

</div>

Poping view controller from navigation stack does not returns anything. Then also when I have to tried pop view controller, then it gives me warning like : It is working fine in swift 2.x, So my question is how to po…

---

## [How to get the image picker in (swift 3) to switch back and 4th between photo gallery and camera](https://forums.kodeco.com/t/how-to-get-the-image-picker-in-swift-3-to-switch-back-and-4th-between-photo-gallery-and-camera/20663)

<div class="topic-metadata">

**Author:** [@zalubski](https://forums.kodeco.com/u/zalubski)\
**Replies:** 0\
**Last updated:** [October 3, 2016, 2:11pm UTC](https://forums.kodeco.com/t/how-to-get-the-image-picker-in-swift-3-to-switch-back-and-4th-between-photo-gallery-and-camera/20663 "2016-10-03T14:11:48Z")

</div>

This code allows access to my photo gallery on the iPhone simulator in Xcode. When I put it on my iPad I can access the camera but not the photo gallery. I would like the image view to display the camera photos if choose…

---

## [How to create a custom in screen camera](https://forums.kodeco.com/t/how-to-create-a-custom-in-screen-camera/20317)

<div class="topic-metadata">

**Author:** [@zalubski](https://forums.kodeco.com/u/zalubski)\
**Replies:** 4\
**Last updated:** [October 3, 2016, 1:59am UTC](https://forums.kodeco.com/t/how-to-create-a-custom-in-screen-camera/20317 "2016-10-03T01:59:35Z")

</div>

I would like to create a camera view that takes a picture of the screen. Anything on the screen that is within its borders will be taken. This is not using the physical camera on the iPhone its basically a screen shot. I…

---

## [Please recommend from developer](https://forums.kodeco.com/t/please-recommend-from-developer/20615)

<div class="topic-metadata">

**Author:** [@almass](https://forums.kodeco.com/u/almass)\
**Replies:** 0\
**Last updated:** [October 2, 2016, 12:50pm UTC](https://forums.kodeco.com/t/please-recommend-from-developer/20615 "2016-10-02T12:50:53Z")

</div>

hello all please can one tell me how can i dealing with photos and videos in photo library i don’t know how. i use the photos framework but the problem i getting low performance for operation my app and when i get thu…

---

## [Image picker that displays both camera and photo library in swift 3](https://forums.kodeco.com/t/image-picker-that-displays-both-camera-and-photo-library-in-swift-3/20506)

<div class="topic-metadata">

**Author:** [@zalubski](https://forums.kodeco.com/u/zalubski)\
**Replies:** 0\
**Last updated:** [September 29, 2016, 6:02pm UTC](https://forums.kodeco.com/t/image-picker-that-displays-both-camera-and-photo-library-in-swift-3/20506 "2016-09-29T18:02:08Z")

</div>

First off this was the video tutorial I was trying to follow Xcode 7.2 Swift 2 Tutorial: iOS 9 UIImagePickerController - YouTube. I have just recenlty installed the new Xcode update. So I am working with swift 3. All th…

---

## [NSScrollview scrolling](https://forums.kodeco.com/t/nsscrollview-scrolling/20432)

<div class="topic-metadata">

**Author:** [@fritz](https://forums.kodeco.com/u/fritz)\
**Replies:** 1\
**Last updated:** [September 29, 2016, 2:50pm UTC](https://forums.kodeco.com/t/nsscrollview-scrolling/20432 "2016-09-29T14:50:16Z")

</div>

Hi ! I have a problem with scrolling (and zooming) an NSView in A NSScrollView. I have a View (fixed size 3000,2000) that I embedded into a scrollview. When I scroll to the right bottom end, every looks fine. But when…

---

## [How to use one button to show/ hide another button](https://forums.kodeco.com/t/how-to-use-one-button-to-show-hide-another-button/20286)

<div class="topic-metadata">

**Author:** [@zalubski](https://forums.kodeco.com/u/zalubski)\
**Replies:** 3\
**Last updated:** [September 28, 2016, 4:46am UTC](https://forums.kodeco.com/t/how-to-use-one-button-to-show-hide-another-button/20286 "2016-09-28T04:46:40Z")

</div>

I would like Button to show/ hide button b every time it is pressed. So if pressed it either makes the button appear or disappear picture is attached.

---

## [Can we change Font, Size for all Label by single file?](https://forums.kodeco.com/t/can-we-change-font-size-for-all-label-by-single-file/20369)

<div class="topic-metadata">

**Author:** [@nhut\_huynh](https://forums.kodeco.com/u/nhut_huynh)\
**Replies:** 1\
**Last updated:** [September 27, 2016, 5:13am UTC](https://forums.kodeco.com/t/can-we-change-font-size-for-all-label-by-single-file/20369 "2016-09-27T05:13:22Z")

</div>

Hello everyone, I would like to ask, have any ways to change all Font, Size for Label by single code or an extension file ? ex: Android have been supported with the XML file (dimens) Thanks you! :smiley:

---

## [Label in table view cell won't delete](https://forums.kodeco.com/t/label-in-table-view-cell-wont-delete/20258)

<div class="topic-metadata">

**Author:** [@brower](https://forums.kodeco.com/u/brower)\
**Replies:** 1\
**Last updated:** [September 26, 2016, 6:01pm UTC](https://forums.kodeco.com/t/label-in-table-view-cell-wont-delete/20258 "2016-09-26T18:01:31Z")

</div>

I created an app using the master-detail template for iOS. When I try to delete the label that is contained in the table view cell, it won’t delete. Anyone know why I can’t delete that and how I can delete that? I’d l…

---

## [A-arrrgh! I wanna scream at Apple and Xcode 8 and Swift 3 and Sierra!](https://forums.kodeco.com/t/a-arrrgh-i-wanna-scream-at-apple-and-xcode-8-and-swift-3-and-sierra/20094)

<div class="topic-metadata">

**Author:** [@chicago](https://forums.kodeco.com/u/chicago)\
**Replies:** 4\
**Last updated:** [September 26, 2016, 3:23pm UTC](https://forums.kodeco.com/t/a-arrrgh-i-wanna-scream-at-apple-and-xcode-8-and-swift-3-and-sierra/20094 "2016-09-26T15:23:30Z")

</div>

I’m kidding, of course, but I am so close to finishing an update to one of my apps and now Swift 3 and Xcode 8 are staring me smack in da face. :cop: So - the questions are - (1) Do I just continue with what I am doin…

---

## [Tutorial renewal](https://forums.kodeco.com/t/tutorial-renewal/20172)

<div class="topic-metadata">

**Author:** [@xcoder9](https://forums.kodeco.com/u/xcoder9)\
**Replies:** 5\
**Last updated:** [September 26, 2016, 10:20am UTC](https://forums.kodeco.com/t/tutorial-renewal/20172 "2016-09-26T10:20:28Z")

</div>

So, I just started on "Swift Tutorial 1: Welcome to Programming” by Brian Moakley a couple of weeks ago, I am busy for a few days, come back to it and Brian’s tutorials have been replaced by ones written by Matt Galloway…

---

## [What is up with UITableViewDataSource in Swift 3?](https://forums.kodeco.com/t/what-is-up-with-uitableviewdatasource-in-swift-3/20248)

<div class="topic-metadata">

**Author:** [@steelzeh](https://forums.kodeco.com/u/steelzeh)\
**Replies:** 0\
**Last updated:** [September 23, 2016, 10:10pm UTC](https://forums.kodeco.com/t/what-is-up-with-uitableviewdatasource-in-swift-3/20248 "2016-09-23T22:10:56Z")

</div>

So i’m getting really pissed here. I’m trying to do this func tableView(\_ tableView: UITableView, heightForHeaderInSection section: Int) -\> CGFloat And Xcode is bitching about something. Instance method ‘tableView(:h…

---

## [How to Create a button to stop the music in xcode](https://forums.kodeco.com/t/how-to-create-a-button-to-stop-the-music-in-xcode/18509)

<div class="topic-metadata">

**Author:** [@zalubski](https://forums.kodeco.com/u/zalubski)\
**Replies:** 2\
**Last updated:** [September 23, 2016, 5:04am UTC](https://forums.kodeco.com/t/how-to-create-a-button-to-stop-the-music-in-xcode/18509 "2016-09-23T05:04:01Z")

</div>

\##This code has a button when pressed it plays the music. However there is no way to stop the music. I would like to create a code that if the button is pressed a even number of times the song plays if the button is pres…

---

## [How to manually program constraints for a button](https://forums.kodeco.com/t/how-to-manually-program-constraints-for-a-button/19988)

<div class="topic-metadata">

**Author:** [@zalubski](https://forums.kodeco.com/u/zalubski)\
**Replies:** 4\
**Last updated:** [September 23, 2016, 3:54am UTC](https://forums.kodeco.com/t/how-to-manually-program-constraints-for-a-button/19988 "2016-09-23T03:54:44Z")

</div>

This button has no constraints on it. How can I manually code the constraints like I would do in a label so that the button fits dead center in the screen. This is a picture of the button. This is the view controll…

---

## [How to have video be ready to play in swift](https://forums.kodeco.com/t/how-to-have-video-be-ready-to-play-in-swift/19910)

<div class="topic-metadata">

**Author:** [@zalubski](https://forums.kodeco.com/u/zalubski)\
**Replies:** 7\
**Last updated:** [September 22, 2016, 3:32pm UTC](https://forums.kodeco.com/t/how-to-have-video-be-ready-to-play-in-swift/19910 "2016-09-22T15:32:12Z")

</div>

The following code has a video being played. But the video starts immediately when the view controller is launch. When the view controller is launch I would like the user to hit the play button for the video to play. Now…

---

## [Creating graph layout to draw with dimensions](https://forums.kodeco.com/t/creating-graph-layout-to-draw-with-dimensions/20079)

<div class="topic-metadata">

**Author:** [@fahad](https://forums.kodeco.com/u/fahad)\
**Replies:** 2\
**Last updated:** [September 21, 2016, 5:34pm UTC](https://forums.kodeco.com/t/creating-graph-layout-to-draw-with-dimensions/20079 "2016-09-21T17:34:29Z")

</div>

Hello, I’m wanting to have a “virtual” grapth paper boxes and use them to set the canvas unit/scale. Would it be possible to have length attribute for the line drawn? I’m relatively new to iOS development, I know all th…

---

## [UIImage View Animation Question](https://forums.kodeco.com/t/uiimage-view-animation-question/19869)

<div class="topic-metadata">

**Author:** [@chicago](https://forums.kodeco.com/u/chicago)\
**Replies:** 2\
**Last updated:** [September 21, 2016, 4:11pm UTC](https://forums.kodeco.com/t/uiimage-view-animation-question/19869 "2016-09-21T16:11:45Z")

</div>

I would like to know if there is an animation technique which would cause an image view to fragment and fall when the user taps the screen exposing the view behind it? I have scanned the net but never seem to have the c…

---

## [Image ScrollView](https://forums.kodeco.com/t/image-scrollview/20056)

<div class="topic-metadata">

**Author:** [@fabrice](https://forums.kodeco.com/u/fabrice)\
**Replies:** 2\
**Last updated:** [September 21, 2016, 8:36am UTC](https://forums.kodeco.com/t/image-scrollview/20056 "2016-09-21T08:36:24Z")

</div>

Hello, I have a ScrollView with images, but the images do not fit the size of my ScrollView. Before updating in Xcode8, the scroll was done correctly, exactly suitable size and perfect paging. below the code that manages…

---

## [1. CGPathMoveToPoint' is unavailable: Use move(to:transform:) 2. 'CGPathAddLineToPoint' is unavailable: Use addLine(to:transform:)](https://forums.kodeco.com/t/1-cgpathmovetopoint-is-unavailable-use-move-to-transform-2-cgpathaddlinetopoint-is-unavailable-use-addline-to-transform/19954)

<div class="topic-metadata">

**Author:** [@vimipatel](https://forums.kodeco.com/u/vimipatel)\
**Replies:** 2\
**Last updated:** [September 20, 2016, 1:10pm UTC](https://forums.kodeco.com/t/1-cgpathmovetopoint-is-unavailable-use-move-to-transform-2-cgpathaddlinetopoint-is-unavailable-use-addline-to-transform/19954 "2016-09-20T13:10:04Z")

</div>

I have created one of my application in swift 2 in Xcode 7.3.1. But now I have open same application in Xcode 8.0 and perform changes. Some automatic changes are done and some errors and suggestions shown I have correcte…

---

## [How to let user add/edit text on a UIImage in swift](https://forums.kodeco.com/t/how-to-let-user-add-edit-text-on-a-uiimage-in-swift/19510)

<div class="topic-metadata">

**Author:** [@zalubski](https://forums.kodeco.com/u/zalubski)\
**Replies:** 1\
**Last updated:** [September 21, 2016, 6:07am UTC](https://forums.kodeco.com/t/how-to-let-user-add-edit-text-on-a-uiimage-in-swift/19510 "2016-09-21T06:07:17Z")

</div>

This picture in the link has a blank black box that is a UIImage view. All I am looking to do is have the ability for the user to add text to the box and for it to be fixed there. I would also like for the user to be abl…

---

## [Value of type 'CustomButton' has no member 'touchDown'](https://forums.kodeco.com/t/value-of-type-custombutton-has-no-member-touchdown/19951)

<div class="topic-metadata">

**Author:** [@vimipatel](https://forums.kodeco.com/u/vimipatel)\
**Replies:** 1\
**Last updated:** [September 20, 2016, 1:29am UTC](https://forums.kodeco.com/t/value-of-type-custombutton-has-no-member-touchdown/19951 "2016-09-20T01:29:16Z")

</div>

I have created custom button class and override all touches methods. It works fine in swift 2 and Xcode 7.3.1. But when I open same app in Xcode 8.0, it will show errors : Value of type ‘CustomButton’ has no member ‘to…

---

## [UIGestureRecognizer or UIView?](https://forums.kodeco.com/t/uigesturerecognizer-or-uiview/19487)

<div class="topic-metadata">

**Author:** [@webgood](https://forums.kodeco.com/u/webgood)\
**Replies:** 3\
**Last updated:** [September 18, 2016, 11:57pm UTC](https://forums.kodeco.com/t/uigesturerecognizer-or-uiview/19487 "2016-09-18T23:57:20Z")

</div>

Hi, I’m creating game with drag and drope feature. I checked variants with touchesBegan and touchesMoved and it’s working. Then I found that it’s so simple to use UIGestureRecognizers. It’s more easy but I’m not sure w…

---

## [CLPlacemark not longer updating in CoreData after Swift 3 / Xcode 8 update](https://forums.kodeco.com/t/clplacemark-not-longer-updating-in-coredata-after-swift-3-xcode-8-update/19885)

<div class="topic-metadata">

**Author:** [@rylek90](https://forums.kodeco.com/u/rylek90)\
**Replies:** 1\
**Last updated:** [September 18, 2016, 11:41pm UTC](https://forums.kodeco.com/t/clplacemark-not-longer-updating-in-coredata-after-swift-3-xcode-8-update/19885 "2016-09-18T23:41:58Z")

</div>

Hi, I’ve recently updated my project to Swift 3 iOS10 and after resolving some code changes it appears that CLPlacemark is no longer stored in SQLite database. I’ve mapped it to Transformable object type, generated map…

---

## [NSFetchedResultsController after Swift 3 Migration](https://forums.kodeco.com/t/nsfetchedresultscontroller-after-swift-3-migration/19793)

<div class="topic-metadata">

**Author:** [@seanperez29](https://forums.kodeco.com/u/seanperez29)\
**Replies:** 1\
**Last updated:** [September 18, 2016, 9:16am UTC](https://forums.kodeco.com/t/nsfetchedresultscontroller-after-swift-3-migration/19793 "2016-09-18T09:16:09Z")

</div>

After migrating to Swift 3 Xcode is giving me error on the creation of the fetchedResultsController. Any suggestions? :slight\_smile: Original code which use to work fine: lazy var fetchedResultsController: NSFetchedRes…

---

## [Order of the code in viewDidLoad](https://forums.kodeco.com/t/order-of-the-code-in-viewdidload/19906)

<div class="topic-metadata">

**Author:** [@jmclovin](https://forums.kodeco.com/u/jmclovin)\
**Replies:** 0\
**Last updated:** [September 17, 2016, 8:09pm UTC](https://forums.kodeco.com/t/order-of-the-code-in-viewdidload/19906 "2016-09-17T20:09:31Z")

</div>

Continuing the discussion from Video Tutorial: Swift Scroll View School Part 2: Scrolling: Hi Greg, At first this didn’t work for me and it turns out it’s because I put the code that sets up and adds the originLabel su…

---

## [New Topic button is grayed out for "Official Tutorials"](https://forums.kodeco.com/t/new-topic-button-is-grayed-out-for-official-tutorials/19879)

<div class="topic-metadata">

**Author:** [@elearner](https://forums.kodeco.com/u/elearner)\
**Replies:** 3\
**Last updated:** [September 16, 2016, 10:02pm UTC](https://forums.kodeco.com/t/new-topic-button-is-grayed-out-for-official-tutorials/19879 "2016-09-16T22:02:47Z")

</div>

Hey guys, When I select the Official Tutorials Forum, the New Topic button is grayed out and won’t let me select it to create a new topic. Am I doing something wrong? I recently signed up and paid to view the video t…

---

## [How to play a local video in swift](https://forums.kodeco.com/t/how-to-play-a-local-video-in-swift/19852)

<div class="topic-metadata">

**Author:** [@zalubski](https://forums.kodeco.com/u/zalubski)\
**Replies:** 1\
**Last updated:** [September 16, 2016, 9:07pm UTC](https://forums.kodeco.com/t/how-to-play-a-local-video-in-swift/19852 "2016-09-16T21:07:30Z")

</div>

How could I play a local video is swift. I have tried UIWebView that did not really work.

---

## [How to create a view controller within iMessage App in expanded mode](https://forums.kodeco.com/t/how-to-create-a-view-controller-within-imessage-app-in-expanded-mode/19874)

<div class="topic-metadata">

**Author:** [@digimarktech](https://forums.kodeco.com/u/digimarktech)\
**Replies:** 0\
**Last updated:** [September 16, 2016, 7:43pm UTC](https://forums.kodeco.com/t/how-to-create-a-view-controller-within-imessage-app-in-expanded-mode/19874 "2016-09-16T19:43:32Z")

</div>

I have been playing with a custom iMessage app and I am trying to add a CNContactPickerViewController as a view in my app. For some reason when the controller comes up in expanded mode, the search bar and top part of con…

---

## [How to insert html in x code](https://forums.kodeco.com/t/how-to-insert-html-in-x-code/19827)

<div class="topic-metadata">

**Author:** [@zalubski](https://forums.kodeco.com/u/zalubski)\
**Replies:** 0\
**Last updated:** [September 15, 2016, 2:34pm UTC](https://forums.kodeco.com/t/how-to-insert-html-in-x-code/19827 "2016-09-15T14:34:36Z")

</div>

I am trying to insert a video with html in swift below is my current code and a picture below. import UIKit import AVFoundation import AVKit class video: UIViewController { @IBOutlet weak var z: UIWebView! ov…

---

## [Creating a TableView Programmatically with multiple cell in swift](https://forums.kodeco.com/t/creating-a-tableview-programmatically-with-multiple-cell-in-swift/19488)

<div class="topic-metadata">

**Author:** [@itsanand8](https://forums.kodeco.com/u/itsanand8)\
**Replies:** 7\
**Last updated:** [September 14, 2016, 9:32am UTC](https://forums.kodeco.com/t/creating-a-tableview-programmatically-with-multiple-cell-in-swift/19488 "2016-09-14T09:32:51Z")

</div>

As I am creating a TableView programmatically with multiple cell and in each cell having UICollectionView, UITableView, UITableView… but I am not able to find the error and every time when I run the program it Shows " Co…

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

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