# Custom Alignment | raywenderlich.com

**URL:** <https://forums.kodeco.com/t/custom-alignment-raywenderlich-com/92400>\
**Category:** 🎓 Courses & Articles\
**Created:** [December 23, 2019, 7:38am UTC](https://forums.kodeco.com/t/custom-alignment-raywenderlich-com/92400 "2019-12-23T07:38:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![catie](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/catie/32/110937_2.png) [@catie](https://forums.kodeco.com/u/catie)\
**Post date:** [December 23, 2019, 7:38am UTC](https://forums.kodeco.com/t/custom-alignment-raywenderlich-com/92400/1 "2019-12-23T07:38:38Z")

</div>

* * *
This is a companion discussion topic for the original entry at [https://www.raywenderlich.com/6849561-layout-in-ios/lessons/5](https://www.raywenderlich.com/6849561-layout-in-ios/lessons/5)

---

<div class="post-metadata">

**Author:** ![ofthetans](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/ofthetans/32/81494_2.png) [@ofthetans](https://forums.kodeco.com/u/ofthetans)\
**Post date:** [September 12, 2020, 4:38am UTC](https://forums.kodeco.com/t/custom-alignment-raywenderlich-com/92400/2 "2020-09-12T04:38:27Z")

</div>

Why isn’t the end result for the three HStacks (after implementation of customCenter) actually centered in the center of the original VStack? Wouldn’t the default “center” actually really be in the true center of that VStack instead of off to the right a bit?

---

<div class="post-metadata">

**Author:** ![jcatterwaul](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jcatterwaul/32/94210_2.png) [@jcatterwaul](https://forums.kodeco.com/u/jcatterwaul)\
**Post date:** [September 12, 2020, 3:57pm UTC](https://forums.kodeco.com/t/custom-alignment-raywenderlich-com/92400/3 "2020-09-12T15:57:15Z")

</div>

Great question!

The end result _is_ centered. It just doesn’t fit within the hard-coded frame of the VStack.

![Screen Shot 2020-09-12 at 11.30.14 AM](https://files.chunter.kodeco.com/original/3X/0/7/07402257dfa86247edf932070feb2fcf75bc714e.png)

And if you’re questioning why the bottom Text isn’t in the center, check out the beginning of [the previous video](https://www.raywenderlich.com/6849561-layout-in-ios/lessons/4).

---

<div class="post-metadata">

**Author:** ![ofthetans](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/ofthetans/32/81494_2.png) [@ofthetans](https://forums.kodeco.com/u/ofthetans)\
**Post date:** [September 12, 2020, 8:11pm UTC](https://forums.kodeco.com/t/custom-alignment-raywenderlich-com/92400/4 "2020-09-12T20:11:55Z")

</div>

I do see that the three HStacks are centered relative to each other along the newly defined customCenters for the first two and the default center for the third stack , but I don’t understand how SwiftUI decides where to place the ENTIRE resulting VStack on the screen. Does it try to maximize the total amount of image that would have been within the initial VStack box?
