# iOS Apprentice

**URL:** https://forums.kodeco.com/c/books/ios-apprentice/7.md?page=20

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

**Page:** 21

---

## [Tutorial 3: Question on NSFetchedResultsController](https://forums.kodeco.com/t/tutorial-3-question-on-nsfetchedresultscontroller/23700)

<div class="topic-metadata">

**Author:** [@ciaobella](https://forums.kodeco.com/u/ciaobella)\
**Replies:** 2\
**Last updated:** [December 4, 2016, 9:25pm UTC](https://forums.kodeco.com/t/tutorial-3-question-on-nsfetchedresultscontroller/23700 "2016-12-04T21:25:41Z")

</div>

Hi, I’m implementing NSFetchedResultsController for my CoreData (pg ~182) and I am hoping someone could help clarify HOW NSFetchedResultsController is able to tell its delegate that changes are being made to Core Data. …

---

## [Store Search iPad split view makes landscape worse on 6plus/7plus](https://forums.kodeco.com/t/store-search-ipad-split-view-makes-landscape-worse-on-6plus-7plus/23672)

<div class="topic-metadata">

**Author:** [@kickinbahk](https://forums.kodeco.com/u/kickinbahk)\
**Replies:** 2\
**Last updated:** [December 4, 2016, 3:53pm UTC](https://forums.kodeco.com/t/store-search-ipad-split-view-makes-landscape-worse-on-6plus-7plus/23672 "2016-12-04T15:53:02Z")

</div>

I noticed that landscape on a 6plus/7plus look weird not threat I have he iPad split view. Is there a way to treat these devices like an iPad or keep in just a phone? Right now it shows the split view with the master as …

---

## [Checklists (p.243): itemID doesn't display properly all the time](https://forums.kodeco.com/t/checklists-p-243-itemid-doesnt-display-properly-all-the-time/23543)

<div class="topic-metadata">

**Author:** [@jharveymorgan](https://forums.kodeco.com/u/jharveymorgan)\
**Replies:** 2\
**Last updated:** [December 2, 2016, 8:01pm UTC](https://forums.kodeco.com/t/checklists-p-243-itemid-doesnt-display-properly-all-the-time/23543 "2016-12-02T20:01:07Z")

</div>

I have the code correctly. When I create new checklists the itemID is generated correctly and it saves when I go to the home screen. If I tap the app on the simulator, the app opens and displays all the correct itemIDs. …

---

## [Tutorial 3: Nav Controllers and Segue Question](https://forums.kodeco.com/t/tutorial-3-nav-controllers-and-segue-question/23538)

<div class="topic-metadata">

**Author:** [@ciaobella](https://forums.kodeco.com/u/ciaobella)\
**Replies:** 2\
**Last updated:** [December 2, 2016, 4:40pm UTC](https://forums.kodeco.com/t/tutorial-3-nav-controllers-and-segue-question/23538 "2016-12-02T16:40:52Z")

</div>

Hi, I was working on building the LocationDetailsViewController ~p95, and had 2 questions: When do you embed a navigation controller to a view, versus when you just present it modally? I noticed you could still add a…

---

## [Ch2: Checklists Dependency Analysis Error (plus Bonus)](https://forums.kodeco.com/t/ch2-checklists-dependency-analysis-error-plus-bonus/23612)

<div class="topic-metadata">

**Author:** [@tony\_m](https://forums.kodeco.com/u/tony_m)\
**Replies:** 0\
**Last updated:** [December 2, 2016, 7:43am UTC](https://forums.kodeco.com/t/ch2-checklists-dependency-analysis-error-plus-bonus/23612 "2016-12-02T07:43:27Z")

</div>

I would like to be able to take advantage of the Checklists.xcodeproj files that have been provided for each section (this is a VERY NICE feature) but I’m running into a signing error that I cannot solve. I tried to rep…

---

## [Store Search Exercise pg 199](https://forums.kodeco.com/t/store-search-exercise-pg-199/23535)

<div class="topic-metadata">

**Author:** [@kickinbahk](https://forums.kodeco.com/u/kickinbahk)\
**Replies:** 1\
**Last updated:** [November 30, 2016, 4:54pm UTC](https://forums.kodeco.com/t/store-search-exercise-pg-199/23535 "2016-11-30T16:54:09Z")

</div>

I could not figure out how to resize the images in the buttons. I used the code from the resizedImage function from MyLocations, but I just can’t figure out why it is not working. I added this extension: extension UIIm…

---

## [Tutorial 1: Pin Menu --\> Add New Constraints](https://forums.kodeco.com/t/tutorial-1-pin-menu-add-new-constraints/23488)

<div class="topic-metadata">

**Author:** [@tony\_m](https://forums.kodeco.com/u/tony_m)\
**Replies:** 1\
**Last updated:** [November 30, 2016, 10:58am UTC](https://forums.kodeco.com/t/tutorial-1-pin-menu-add-new-constraints/23488 "2016-11-30T10:58:38Z")

</div>

At the bottom of page 134 we’re told to “Select the newly added container view and open the Pin menu” I see that a “Pin Button” is, in effect, defined by a figure on page 128 and since pressing that button brings up a…

---

## [Tutorial 1: currentValue = lround(slider.value) causes Build fail on p60](https://forums.kodeco.com/t/tutorial-1-currentvalue-lround-slider-value-causes-build-fail-on-p60/23441)

<div class="topic-metadata">

**Author:** [@tony\_m](https://forums.kodeco.com/u/tony_m)\
**Replies:** 3\
**Last updated:** [November 29, 2016, 3:52pm UTC](https://forums.kodeco.com/t/tutorial-1-currentvalue-lround-slider-value-causes-build-fail-on-p60/23441 "2016-11-29T15:52:56Z")

</div>

on p57 we’re told to use: currentValue = lround(slider.value) but then when I tried to run on p60 it gave the error: "cannot convert ‘Float’ to expected argument type ‘Double’ and suggests the line be fixed to: curre…

---

## [myLocations V5: pg 279 Sound issue](https://forums.kodeco.com/t/mylocations-v5-pg-279-sound-issue/23324)

<div class="topic-metadata">

**Author:** [@kwmy](https://forums.kodeco.com/u/kwmy)\
**Replies:** 0\
**Last updated:** [November 28, 2016, 6:34am UTC](https://forums.kodeco.com/t/mylocations-v5-pg-279-sound-issue/23324 "2016-11-28T06:34:22Z")

</div>

I was having a problem with no sound on either my phone or the simulator. I had traced with print commands and could see the method was executing in the code, but still could not hear anything. Here was what I found solv…

---

## [Tutorial 3 MyLocations v5.0 - "Creating an image format with an unknown type is an error"](https://forums.kodeco.com/t/tutorial-3-mylocations-v5-0-creating-an-image-format-with-an-unknown-type-is-an-error/23177)

<div class="topic-metadata">

**Author:** [@avantjer](https://forums.kodeco.com/u/avantjer)\
**Replies:** 1\
**Last updated:** [November 26, 2016, 4:52pm UTC](https://forums.kodeco.com/t/tutorial-3-mylocations-v5-0-creating-an-image-format-with-an-unknown-type-is-an-error/23177 "2016-11-26T16:52:34Z")

</div>

Problem, (below), was resolved by going back to Main.storyboard and deleting, then rebuilding the contents of the Table View Section that contained the “Add Photo” label and ImageView. Not sure what was wrong but going …

---

## [Tutorial 3: Notifications](https://forums.kodeco.com/t/tutorial-3-notifications/23028)

<div class="topic-metadata">

**Author:** [@kathesplace](https://forums.kodeco.com/u/kathesplace)\
**Replies:** 1\
**Last updated:** [November 23, 2016, 5:06pm UTC](https://forums.kodeco.com/t/tutorial-3-notifications/23028 "2016-11-23T17:06:40Z")

</div>

After completing the tutorial and testing the app on the simulator, I installed it on my iPhone 6. The notifications do not work on my phone but do work on the simulator. What could cause that issue?

---

## [Checklists: Question about DataModel:registerUserDefaults](https://forums.kodeco.com/t/checklists-question-about-datamodel-registeruserdefaults/21308)

<div class="topic-metadata">

**Author:** [@diskprotek](https://forums.kodeco.com/u/diskprotek)\
**Replies:** 2\
**Last updated:** [November 20, 2016, 8:01pm UTC](https://forums.kodeco.com/t/checklists-question-about-datamodel-registeruserdefaults/21308 "2016-11-20T20:01:46Z")

</div>

Maybe I missed this somewhere, but how is it that this only gets executed the first time the app is run? In other words, how is it not executed every time “init()” is executed when the app is started? So when Checklist…

---

## [Constraints not working in either of last two xcode versions](https://forums.kodeco.com/t/constraints-not-working-in-either-of-last-two-xcode-versions/22807)

<div class="topic-metadata">

**Author:** [@chappers](https://forums.kodeco.com/u/chappers)\
**Replies:** 4\
**Last updated:** [November 19, 2016, 2:27pm UTC](https://forums.kodeco.com/t/constraints-not-working-in-either-of-last-two-xcode-versions/22807 "2016-11-19T14:27:30Z")

</div>

I am new to iOS dev and working on the apprentice Tutorial 2. I cannot seem to get the constraints to stick. As soon as i flick the orientation and change device some if not all are not responding as they should I just …

---

## [MyLocations V5: pg 151 AppDelegate SIGABRT error](https://forums.kodeco.com/t/mylocations-v5-pg-151-appdelegate-sigabrt-error/22827)

<div class="topic-metadata">

**Author:** [@kwmy](https://forums.kodeco.com/u/kwmy)\
**Replies:** 1\
**Last updated:** [November 18, 2016, 11:49am UTC](https://forums.kodeco.com/t/mylocations-v5-pg-151-appdelegate-sigabrt-error/22827 "2016-11-18T11:49:16Z")

</div>

When I ran the app on PG151 I received a SIGABRT error in the app delegate. The solution: In the DataModel file, Entity → Class → Module defaulted to “Global Namespace”. Using the drop down menu to switch this to “Curre…

---

## [MyLocations - CoreData](https://forums.kodeco.com/t/mylocations-coredata/22799)

<div class="topic-metadata">

**Author:** [@maniusuroiu](https://forums.kodeco.com/u/maniusuroiu)\
**Replies:** 1\
**Last updated:** [November 17, 2016, 9:52pm UTC](https://forums.kodeco.com/t/mylocations-coredata/22799 "2016-11-17T21:52:24Z")

</div>

Hi Matthijs, I’m going through the CoreData chapter of MyLocations. The AppDelegate file contains two variables declared with the word “lazy”. lazy var persistentContainer: NSPersistentContainer = { let container = NS…

---

## [Tutorial 2: Delegate Methods Question page 104](https://forums.kodeco.com/t/tutorial-2-delegate-methods-question-page-104/22759)

<div class="topic-metadata">

**Author:** [@sem01](https://forums.kodeco.com/u/sem01)\
**Replies:** 2\
**Last updated:** [November 16, 2016, 8:47pm UTC](https://forums.kodeco.com/t/tutorial-2-delegate-methods-question-page-104/22759 "2016-11-16T20:47:20Z")

</div>

Hello, in the delegate Methods in the ChecklistViewController.swift it is written: func addItemViewControllerDidCancel(\_ controller: AddItemViewController) { dismiss(animated: true, completion: nil) } I would have…

---

## [StoreSearch: Error in code on page 97](https://forums.kodeco.com/t/storesearch-error-in-code-on-page-97/22760)

<div class="topic-metadata">

**Author:** [@kickinbahk](https://forums.kodeco.com/u/kickinbahk)\
**Replies:** 1\
**Last updated:** [November 16, 2016, 5:44pm UTC](https://forums.kodeco.com/t/storesearch-error-in-code-on-page-97/22760 "2016-11-16T17:44:51Z")

</div>

This is the code from the book on page 97: func searchBarSearchButtonClicked(\_ searchBar: UISearchBar) { if !searchBar.text!.isEmpty { searchBar.resignFirstResponder() isLoading = true tableView.reloa…

---

## [Why set delegate = delegate on Checklist app pg 221](https://forums.kodeco.com/t/why-set-delegate-delegate-on-checklist-app-pg-221/22629)

<div class="topic-metadata">

**Author:** [@ciaobella](https://forums.kodeco.com/u/ciaobella)\
**Replies:** 1\
**Last updated:** [November 14, 2016, 1:06pm UTC](https://forums.kodeco.com/t/why-set-delegate-delegate-on-checklist-app-pg-221/22629 "2016-11-14T13:06:06Z")

</div>

Hi, For the Checklist app - on pg 221 - why do we have to set delegate = delegate? What does that accomplish? override func tableView(\_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { if let delegate =…

---

## [MyLocations App crashes error](https://forums.kodeco.com/t/mylocations-app-crashes-error/15704)

<div class="topic-metadata">

**Author:** [@coyote1901](https://forums.kodeco.com/u/coyote1901)\
**Replies:** 4\
**Last updated:** [November 14, 2016, 6:15am UTC](https://forums.kodeco.com/t/mylocations-app-crashes-error/15704 "2016-11-14T06:15:21Z")

</div>

I’ve been stuck on this for a while now. When I try to pick a category item, my app crashes and gives me a Thread 1 signal: SIGABRT error and prints to the console → I’ve checked the message and i’m having a hard time f…

---

## [Difference between referencing outlets/sent actions](https://forums.kodeco.com/t/difference-between-referencing-outlets-sent-actions/22560)

<div class="topic-metadata">

**Author:** [@ciaobella](https://forums.kodeco.com/u/ciaobella)\
**Replies:** 2\
**Last updated:** [November 11, 2016, 7:48pm UTC](https://forums.kodeco.com/t/difference-between-referencing-outlets-sent-actions/22560 "2016-11-11T19:48:58Z")

</div>

Hi, I’m working on Checklists and just added the Done Bar Button to both a Sent Action (done \> add item) and Referencing Outlet (donebarbutton \> add item). What is the difference between these two connections? Why do I …

---

## [How to highlight Table Cell Accessory button on tap?](https://forums.kodeco.com/t/how-to-highlight-table-cell-accessory-button-on-tap/22452)

<div class="topic-metadata">

**Author:** [@kennysong](https://forums.kodeco.com/u/kennysong)\
**Replies:** 2\
**Last updated:** [November 10, 2016, 7:59am UTC](https://forums.kodeco.com/t/how-to-highlight-table-cell-accessory-button-on-tap/22452 "2016-11-10T07:59:04Z")

</div>

I’m following the Checklists app in Ch 2 of the iOS Apprentice book. We use a Detail Disclosure Accessory in table cells, but there’s no visual indication when the accessory button is tapped. Is there some way to highli…

---

## [Question on creating protocol methods](https://forums.kodeco.com/t/question-on-creating-protocol-methods/22390)

<div class="topic-metadata">

**Author:** [@ciaobella](https://forums.kodeco.com/u/ciaobella)\
**Replies:** 1\
**Last updated:** [November 9, 2016, 9:30am UTC](https://forums.kodeco.com/t/question-on-creating-protocol-methods/22390 "2016-11-09T09:30:40Z")

</div>

For protocol ItemDetailViewControllerDelegate: class { func itemDetailViewControllerDidCancel(\_ controller: ItemDetailViewController) func itemDetailViewController(\_ controller: ItemDetailViewController, didFinishAddi…

---

## [Error on Segue Delegate pg 104/105](https://forums.kodeco.com/t/error-on-segue-delegate-pg-104-105/22365)

<div class="topic-metadata">

**Author:** [@ciaobella](https://forums.kodeco.com/u/ciaobella)\
**Replies:** 1\
**Last updated:** [November 7, 2016, 11:28pm UTC](https://forums.kodeco.com/t/error-on-segue-delegate-pg-104-105/22365 "2016-11-07T23:28:59Z")

</div>

Hi, I can’t seem to figure out what’s wrong with my prepare(for) method. override func prepare(for segue: UIStoryboardSegue, sender: Any?){ if segue.identifier == “AddItem” { let navigationController = segue.destinat…

---

## [startNewRound / updateLabels](https://forums.kodeco.com/t/startnewround-updatelabels/22268)

<div class="topic-metadata">

**Author:** [@u3qu3oxyvflx](https://forums.kodeco.com/u/u3qu3oxyvflx)\
**Replies:** 3\
**Last updated:** [November 6, 2016, 12:43pm UTC](https://forums.kodeco.com/t/startnewround-updatelabels/22268 "2016-11-06T12:43:28Z")

</div>

There are many paths from here to there. You chose one of them. In at least two (3?) places in Tutorial 1, you call startNewRound() followed by a call to updateLabels(). The path I followed was to put the call to upd…

---

## [Tutorial 2: Checklists (V5) - TableView "static" cells vs. TableViewHeader construct](https://forums.kodeco.com/t/tutorial-2-checklists-v5-tableview-static-cells-vs-tableviewheader-construct/22174)

<div class="topic-metadata">

**Author:** [@businessgeek](https://forums.kodeco.com/u/businessgeek)\
**Replies:** 5\
**Last updated:** [November 4, 2016, 2:43pm UTC](https://forums.kodeco.com/t/tutorial-2-checklists-v5-tableview-static-cells-vs-tableviewheader-construct/22174 "2016-11-04T14:43:26Z")

</div>

I’m going through this tutorial a second time to increase my understanding by trying some variations on core concepts. More fully understanding TableViews is obviously a core competency one needs as an iOS developer. Th…

---

## [Reuse prototype cell (Checklists page.33)](https://forums.kodeco.com/t/reuse-prototype-cell-checklists-page-33/22039)

<div class="topic-metadata">

**Author:** [@ohju](https://forums.kodeco.com/u/ohju)\
**Replies:** 1\
**Last updated:** [November 2, 2016, 2:01pm UTC](https://forums.kodeco.com/t/reuse-prototype-cell-checklists-page-33/22039 "2016-11-02T14:01:22Z")

</div>

(sorry I am not good at English.) Hi, I’m talking about the bug on page.33 Checklists iOS Apprentice. Why just only the checkmark move over without the label on the cell? both are on the same cell but the text is fixe…

---

## [Minor typo: Shadow Offset: Horizontal / Vertical s/b Width / Height](https://forums.kodeco.com/t/minor-typo-shadow-offset-horizontal-vertical-s-b-width-height/21987)

<div class="topic-metadata">

**Author:** [@u3qu3oxyvflx](https://forums.kodeco.com/u/u3qu3oxyvflx)\
**Replies:** 3\
**Last updated:** [November 1, 2016, 4:08pm UTC](https://forums.kodeco.com/t/minor-typo-shadow-offset-horizontal-vertical-s-b-width-height/21987 "2016-11-01T16:08:04Z")

</div>

Fifth Edition, Tutorial 1, p. 112 says to set shadow offset horizontal: and vertical: values. My screen shows width and height for those fields.

---

## [Thread 1: signal SIGABRT for Checklist pg. 27](https://forums.kodeco.com/t/thread-1-signal-sigabrt-for-checklist-pg-27/16145)

<div class="topic-metadata">

**Author:** [@sisball8](https://forums.kodeco.com/u/sisball8)\
**Replies:** 14\
**Last updated:** [October 27, 2016, 3:51am UTC](https://forums.kodeco.com/t/thread-1-signal-sigabrt-for-checklist-pg-27/16145 "2016-10-27T03:51:40Z")

</div>

This strange message prevents the app from launching. A few threads suggest that there is a breakpoint issue. I am pretty sure I’ve ruled out that possibility, because there is no blue arrow in the gutter.

---

## [Tutorial 4: StoreSearch V5.0 pg. 7 - Size classes](https://forums.kodeco.com/t/tutorial-4-storesearch-v5-0-pg-7-size-classes/21664)

<div class="topic-metadata">

**Author:** [@merz](https://forums.kodeco.com/u/merz)\
**Replies:** 2\
**Last updated:** [October 25, 2016, 3:45pm UTC](https://forums.kodeco.com/t/tutorial-4-storesearch-v5-0-pg-7-size-classes/21664 "2016-10-25T15:45:41Z")

</div>

Hi, Today I wanted to start the 4th tutorial, StoreSearch. On page 7 it says “Open the storyboard. It should look like this:” But it does not. The story board in XCode 8 has the iPhone size class, I assume it is from th…

---

## [Unexpectedly found nil while unwrapping an Optional Tutorial 2](https://forums.kodeco.com/t/unexpectedly-found-nil-while-unwrapping-an-optional-tutorial-2/21665)

<div class="topic-metadata">

**Author:** [@coopdaddyswag](https://forums.kodeco.com/u/coopdaddyswag)\
**Replies:** 0\
**Last updated:** [October 25, 2016, 2:06pm UTC](https://forums.kodeco.com/t/unexpectedly-found-nil-while-unwrapping-an-optional-tutorial-2/21665 "2016-10-25T14:06:27Z")

</div>

Solved. Ignore this post.

[Previous page](https://forums.kodeco.com/c/books/ios-apprentice/7.md?page=19)

[Next page](https://forums.kodeco.com/c/books/ios-apprentice/7.md?page=21)
