# Your First iOS App - Part 3: Buttons and | Ray Wenderlich Videos

**URL:** <https://forums.kodeco.com/t/your-first-ios-app-part-3-buttons-and-ray-wenderlich-videos/45052>\
**Category:** 🎓 Courses & Articles\
**Created:** [July 24, 2018, 7:34pm UTC](https://forums.kodeco.com/t/your-first-ios-app-part-3-buttons-and-ray-wenderlich-videos/45052 "2018-07-24T19:34:33Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![rwenderlich](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/rwenderlich/32/108604_2.png) [@rwenderlich](https://forums.kodeco.com/u/rwenderlich)\
**Post date:** [July 24, 2018, 7:34pm UTC](https://forums.kodeco.com/t/your-first-ios-app-part-3-buttons-and-ray-wenderlich-videos/45052/1 "2018-07-24T19:34:33Z")

</div>

Learn how to add a button to the app and connect it to some Swift code that prints a message to the console.

* * *
 This is a companion discussion topic for the original entry at [https://www.raywenderlich.com/5993-your-first-ios-app/lessons/3](https://www.raywenderlich.com/5993-your-first-ios-app/lessons/3)

---

<div class="post-metadata">

**Author:** ![bekeith](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@bekeith](https://forums.kodeco.com/u/bekeith)\
**Post date:** [August 4, 2018, 8:07pm UTC](https://forums.kodeco.com/t/your-first-ios-app-part-3-buttons-and-ray-wenderlich-videos/45052/3 "2018-08-04T20:07:56Z")

</div>

We are creating a app in landscape mode, but we weren’t told how to change the view in the simulator. The orientation is by default in portrait mode. To change this when the simulator is open, go to to Hardware\>Panel\>Orientation\> Landscape Right to change the orientation.

---

<div class="post-metadata">

**Author:** ![addnab](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/addnab/32/77179_2.png) [@addnab](https://forums.kodeco.com/u/addnab)\
**Post date:** [August 31, 2018, 5:26pm UTC](https://forums.kodeco.com/t/your-first-ios-app-part-3-buttons-and-ray-wenderlich-videos/45052/4 "2018-08-31T17:26:45Z")

</div>

An easy way to quickly change orientation is by typing CMD + Left or CMD + Right while the simulator is open.

---

<div class="post-metadata">

**Author:** ![wwj](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@wwj](https://forums.kodeco.com/u/wwj)\
**Post date:** [October 6, 2018, 5:43pm UTC](https://forums.kodeco.com/t/your-first-ios-app-part-3-buttons-and-ray-wenderlich-videos/45052/5 "2018-10-06T17:43:33Z")

</div>

How to add the handy object select button in the XCode toolbar that showed in the video 4:23 (the button that just beside the “Show Standard Editor” button)?

---

<div class="post-metadata">

**Author:** ![rwenderlich](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/rwenderlich/32/108604_2.png) [@rwenderlich](https://forums.kodeco.com/u/rwenderlich)\
**Post date:** [October 9, 2018, 9:41am UTC](https://forums.kodeco.com/t/your-first-ios-app-part-3-buttons-and-ray-wenderlich-videos/45052/6 "2018-10-09T09:41:43Z")

</div>

@wwj That should be there by default if you use Xcode 10 (it’s a new feature). Do you have that installed?

---

<div class="post-metadata">

**Author:** ![fullpopfreddy](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/fullpopfreddy/32/85624_2.png) [@fullpopfreddy](https://forums.kodeco.com/u/fullpopfreddy)\
**Post date:** [January 12, 2019, 8:03pm UTC](https://forums.kodeco.com/t/your-first-ios-app-part-3-buttons-and-ray-wenderlich-videos/45052/7 "2019-01-12T20:03:44Z")

</div>

I am using Xcode 10. However, just like the previous observations(comments) Even after the orientation selected( landscape), when running the simulator the “hit me” button isn’t centered and it’s on portrait view. However, after using CMD right or CMD left, I was able to correct the simulator view.

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [February 6, 2019, 1:31am UTC](https://forums.kodeco.com/t/your-first-ios-app-part-3-buttons-and-ray-wenderlich-videos/45052/8 "2019-02-06T01:31:23Z")

</div>

@fullpopfreddy Do you still have issues with this?

---

<div class="post-metadata">

**Author:** ![csbal90](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/csbal90/32/79544_2.png) [@csbal90](https://forums.kodeco.com/u/csbal90)\
**Post date:** [March 26, 2019, 7:46am UTC](https://forums.kodeco.com/t/your-first-ios-app-part-3-buttons-and-ray-wenderlich-videos/45052/10 "2019-03-26T07:46:02Z")

</div>

Hi,

I’m trying to do the first step of adding @IBAction func but I keep getting an message that states “Expected identifier in function declaration” and doesn’t show the showalert in the sentevents.

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [April 1, 2019, 10:27pm UTC](https://forums.kodeco.com/t/your-first-ios-app-part-3-buttons-and-ray-wenderlich-videos/45052/11 "2019-04-01T22:27:24Z")

</div>

@csbal90 Do you still have this issue?

---

<div class="post-metadata">

**Author:** ![readreid](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/readreid/32/81494_2.png) [@readreid](https://forums.kodeco.com/u/readreid)\
**Post date:** [June 6, 2019, 2:44am UTC](https://forums.kodeco.com/t/your-first-ios-app-part-3-buttons-and-ray-wenderlich-videos/45052/12 "2019-06-06T02:44:13Z")

</div>

I am at the part where you link the button to the function, but when I drag it, showAlert does not show.

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [July 9, 2019, 7:11pm UTC](https://forums.kodeco.com/t/your-first-ios-app-part-3-buttons-and-ray-wenderlich-videos/45052/13 "2019-07-09T19:11:30Z")

</div>

@readreid What errors do you get exactly?
