# Incorrect article about UIViewController Transitions

**URL:** <https://forums.kodeco.com/t/incorrect-article-about-uiviewcontroller-transitions/72758>\
**Category:** iOS\
**Created:** [June 3, 2019, 8:05am UTC](https://forums.kodeco.com/t/incorrect-article-about-uiviewcontroller-transitions/72758 "2019-06-03T08:05:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![revolt](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/revolt/32/81494_2.png) [@revolt](https://forums.kodeco.com/u/revolt)\
**Post date:** [June 3, 2019, 8:05am UTC](https://forums.kodeco.com/t/incorrect-article-about-uiviewcontroller-transitions/72758/1 "2019-06-03T08:05:05Z")

</div>

[This article](https://www.raywenderlich.com/322-custom-uiviewcontroller-transitions-getting-started#c-add-rating) [**should use**](https://stackoverflow.com/a/25193675/865175) `viewForKey:` instead of `viewControllerForKey:`.`view`.

---

<div class="post-metadata">

**Author:** ![jayantvarma](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jayantvarma/32/111768_2.png) [@jayantvarma](https://forums.kodeco.com/u/jayantvarma)\
**Post date:** [June 5, 2019, 6:36am UTC](https://forums.kodeco.com/t/incorrect-article-about-uiviewcontroller-transitions/72758/2 "2019-06-05T06:36:12Z")

</div>

Thanks @revolt for bringing that to the notice, however if you post a little bit of context rather than simply adding two links together, chances are your post might almost seem like spam.

cheers,

---

<div class="post-metadata">

**Author:** ![revolt](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/revolt/32/81494_2.png) [@revolt](https://forums.kodeco.com/u/revolt)\
**Post date:** [June 6, 2019, 11:08am UTC](https://forums.kodeco.com/t/incorrect-article-about-uiviewcontroller-transitions/72758/3 "2019-06-06T11:08:43Z")

</div>

Yeah, sorry about that. The thing is that Apple recommends using the `viewForKey:` method instead of manually reading from the `view` property of the view controller returned by `viewControllerForKey:`.

In my case, it caused a black screen to show up at the end of the transition. Changing `.view` to `viewForKey:` fixed it.

---

<div class="post-metadata">

**Author:** ![system](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@system](https://forums.kodeco.com/u/system)\
**Post date:** [November 17, 2019, 12:05am UTC](https://forums.kodeco.com/t/incorrect-article-about-uiviewcontroller-transitions/72758/4 "2019-11-17T00:05:10Z")

</div>

Closed on November 17, 2019, 12:05am UTC

This topic was automatically closed after 166 days. New replies are no longer allowed.
